VilaRestal
';drop database master;--
- Local time
- Today, 23:29
- Joined
- Jun 8, 2011
- Messages
- 1,042
OK, the first and most obvious error is:
The primary key for all the lookup tables should be its autonumber ID field and that is the field that gets joined to the main tables' fields. (The autonumber is guaranteed to be unique and numbers are much more efficient in storage and indexing than text.)
And that's also true when joining a main table to another main table.
That means breaking the relationships, changing the datatype of those main tables' fields to number, and then making the joins to the lookup tables ID fields. Probably best to delete those few test records in the main tables first to make sure they won't get in the way.
Apart from that it looks like a good design. You're following good design principles in general and it looks normalized.
The primary key for all the lookup tables should be its autonumber ID field and that is the field that gets joined to the main tables' fields. (The autonumber is guaranteed to be unique and numbers are much more efficient in storage and indexing than text.)
And that's also true when joining a main table to another main table.
That means breaking the relationships, changing the datatype of those main tables' fields to number, and then making the joins to the lookup tables ID fields. Probably best to delete those few test records in the main tables first to make sure they won't get in the way.
Apart from that it looks like a good design. You're following good design principles in general and it looks normalized.