Re: Newbie database design

From: SerGioGio <serge.malonga_at_supelec.fr>
Date: 3 Jun 2002 02:02:55 -0700
Message-ID: <e42147c6.0206030102.123936a8_at_posting.google.com>


Hi,

The only drawback I can think of is that 'Attr_value' must be of fixed type, for example "CLOB", so I lose here the meaning of the values (at least from an SQL point of view).
For example, if an attribute is of type "Date", I cannot ask for a Message whose date is superior to a given value...

What is your opinion about that ?

SerGioGio

"Alex Petrov" <master.db_at_mail.ru> wrote in message news:<a68e4b86c6f62c3bcd376fc1c296bfec.54296_at_mygate.mailgate.org>...
> Hi,
>
> > These are the 3 Datamodels I can think of...
> > Do you know of other ones ?
>
> (the format is: Table(Attr1, Attr2, ..AttrN, ..)
> PK - primary key, IE - inversion entry)
>
> 4) MessageTrace (Msg_id (PK), Attr_id (PK), Attr_value (IE))
>
> where columns are:
>
> Msg_id - message ID,
> Attr_id - message attribute ID (number from 1 to N, where N - total
> number of attrs),
> Attr_value - the value of message attribute
>
> BENEFITS:
> * no limit to number of message attributes, any number of attributes can
> be used,
> * no Nullable columns/attributes, only acltually present attribute
> values are stored in column,
> * no Join operations are needed, ie. to select a single attribute, say
> the 2nd one
> for message with Id = 7, do
>
> SELECT Msg_id, Attr_id as 'Attribute No.', Attr_value FROM MessageTrace
> WHERE Msg_id = 7 AND Attr_id = 2 ORDER BY Attr_id ASC
>
> DRAWBACKS:
> * no such obvious are visible to me :(
>
> Hope this helps
>
> Alex Petrov
> Sys analyst,mcdba,ocp
>
> ~~~~~~~~~~~ ~~~~~~~~~~~ ~~~~~~~~~~~ ~~~~~~~~~~~
> "SerGioGio" <serge.malonga_at_supelec.fr> wrote in message
> news:e42147c6.0205310818.5520f96_at_posting.google.com
>
> > Hi !
> >
> > I need to store "Message Traces" in a RDMS. A "Message
> > Trace" is a list of "Attributes" describing a "Message". Some
> > "Attributes" can be optional.
> > ...........
Received on Mon Jun 03 2002 - 11:02:55 CEST

Original text of this message