Database Reference
In-Depth Information
You can move the tables in the Diagram View around by clicking and dragging them.
Tip
The idea is to identify the primary index keys in each table and connect them. In this sce-
nario, the Customers and InvoiceHeader tables can be connected using the CustomerID field.
The InvoiceHeader and InvoiceDetails tables can be connected using the InvoiceNumber
field.
2. Click and drag a line from the CustomerID field in the Customers table to the CustomerID
field in the InvoiceHeader table (as shown in Figure 3-7).
Figure 3-7: To create a relationship, simply click and drag a line between the fields in your tables.
3. Click and drag a line from the InvoiceNumber field in the InvoiceHeader table to the
InvoiceNumber field in the InvoiceDetails table.
At this point, your diagram looks similar to Figure 3-8. Notice Power Pivot shows a line between the
tables you just connected. In database-speak, these are referred to as joins.
The joins in Power Pivot are always one to many joins. This means that when a table is joined to
another, one of the tables has unique records with unique index numbers, while the other can have
many records where index numbers are duplicated.
A common example, shown in Figure 3-8, is the relationship between the Customers table and the
InvoiceHeader table. In the Customers table, you have a unique list of customers, each with its own
identifier. No CustomerID in that table is duplicated. The InvoiceHeader table has many rows for each
CustomerID; each customer can have many invoices.
Search WWH ::




Custom Search