Course Hero Logo

Tables in second normal form then you can see a list

Course Hero uses AI to attempt to automatically extract content from documents to surface to you and others so you can study better, e.g., in search results, to enrich docs, and more. This preview shows page 16 - 17 out of 100 pages.

tables in second normal form. Then, you can see a list of questions that youmight ask about some of the columns in these tables when you apply thirdnormal form.First, does the vendor information depend only on the invoice_id column?Another way to phrase this question is, "Will the information for the samevendor change from one invoice to another?" If the answer is no, the vendorinformation should be stored in a separate table. That way, can you be surethat the vendor information for each invoice for a vendor will be the same. Inaddition, you will reduce the redundancy of the data in the Invoices table. This isillustrated by the diagram in this figure that shows the accounts payable systemin third normal form. Here, a Vendors table has been added to store the informa-tion for each vendor. This table is related to the Invoices table by the vendor_idcolumn, which has been added as a foreign key to the Invoices table.Second, does the terms column depend only on the invoice_id column? Theanswer to that question depends on how this column is used. In this case, I'llassume that this column is used not only to specify the terms for each invoice,but also to specify the default terms for a vendor. Because of that, the termsinformation could be stored in both the Vendors and the Invoices tables. To avoidredundancy, however, the information related to different terms can be stored ina separate table, as illustrated by the Terms table in this figure. As you can see,the primary key of this table is an auto increment column named terms_id. Then,a foreign key column named default_terms_id has been added to the Vendorstable, and a foreign key column named terms_id has been added to the Invoicestable.Third, does the account_no column depend only on the invoice_id column?Again, that depends on how this column is used. In this case, it's used tospecify the general ledger account number for each line item, so it depends onthe invoice_id and the invoice_sequence columns. In other words, this columnshould be stored in the lnvoice_Line_Items table. In addition, each vendor has adefault account number, which should be stored in the Vendors table. Because ofthat, another table named General_Ledger_Accounts has been added to store theaccount numbers and account descriptions. Then, foreign key columns have beenadded to the Vendors and lnvoice_Line_Items tables to relate them to this table.Fourth, can the invoice_due_date column in the Invoices table and theline_item_amount column in the lnvoice_Line_Items table be derived from otherdata in the database? If so, they depend on the columns that contain that datarather than on the primary key columns. In this case, the value of theline_item_amount column can always be calculated from the item_quantityand item_unit_price columns. Because of that, this column could be omitted.

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 100 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Spring
Professor
N/A
Tags
Database normalization, Zylka Design

Newly uploaded documents

Show More

Newly uploaded documents

Show More

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture