Database design normalization help needed (5nf) Database design normalization help needed (5nf) oracle oracle

Database design normalization help needed (5nf)


I'm going to stick my neck out and say your current schema doesn't really have any eligibility for 5NF. Taking a quote from wikipedia, it says most 4NF tables already conform to 5NF:

Usage Only in rare situations does a 4NF table not conform to 5NF. These are situations in which a complex real-world constraint governing the valid combinations of attribute values in the 4NF table is not implicit in the structure of that table. If such a table is not normalized to 5NF, the burden of maintaining the logical consistency of the data within the table must be carried partly by the application responsible for insertions, deletions, and updates to it; and there is a heightened risk that the data within the table will become inconsistent. In contrast, the 5NF design excludes the possibility of such inconsistencies.

http://en.wikipedia.org/wiki/Fifth_normal_form

Perhaps the purpose is not to make your database 5NF, but to understand it's structure compared to 5NF and make an argument for why it might already be in 5NF.

Update: reading some form of consensus from the comments, it seems your design may already be in 5NF, whether it was by design or by accident from a previous normalization pass.


Disclaimer: Without knowing your business logic I could be completely wrong with some of the following suggestions.

Ok a few things I saw in your database schema.

  1. Your cost center table looks to be both a lookup and association table. So if you have a set amount of cost centers lets say 5 for instance but a 1000 users then this table will have 5000 records which all store the cost center name (this is assuming that the cost center assignment is not unique to each user). You might want to split off the user association to a separate table which has it's own PK and FKs of costcenterId and userId.
  2. You inventory table, which I assume stores amount of stock on hand for an item, should only need an onhand quantities not sure what the description is for. If the description isn't unique to each item inventory you might want to split that off into it's own lookup table and reference it in the inventory table.
  3. You are storing "lineQuantity" in the vendor table. What is this column for. It sounds like it relates to a specific order in some way (quantity of item purchased?) If so you will want to split it off into it's own table and associate it with the order not the vendor. without knowing exactly what lineQuantity is though this suggestion could be completely wrong.
  4. Last suggestion not sure if this matters for your class. You are defining all your datatypes to be CHAR(10) you might want to change these to be the actual datatypes you would use for the database.