I have the following tables in my database:
Person
Person_ID (PK)
Name
Company_ID(FK)
Phone
Email
Company
Company_ID (PK)
Name
Address
City
State
Invoice_ID (FK)
Invoice
Invoice_ID (PK)
Summary_ID (FK)
Detailed_ID (FK)
Summary_Section
Summary_ID (PK)
InvoiceNumber
Date
DueDate
Detailed_Section
Detailed_ID (PK)
Person_ID (FK)
Amount
Info
Each company has multiple people and receives one invoice.
Each invoice is broken into two sections.
The Summary section shows the company name, company address, invoice number, invoice date, & due date.
The Detailed section shows the person's name, amount, & additional info.
Is this correct?
How should I go about this?
Am I assigning the foreign and primary keys correctly?
The PK/FK assignment seems to be ok. Although I would suggest the following: