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: Minimum units
|   Minimum units |
|----------------:|
|             150 |


Table: tblCentre
|   CentreId | CentreName                   |   TownId |   CentreTypeId | PostCode   |   SquareMetres |   NumberUnits |
|-----------:|:-----------------------------|---------:|---------------:|:-----------|---------------:|--------------:|
|          1 | Pavilion Shopping Centre     |      180 |              3 | EN8 7BZ    |          15143 |            62 |
|          2 | Times Square Shopping Centre |      170 |              3 | SM1 1LF    |          15143 |            71 |
|          4 | Norman Park                  |        9 |              3 | CB3 8EL    |          15228 |            11 |
|          7 | Cannon Park Shopping Centre  |       48 |              3 | CV4 7EH    |          15329 |            36 |
|         12 | Kingsmead Shopping Centre    |       69 |              3 | GU14 7SJ   |          15515 |            69 |
|         13 | Market Quay                  |       68 |              3 | PO16       |          15515 |             0 |
|         19 | Old George Mall              |      148 |              3 | SP1 2NH    |          15794 |            37 |
|         20 | The Nicholson's Centre       |      113 |              3 | SL6 1LB    |          15794 |            64 |
|         25 | The Longford Shopping Centre |       70 |              3 | TW13 4BH   |          15979 |            85 |
|         26 | Southgate Shopping Centre    |       15 |              3 | BA1 1TQ    |          16072 |            34 |


Table: tblCentreType
|   CentreTypeId | CentreTypeName   |
|---------------:|:-----------------|
|              1 | Factory Outlet   |
|              2 | Retail Park      |
|              3 | Shopping Centre  |
|              4 | Shopping Park    |


Table: tblFamily
|   FamilyId | FamilyName   |
|-----------:|:-------------|
|          1 | Reptile      |
|          2 | Fish         |
|          3 | Bird         |
|          4 | Amphibian    |
|          5 | Mammal       |
|          6 | Insect       |


Table: tblProduct
|   ProductId | ProductName   | Animal    |   HabitatId |   Legs |   FamilyId |
|------------:|:--------------|:----------|------------:|-------:|-----------:|
|           1 | Sammy         | Snake     |           1 |      0 |          1 |
|           2 | Pokyo         | Penguin   |           4 |      2 |          3 |
|           3 | Fenella       | Frog      |           3 |      4 |          4 |
|           4 | Layla         | Lemur     |           2 |      2 |          5 |
|           5 | Dave          | Dachsund  |           1 |      4 |          5 |
|           6 | Kylie         | Camel     |           5 |      4 |          5 |
|           7 | Jeremy        | Jackdaw   |           7 |      2 |          3 |
|           8 | Faye          | Fox       |           6 |      4 |          5 |
|           9 | Oliver        | Owl       |           7 |      2 |          3 |
|          10 | Cleopatra     | Clownfish |           4 |      0 |          2 |


Table: tblPurchase
|   PurchaseId | PurchaseDate            | PurchaseDateTime        |   ProductId |   CentreId |   Quantity |   Price | PaymentDate   |   tblCentre.NumberUnits |
|-------------:|:------------------------|:------------------------|------------:|-----------:|-----------:|--------:|:--------------|------------------------:|
|        16331 | 2012-01-09 00:00:00.000 | 2012-01-09 16:39:00.000 |           1 |        385 |          2 |     8.5 |               |                     219 |
|        16703 | 2012-01-10 00:00:00.000 | 2012-01-10 10:36:00.000 |           1 |        365 |          2 |     8.5 |               |                     155 |
|        16922 | 2012-01-12 00:00:00.000 | 2012-01-12 16:52:00.000 |           1 |        381 |          2 |     8.5 |               |                     310 |
|        18094 | 2012-01-20 00:00:00.000 | 2012-01-20 14:40:00.000 |           1 |        382 |          2 |     8.5 |               |                     278 |
|        18334 | 2012-01-23 00:00:00.000 | 2012-01-23 17:31:00.000 |           1 |        386 |          2 |     8.5 |               |                     334 |
|        18451 | 2012-01-24 00:00:00.000 | 2012-01-24 18:10:00.000 |           1 |        350 |          2 |     8.5 |               |                     155 |
|        18557 | 2012-01-25 00:00:00.000 | 2012-01-25 13:11:00.000 |           1 |        383 |          2 |     8.5 |               |                     285 |
|        19027 | 2012-01-30 00:00:00.000 | 2012-01-30 18:24:00.000 |           1 |        383 |          2 |     8.5 |               |                     285 |
|        19289 | 2012-02-01 00:00:00.000 | 2012-02-01 17:41:00.000 |           1 |        379 |          2 |     8.5 |               |                     225 |
|        19753 | 2012-02-06 00:00:00.000 | 2012-02-06 15:02:00.000 |           1 |        384 |          2 |     8.5 |               |                     324 |


Table: tblRegion
|   RegionId | RegionName             |
|-----------:|:-----------------------|
|          1 | East Anglia            |
|          2 | East Midlands          |
|          3 | London                 |
|          4 | North                  |
|          5 | North West             |
|          6 | South East             |
|          7 | South West             |
|          8 | West Midlands          |
|          9 | Yorkshire & Humberside |


Table: tblTown
|   TownId | TownName          |   RegionId |
|---------:|:------------------|-----------:|
|        1 | Aintree           |          5 |
|        2 | Aldershot         |          6 |
|        3 | Altrincham        |          5 |
|        4 | Andover           |          6 |
|        5 | Ashford           |          6 |
|        6 | Ashton Under Lyne |          5 |
|        7 | Aylesbury         |          6 |
|        8 | Banbury           |          6 |
|        9 | Barhill           |          1 |
|       10 | Barking           |          3 |

 


tables: name: Minimum units
data: Minimum units.csv
name: tblCentre
data: tblCentre.csv
name: tblCentreType
data: tblCentreType.csv
name: tblFamily
data: tblFamily.csv
name: tblProduct
data: tblProduct.csv
name: tblPurchase
data: tblPurchase.csv
name: tblRegion
data: tblRegion.csv
name: tblTown
data: tblTown.csv
label: tblTown
RegionId
tblRegion
RegionId
tblCentre
TownId
tblTown
TownId
tblProduct
FamilyId
tblFamily
FamilyId
tblPurchase
CentreId
tblCentre
CentreId
tblPurchase
ProductId
tblProduct
ProductId
tblCentre
CentreTypeId
tblCentreType
CentreTypeId
output: {
    "joins": [
        {
            "from_table": "tblTown",
            "from_column": "RegionId",
            "to_table": "tblRegion",
            "to_column": "RegionId"
        },
        {
            "from_table": "tblCentre",
            "from_column": "TownId",
            "to_table": "tblTown",
            "to_column": "TownId"
        },
        {
            "from_table": "tblProduct",
            "from_column": "FamilyId",
            "to_table": "tblFamily",
            "to_column": "FamilyId"
        },
        {
            "from_table": "tblPurchase",
            "from_column": "CentreId",
            "to_table": "tblCentre",
            "to_column": "CentreId"
        },
        {
            "from_table": "tblPurchase",
            "from_column": "ProductId",
            "to_table": "tblProduct",
            "to_column": "ProductId"
        },
        {
            "from_table": "tblCentre",
            "from_column": "CentreTypeId",
            "to_table": "tblCentreType",
            "to_column": "CentreTypeId"
        }
    ]
}