August 9, 2008 at 2:38 am
my idea is to create at table with AttributeCategories, Attributes, AttributeValues and AttributeForm.
Attribute Category my have the information like 'Demographics', 'School Information', 'Contact Information', etc with its Own Unique ID.
Attribute may have values like AttributeCategoryID with AttributeName, Its Data type (varchar, int) and data length with its Own Unique ID.
Now you can add as many attributes under each Attribute Category.
AttributeForm may have its own Unique ID with Form Name.
The Attributes may be mapped with Each Form to get the values on the against the specific form. This can be done in another table, say FormAttribute.
Now AttributeValue Table may have ID from table FormAttribute. And Values can be saved in nvarchar format in AttributeValue table.
Each Attribute will have unique value against each Form.
You can save any information using above logic. Even Lists and other datatypes can also be included and implemented in this strategy. But it will be too complex to explain in here...
How about that...?
Atif Sheikh
August 9, 2008 at 7:15 pm
CREATE TABLE #MyHead....
--Jeff Moden
Change is inevitable... Change for the better is not.
August 9, 2008 at 8:35 pm
Atif Sheikh (8/9/2008)
my idea is to create at table with AttributeCategories, Attributes, AttributeValues and AttributeForm.Attribute Category my have the information like 'Demographics', 'School Information', 'Contact Information', etc with its Own Unique ID.
Attribute may have values like AttributeCategoryID with AttributeName, Its Data type (varchar, int) and data length with its Own Unique ID.
Now you can add as many attributes under each Attribute Category.
AttributeForm may have its own Unique ID with Form Name.
The Attributes may be mapped with Each Form to get the values on the against the specific form. This can be done in another table, say FormAttribute.
Now AttributeValue Table may have ID from table FormAttribute. And Values can be saved in nvarchar format in AttributeValue table.
Each Attribute will have unique value against each Form.
You can save any information using above logic. Even Lists and other datatypes can also be included and implemented in this strategy. But it will be too complex to explain in here...
How about that...?
Atif Sheikh
please don't tell me the brain uses EAV. if that's true I hope I get reincarnated as a jellyfish.
---------------------------------------
elsasoft.org
August 14, 2008 at 2:24 pm
My dad claims he has infinite-capacity, instantaneous, write-only storage in his brain.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
August 14, 2008 at 10:42 pm
sure. some call it /dev/null
or simply a black hole.
π
---------------------------------------
elsasoft.org
August 15, 2008 at 8:39 am
I'm afraid mine has no foreign key constraints. Helps with creativity and problem solving and spews out some hillarious "stream-of-consiousness" conversations. Well, at least I think they're hillarious, and that's what matters, right? π
I'll be back after I finish running DBCC CHECKBRAIN
Chad
August 17, 2008 at 5:34 am
Chad Crawford (8/15/2008)
I'll be back after I finish running DBCC CHECKBRAIN
Chad
This one runs nightly, sometimes with irritating sound effects.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
Viewing 7 posts - 16 through 21 (of 21 total)
You must be logged in to reply to this topic. Login to reply