If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > Design Concept Help, Resursive References... Kinda

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-15-08, 11:56
csimpkins csimpkins is offline
Registered User
 
Join Date: Apr 2008
Posts: 1
Question Design Concept Help, Resursive References... Kinda

On and off for about a year, I've been trying to wrap my head around how to build a database structure to support what I want to do and I've about given up. I'm relatively new to database design... there must be something I'm not seeing.

Imagine the concept of Components and Parameters.
A Component can contain any number of Parameters and/or other Components.
The allowable depth of Component 'nesting' could theoretically be very large, but in reality won't be more than be 6 or 7 levels deep.

For example...

Imagine I want to store information about a Web Server (Component). The server has simple properties, such as Manufacturer, Model Number, etc which might be represented as Parameters. It also has more complex properties that might be represented by other components, such as a Network Interface Card, with their own set of parameters and/or components.

Every parameter is contained within a component. Components hold no real data themselves (other than maybe a name and type)... rather, they just act as a container for parameters and other components.

It's pretty similar to how Classes and Attributes are related to eachother in OOP.

Any insight into how I might store this kind of thing?

Last edited by csimpkins; 04-15-08 at 12:11.
Reply With Quote
  #2 (permalink)  
Old 04-15-08, 14:00
blindman blindman is offline
World Class Flame Warrior
 
Join Date: Jun 2003
Location: Ohio
Posts: 11,726
Databases like to have defined elements and relationships. You may think of this as a limitation, but actually it is their strength. Part of their job is to ensure that the data they store makes sense, and putting rule and limits on the data is how a relational database manages this.
That said, your problem can be modeled using an unconventional database technique that most seasoned DBAs avoid like the plague. Its called the Entity/Attribute/Model design.
Remember that scene in Star Wars where Yodo shows Luke the dark side of the force?
Yeah. Its kinda like that.
These days, this Jedi master encourages young padewans to use XML data instead of an EAV model, and even then only as a last resort and only to store that portion of the data which is unstructured.

Live long and prosper.
Damn. I screwed that up....
May the Force be with you. You're gonna need it.
__________________
If it's not practically useful, then it's practically useless.

blindman
www.chess.com: "sqlblindman"
Reply With Quote
  #3 (permalink)  
Old 04-15-08, 16:55
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
Entity/Attribute/Value design. Your lexdyslia is getting worse
__________________
Testimonial:
Quote:
pootle flump
ur codings are working excelent.
Reply With Quote
  #4 (permalink)  
Old 04-15-08, 16:57
m42 m42 is offline
Registered User
 
Join Date: Apr 2008
Posts: 29
How about Classes, Attributes and Instances ??
Reply With Quote
  #5 (permalink)  
Old 04-15-08, 20:20
blindman blindman is offline
World Class Flame Warrior
 
Join Date: Jun 2003
Location: Ohio
Posts: 11,726
No....

Definition: Entity/Attribute/Model
Example: Client/Address/"Claudia Schiffer"
__________________
If it's not practically useful, then it's practically useless.

blindman
www.chess.com: "sqlblindman"
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On