| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Newbie database design
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.
> ...........
-- Posted via Mailgate.ORG Server - http://www.Mailgate.ORGReceived on Sat Jun 01 2002 - 20:05:42 CDT
![]() |
![]() |