dbTalk Databases Forums  

Data model design issue

comp.databases comp.databases


Discuss Data model design issue in the comp.databases forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
LC
 
Posts: n/a

Default Data model design issue - 11-18-2006 , 09:59 AM






Hi,
I have the following issue (I hope I post the right group):
I'm thinking to write a tool for Interface Requirement Specification
(IRS).
Then I'm wondering about the db data model.
I identified the following entities:
-System
-Interface (between systems, interface have directions)
-Message
-Datafield
I then identified the following relations:
A system can have zero or more interface.
An interface can have zero or more message.
A message can have zero or more datafield with an ordered position.
A datafield can be a simple one (like integer, float, etc) or composed
by other datafield.

The following is a first raw sketch I thought:
SYSTEM_SCHEMA={IDsys, Name, Desc}
INTERFACE_SCHEMA={IDitf, Name, IDsysSource, IDsysDest, Desc}
MESSAGE_SCHEMA={IDmes, IDitf, Name, Description}
FIELDOFMESSAGE_SCHEMA={IDfom, IDmes, Position, IDtyp, Name, Desc}
TYPE_SCHEMA={IDtyp, Name, isNative, Desc}

The "isNative" flag identifies simple type from composed type.

I'd appreciate comments and suggestion about that.

Thanks in advance for the interest.

LC


Reply With Quote
  #2  
Old   
Neo
 
Posts: n/a

Default Re: Data model design issue - 11-18-2006 , 10:33 AM






Quote:
A system can have zero or more interface.
An interface can have zero or more message.
A message can have zero or more datafield with an ordered position.
A datafield can be a simple one (like integer, float, etc) or composed
by other datafield.
Then I'm wondering about the db data model.
Are you wanting your data to describe sample data shown below?
If so, I think your schema is appropriate.

System1
Interface1
Interface2
Msg1
Msg2
Field1 (simple)
Field2 (simple)
Field3 (complex)
Field100 (simple)
Field101 (simple)
Field102 (complex)
Field200 (simple)
Field201 (siimple)



Reply With Quote
  #3  
Old   
Neo
 
Posts: n/a

Default Re: Data model design issue - 11-18-2006 , 11:29 AM



To handle the sample data in prior post, your schema might look like
this:

T_System
T_Interface
T_Msg
T_Field (... isNative? ...);
T_ParChildField

Managing fields which can be composed of fields could become
interesting.


Reply With Quote
  #4  
Old   
Ed Prochak
 
Posts: n/a

Default Re: Data model design issue - 11-20-2006 , 07:37 AM




LC wrote:
Quote:
Hi,
I have the following issue (I hope I post the right group):
I'm thinking to write a tool for Interface Requirement Specification
(IRS).
Then I'm wondering about the db data model.
I identified the following entities:
-System
-Interface (between systems, interface have directions)
-Message
-Datafield
I then identified the following relations:
A system can have zero or more interface.
An interface can have zero or more message.
A message can have zero or more datafield with an ordered position.
A datafield can be a simple one (like integer, float, etc) or composed
by other datafield.

The following is a first raw sketch I thought:
SYSTEM_SCHEMA={IDsys, Name, Desc}
INTERFACE_SCHEMA={IDitf, Name, IDsysSource, IDsysDest, Desc}
MESSAGE_SCHEMA={IDmes, IDitf, Name, Description}
FIELDOFMESSAGE_SCHEMA={IDfom, IDmes, Position, IDtyp, Name, Desc}
TYPE_SCHEMA={IDtyp, Name, isNative, Desc}
The ID attributes shows you are thinking of TABLES too early in the
design process. Try to avoid that. You may end up using ID's later, but
that's a physical design issue, not a logical design issue.
Quote:
The "isNative" flag identifies simple type from composed type.

I'd appreciate comments and suggestion about that.

Thanks in advance for the interest.

LC

Now since this has a lot of the character of a language, consider a
slightly reversed view of messages:
-- a message is a set of fields where each field is a fundamental
type or another message.

Your fields entity would still need the type attribute. But this
recursive definition simplifies the description of composite fields.
Then you only need one more field type. And this follows the way
progrmmers would develop these messages.


Another high level issue: are messages allowed to have optional fields?
how yould you document that? Once you allow optional fields, then
there arise the conflicting options. So what if optional field B should
not be included if field A is included? just more things to consider.

Ed



Reply With Quote
Reply




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.