Let's assume we have following database:
Or in pseudo sql format (all columns are not null):
create table road ( id int PK ) create table item_on_road ( id int PK road_id int FK road.id position_order int UNIQUE (road_id, position_order) ) create table rock ( id int PK FK item_on_road.id size float ) // and so on
We have a
road on which we can travel in one direction.
Along the road we can find different things
item_on_road in order we encounter them
Things that we find on the road can be different, from
Now I would like to ask a questions:
Does this database design corresponds to db 1-5th normal forms? I would assume not, because we can create
item_on_roadentry without corresponding
If it doesn't corresponds 5th normal form, how to do so?
If answer to 1 question is yes, how to ensure existence of
If answer to 1 question is yes, how to ensure we can't create
signpointing to the same id?