Task: equi-join-detect (source dataset: Auto-BI)

Your are given a database with related tables used for business intelligence analysis. Your task is to identify all key/foreign-key join relationships between the tables for this database. Recall that a join is a relationship between two tables, that allows rows from one table to be combined with rows from another, based on a set of common join columns.
 
 
No explanation needed. Please return all join relationships in the following JSON format:
{
  "joins": [
    {
      "from_table": "table-1",
      "from_column": "column-1",
      "to_table": "table-2",
      "to_column": "column-3"
    }, 
	...
  ]
}

Tables:

Table: Customer
|   Customerid | FirstName   | LastName   | Address            | City          | State   |   ZipCode | ContactNumber   |
|-------------:|:------------|:-----------|:-------------------|:--------------|:--------|----------:|:----------------|
|         1007 | Leota       | Dilliard   | 7 W Jackson Blvd   | San Jose      | CA      |     95111 | 408-752-3500    |
|         1012 | Kiley       | Caldarera  | 25 E 75th St #69   | Los Angeles   | CA      |     90034 | 310-498-5651    |
|         1021 | Veronika    | Inouye     | 6 Greenleaf Ave    | San Jose      | CA      |     95111 | 408-540-1785    |
|         1037 | Rozella     | Ostrosky   | 17 Morena Blvd     | Camarillo     | CA      |     93012 | 805-832-6163    |
|         1047 | Kanisha     | Waycott    | 5 Tomahawk Dr      | Los Angeles   | CA      |     90006 | 323-453-2780    |
|         1057 | Shenika     | Seewald    | 4 Otis St          | Van Nuys      | CA      |     91405 | 818-423-4007    |
|         1070 | Kallie      | Blackwood  | 701 S Harrison Rd  | San Francisco | CA      |     94104 | 415-315-2761    |
|         1072 | Bobbye      | Rhym       | 30 W 80th St #1995 | San Carlos    | CA      |     94070 | 650-528-5783    |
|         1073 | Micaela     | Rhymes     | 20932 Hedley St    | Concord       | CA      |     94520 | 925-647-3298    |
|         1083 | Dominque    | Dickerson  | 69 Marquette Ave   | Hayward       | CA      |     94545 | 510-993-3758    |


Table: FoodItems
|   FoodItemID |   RestaurantID | Name                    | Category   |   UnitPrice |   Calories | Description                         |
|-------------:|---------------:|:------------------------|:-----------|------------:|-----------:|:------------------------------------|
|            1 |           5000 | BRUSCHETTA CON CAPONATA | Dinner     |          11 |        100 | eggplant, tomatoes, celery          |
|            2 |           5000 | GRILLED OCTOPUS         | Dinner     |          17 |        150 | capers, frisee & olives             |
|            3 |           5000 | PIZZA BIANCA            | Lunch      |          16 |        200 | individual sized pizza              |
|            4 |           5000 | GRILLED ITALIAN SAUSAGE | Dinner     |          15 |        140 | w/fried peppers and onions          |
|            5 |           5000 | BUTTERSCOTCH BUDINO     | Dessert    |           9 |        130 | tuile cookie                        |
|            6 |           5000 | PUMPKIN TART            | Dessert    |           9 |        200 | toasted meringue                    |
|            7 |           5001 | The LUXE Burger         | Burgers    |           5 |        120 | grilled burger,white truffle cheese |
|            8 |           5001 | Lucky Star Burger       | Burgers    |           8 |        140 | grilled burger,smoked gouda cheese  |
|            9 |           5001 | Pumpkin Spice Cake      | Dessert    |           5 |        100 | All time favourite cake             |
|           10 |           5001 | Chocolate Chip Cookie   | Dessert    |           3 |         90 | cane juice, dark chocolate chips    |


Table: OrderDetail
|   OrderDetailID |   OrderID |   FoodItemID |   Quantity | Instructions               |   FoodItemAmount |
|----------------:|----------:|-------------:|-----------:|:---------------------------|-----------------:|
|            2209 |      1112 |            2 |          1 | Medium Spicy               |               17 |
|            2210 |      1112 |            1 |          2 | Medium Spicy, extra cheese |               22 |
|            2211 |      1112 |            4 |          1 | Medium Spicy               |               15 |
|            2212 |      1113 |            3 |          2 | extra cheese               |               32 |
|            2213 |      1113 |            6 |          1 |                            |                9 |
|            2214 |      1114 |            2 |          1 | Medium Spicy               |               17 |
|            2215 |      1114 |           19 |          1 | Medium Spicy               |               11 |
|            2216 |      1115 |           20 |          2 |                            |                6 |
|            2217 |      1115 |            2 |          1 | Low Spicy                  |               17 |
|            2218 |      1106 |            7 |          2 | Medium Spicy, extra cheese |               10 |


Table: OrderHeader
|   OrderID |   CustomerID |   RestaurantID |   DeliveryID | OrderDate               | Status   |   OrderAmount |
|----------:|-------------:|---------------:|-------------:|:------------------------|:---------|--------------:|
|      1106 |         1000 |           5009 |         3003 | 2018-06-12 01:45:20.000 | Success  |         42    |
|      1107 |         1001 |           5001 |         3004 | 2018-06-16 01:10:20.000 | Success  |         10    |
|      1108 |         1002 |           5003 |         3005 | 2018-06-12 07:45:20.000 | Success  |         62    |
|      1109 |         1003 |           5008 |         3006 | 2018-06-18 08:45:20.000 | Success  |         32    |
|      1110 |         1005 |           5001 |         3007 | 2018-06-25 09:30:20.000 | Success  |         46.18 |
|      1111 |         1004 |           5006 |         3008 | 2018-06-16 02:45:20.000 | Success  |         22    |
|      1112 |         1007 |           5010 |         3009 | 2018-06-11 01:47:20.000 | Success  |         54    |
|      1113 |         1008 |           5004 |         3010 | 2018-07-30 09:50:32.000 | Success  |         97.98 |
|      1114 |         1009 |           5007 |         3011 | 2018-08-30 10:10:10.000 | Success  |         28    |
|      1115 |         1006 |           5007 |         3012 | 2018-09-25 12:20:10.000 | Success  |         33    |


