How can I normalize this data to remove the redundant tuples in the salesorderline database? I already normalized the first one, but cant seem to figure out the second. Also, are my databases already in third normal form? I believe they are, however, would like extra confirmation from most knowledgeable people.
Normalizing data with multiple products to a single ID
database-designnormalization
Related Question
- How to convert a table into second normal form
- Confusion normalizing data to 3NF and transitive dependencies
- Anomalous Updates in Normalized Database
- In which normal form is the relation R
- Is it Important to Understand Each Normal Form
- Are There Relations That Cannot Be Normalized to Second Normal Form (2NF)?
- Normalization with Two Potential Primary Keys – Best Practices
Best Answer
There is no redundancy. You have the FK back to the sales order, how many items were ordered, the per item charge and the total for the line. You are, however, missing something rather important. What item was ordered? The top line show an order of 10 somethings and the next line shows an order for 5 something elses.
Another feature you may want to add is a way to uniquely identify each order detail. There first three items are details for order number 1111. Beyond that, there is no way to differentiate one line from another. That is to say, there in no natural key.
Such detail tables create a differentiator in several ways. One way is to add an incremental value on each line. This can also be done in a couple of ways.
Another way is to use the missing field, the item part number or SKU or whatever. The advantage over a generated value is