I'm making some assumptions from just looking at your metadata without any data examples, but on first glance it appears that your schema for the most part is normalized. Technically speaking your table is 3NF (which should be your target) if it meets all of the following standards:
- It is also 1NF - Each entry only contains atomic data (or a single piece of info)
- It is also 2NF - No candidate key dependency meaning that when you have have a composite primary key (a key made up of more than one column) that all data is dependent on the entire key
- It is 3NF - No transitive dependency meaning all data is only dependent on the primary key and not some other column in the table
Note that there are also higher normalized forms but they are mostly academic as you begin experiencing performance degradation the more you normalize
Given this definition:
Warehouse
appears 3NF assuming that each warehouse can only have one Type
. If not then you would be failing the transitive dependency and would need to move Type
information to a new table.
Item
too appears 3NF assuming only one Type
can be assigned
Type
appears to contain redundant data and should be removed unless of course you have a many-to-many
relationship between Type
and Warehouse
and/or Item
. In that case, you would want to introduce a bridge-entity
(aka composite entry
) between Type
and Warehouse
or Item
to create two 1-to-many
relationships.
- Lastly, if I'm reading this correctly,
WarehouseItem
appears to be a bridge-entity between Warehouse
and Item
to break up the many-to-many
relationship between them. If this is correct, you should be able to argue that this table is 3NF assuming the combination of Warehouse
and Item
represent a composite key
.
So assuming I interpreted your schema correctly, once you eliminate the redundant Type
table, then yes I would say this setup technically meets 3NF. Note that your requirement that
given that a Warehouse only holds Items with of specific Type
may require you introduce a new type field which will mean you need to reevaluate your normalization of that table. If you have two distinct types (a WarehouseType
and an ItemType
) then you may need to keep that Type
table after all and turn it into a mapping table between those two new fields. But I'd need to see data examples to better evaluate.