Normalization pattern implemented in a scenario

Asked By 0 points N/A Posted on -
qa-featured

Can you please suggest a normalization pattern that can be implemented in a scenario where data have the same invoice number but different information like cost, supplier etc.?

SHARE
Best Answer by Harpe byers
Answered By 20 points N/A #106493

Normalization pattern implemented in a scenario

qa-featured

Hallo Frannie,

In this case, since the invoice number remains the same on all occasions, you will then have to use as the primary key and then use it to reference the various tables that you will have together. But then each table will have a natural key, that will have some meaning, so as each row in the tables you have can be uniquely identified.

For more information on how to normalize your tables I will refer you to the following sites, they offer detailed information especially related to your case.

http://www.phlonx.com/resources/nf3/

http://pages.cs.wisc.edu/~dbbook/openAccess/thirdEdition/solutions/ans3ed-oddonly.pdf

__

Regards
Mahesh Babu

 

 

 

Best Answer
Best Answer
Answered By 10 points N/A #106494

Normalization pattern implemented in a scenario

qa-featured

There is a primary key and concatenated primary key.

A primary key is a unique key that represents the whole row of a table/data. The concatenated primary key is two primary keys which are actually in different columns but for data normalization process they are considered one because no two rows have the same combination of these two primary keys.

Please follow this –

1. In your case, make your invoice number your primary key,

2. Choose another key as your second primary key which shall not have in any row any combination of same invoice number. e.g. take items invoiced. Now these two keys are not having any combination of these two primary keys in any row.

3. You shall arrange your table in a way it looks like normalization in attached picture.

4. You will see your results done as per the picture attached.

Related Questions