databaseformsnormalizationthird-normal-form

Database 3rd Normal Form


Can somebody make sure my database is in the 3rd normal form, and if not, explain why not? I need the DB to only have 3 tables. So here it is:

Customer No. (PK)     Store No. (PK)     Sale No. (PK)
Name                  Location           Customer No. (FK)
Telephone             Revenue            Store No. (FK)
Address                                  Total
Purchases($)                             Paid
Store No.

Solution

  • Here are what your three tables should be: Table 1: Customer

    Customer No. (PK)
    Name
    Telephone
    Address
    

    then Table 2: Store

    Store no. (PK)
    Location
    

    then Table 3: Sale

    Sale No. (PK)
    Customer No (FK)
    Store No (FK)
    Total
    Paid_yes_no
    

    If you are trying to track partial payments, etc. through the Paid column, then it would be a separate table (and a much more complicated database). However, if your Paid column just indicates whether the bill has been paid or not, the above should work.

    Perhaps you need a Date field there as well?