| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Can I use an n:n relationship here?
> Now suppose that we want to query the following from the system:
> (Sorry, it's just a guess...)
> * Source, Source-type of the particular Transaction;
> * IF Source-type is File, all File-sections of that File.
> * ....
So you are saying that I should store the HTTP source (or any source)
as well as the the file and file section? This seems to make sense,
then I would eliminate the problem of not having a parent record for a
transaction.
The query above is exactly what I need, and the other queries would want to retrieve the HTTP information or whatever specific information comes in the future.
> Consider entities have the following possible attrributes:
> * Transaction (Unique ID, Source, Source-type, Date-time, ...)
> * File (Name, Date-time, Size, ...);
> * File-Section (Name, Date-time, Size, ...);
> * HTTP-Source (URL, Date-time, Size, ...);
With this model "Transaction.Source" would hold a foreign key to
whatever table the source is in? So you are saying I should eliminate
the "associative" table and add a SOURCE_TYPE table that will aid in
the query mentioned above?
This way I could add a new source by adding a new table to hold the source (ex:TB_EMAIL) and then add a row to SOURCE_TYPE, and I would be ready to go.
Thank you for providing such a well thought out answer so far.
,Sean Received on Thu Jul 18 2002 - 07:56:18 CDT
![]() |
![]() |