Emphasis indcates primary key.
Prefixes
| element |
type |
| id |
unique_key |
| prefix |
varchar |
Suffixes
| element |
type |
| id |
unique_key |
| suffix |
varchar |
Publishers
| element |
type |
| id |
unique_key |
| name |
varchar |
Phones
| element |
type |
| id |
unique_key |
| country_code |
varchar |
| city_code |
varchar |
| line |
varchar |
Addresses
| element |
type |
| id |
unique_key |
| street |
varchar |
| city |
varchar |
| country |
varchar |
| zip |
varchar |
Emails
| element |
type |
| id |
unique_key |
| email |
varchar |
PhoneTypes
| element |
type |
| id |
unique_key |
| type |
varchar |
EmailTypes
| element |
type |
| id |
unique_key |
| type |
varchar |
Offices
| element |
type |
| id |
unique_key |
| title |
varchar |
TokenTypes
| element |
type |
| id |
unique_key |
| type |
varchar |
Names
Names are sacred. They shall never be modified. I do not decree what your
name is. You do. You tell me, and I make the rules bend to your will.
This is why the Names portion of this database is undergoing some
upheaval. Some people will say that it is too complicated, but I have two
design goals:
- the structure can support any type of name
- I never have to do this again
This is a tall order, I know. This is what I want, and I will not settle
for less.
I decided to compromise. Though the below schema would work, it would
turn into a SELECT nightmare. I don't really want to do that.
Names
| element |
type |
| id |
unique_key |
| order |
integer |
| type |
|
| name |
varchar |
| initial |
char |
Prefixes
| element |
type |
| id |
unique_key |
| prefix |
varchar |
Suffixes
| element |
type |
| id |
unique_key |
| suffix |
varchar |