Table: RatingsAndReviews
|   FeedbackID |   CustomerID | RestaurantID   | FoodItemID   |   Ratings | Reviews   | FeedbackDate            |
|-------------:|-------------:|:---------------|:-------------|----------:|:----------|:------------------------|
|          100 |         1024 | 5001           |              |         4 | Good      | 2018-09-02 13:27:49.000 |
|          101 |         1135 | 5004           |              |         4 | Good      | 2018-09-07 10:35:52.000 |
|          102 |         1227 |                | 7            |         5 | Awesome   | 2018-09-23 19:37:27.000 |
|          103 |         1056 |                | 18           |         3 | Average   | 2018-09-27 17:25:39.000 |
|          104 |         1249 | 5008           |              |         4 | Good      | 2018-10-13 11:37:48.000 |
|          105 |         1189 |                | 9            |         4 | Good      | 2018-10-15 14:49:15.000 |
|          106 |         1062 | 5005           |              |         5 | Awesome   | 2018-10-24 22:57:38.000 |
|          107 |         1057 |                | 14           |         5 | Awesome   | 2018-10-29 20:14:09.000 |
|          108 |         1239 |                | 3            |         5 | Awesome   | 2018-11-07 16:51:43.000 |
|          109 |         1102 | 5002           |              |         4 | Good      | 2018-11-14 18:22:47.000 |


Table: Restaurant
|   RestaurantID | Name                     | Address               | City     | State      |   ZipCode | ContactNumber   | OperatingHours   | OperatingDays   |
|---------------:|:-------------------------|:----------------------|:---------|:-----------|----------:|:----------------|:-----------------|:----------------|
|           5000 | Chat House               | 148 Ave NE            | Bellevue | Washington |     98007 | (206)7643214    | 9AM-9PM          | Mon-Fri         |
|           5001 | Cactus                   | 350 Terry Ave NE      | Seattle  | Washington |     98105 | (206)7643344    | 9AM-11PM         | Mon-Sun         |
|           5002 | Serious Pie and Biscuits | 401 Westlake Ave N    | Seattle  | Washington |     98109 | (206)8323214    | 9AM-11PM         | Mon-Sun         |
|           5003 | The pink door            | 1919 Post Alley       | Seattle  | Washington |     98109 | (206)8123214    | 11AM-12AM        | Mon-Sun         |
|           5004 | Mediterranean Kitchen    | 103 Bellevue way      | Bellevue | Washington |     98007 | (314)7643214    | 9AM-12AM         | Mon-Sun         |
|           5005 | Taste Of India           | 121 University Way    | Seattle  | Washington |     98005 | (206)7643567    | 9AM-11PM         | Mon-Sun         |
|           5006 | Din Tai Fung             | 700 Bellevue way      | Bellevue | Washington |     98007 | (114)7643214    | 9AM-11PM         | Mon-Sun         |
|           5007 | Zig Zag Cafe             | 1501 Western Ave      | Bellevue | Washington |     98007 | (206)754214     | 9AM-9PM          | Mon-Sun         |
|           5008 | Lola                     | 2000 4th Ave Belltown | Seattle  | Washington |     98102 | (206)7323214    | 9AM-9PM          | Mon-Sun         |
|           5009 | New                      | 1519 Capital Hill     | Seattle  | Washington |     98109 | (206)2453214    | 9AM-9PM          | Mon-Sun         |

 


tables: name: Customer
data: Customer.csv
name: FoodItems
data: FoodItems.csv
name: OrderDetail
data: OrderDetail.csv
name: OrderHeader
data: OrderHeader.csv
name: RatingsAndReviews
data: RatingsAndReviews.csv
name: Restaurant
data: Restaurant.csv
label: OrderHeader
RestaurantID
Restaurant
RestaurantID
OrderHeader
CustomerID
Customer
Customerid
OrderDetail
FoodItemID
FoodItems
FoodItemID
OrderDetail
OrderID
OrderHeader
OrderID
RatingsAndReviews
CustomerID
Customer
Customerid
RatingsAndReviews
FoodItemID
FoodItems
FoodItemID
RatingsAndReviews
RestaurantID
Restaurant
RestaurantID
output: {
    "joins": [
        {
            "from_table": "OrderHeader",
            "from_column": "RestaurantID",
            "to_table": "Restaurant",
            "to_column": "RestaurantID"
        },
        {
            "from_table": "OrderHeader",
            "from_column": "CustomerID",
            "to_table": "Customer",
            "to_column": "Customerid"
        },
        {
            "from_table": "OrderDetail",
            "from_column": "FoodItemID",
            "to_table": "FoodItems",
            "to_column": "FoodItemID"
        },
        {
            "from_table": "OrderDetail",
            "from_column": "OrderID",
            "to_table": "OrderHeader",
            "to_column": "OrderID"
        },
        {
            "from_table": "RatingsAndReviews",
            "from_column": "CustomerID",
            "to_table": "Customer",
            "to_column": "Customerid"
        },
        {
            "from_table": "RatingsAndReviews",
            "from_column": "FoodItemID",
            "to_table": "FoodItems",
            "to_column": "FoodItemID"
        },
        {
            "from_table": "RatingsAndReviews",
            "from_column": "RestaurantID",
            "to_table": "Restaurant",
            "to_column": "RestaurantID"
        }
    ]
}