Quote:
Originally posted by andrewst
What's so "shitty" about little tables? A lot simpler than this over-complicated "shared domains" idea I'd say.
|
Thanx for making me think again, I think I've found the resolution!!
Ok, let me explain I think my posting is too large.
You have table product groups
(ProductgroupId, productgroup)
Then you have a cross-table
(ArticleId, ProductgroupId)
The same story like above for small attributes like Status, subproduct group etc.
I've once worked with a model with a centralized picklist (like saleslogix CRM has) but I can't remember the way they did it.
I also want to keep track of history and the idea of a a centralized picklist also makes a centralized history table possible.
In advanced data-modelling they have a way to do this and I've gone through InformIt.com (have a subscription to read the online books) but can't find it.
By looking at your attributes from metadata perspective you can give them a key number.
ATT# Name
1 Productgroup
2 ArticleId
etc.
So you can store all your tiny tables into one bulk table. All small attributes can be put into one table without redundancy, their metakey is the key to access them. While typing this I see the resolution!!
(ArticleId, Productgroupmetanumber, description, etc...)
I store value 1 in productgroupmetanumber (it's a fixed field) and so I have access to the picklist.
Picklist:
ATT# Value ID
1 Household appliances P1
1 Electronics P2
17
All resulting cross-tables can be put into one cross-table without redundancy. For instance the bulk cross-table:
(ID stores the foreign key table which refers to the chosen value)
ID PICKID
A01 P1
A01 P5
CD1 P13
In this way I get rid of all small picklist tables and all cross-tables and save a huge amount of data! just by using metadata perspective
Now I have to find the way to let the user choose which fields should hold history and the same trick can be done with history by using metadata perspective.