Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Tricky SQL
> My impression from what you wrote is that you haven't a clue about how to
join
> tables. This may not be true but it is the impression you have given to
this
> reader. Having "one starting table" makes no sense in an of itself. I
think you
> will need to post table structures and code examples for anyone to be able
to
> help you.
>
> A query should contain only those tables necessary to create the answer
set. If
> you are linking in extraneous tables either stop doing it or seriously
consider
> the fact that your schema is not properly designed.
>
> Daniel A. Morgan
>
I know how to join tables when they are designed from a RDB point of view. My current question comes from trying to help a project that is working "object oriented" - trying to store the object model into an Oracle database. The content of the tables are not used as we as "database people" are used to see them, as columns can be used for more than one purpose - f.ex. one column might hold a reference to the primary key in different tables, as the class is allowed to reference objects of more than one class.
When I wrote that there is a table (class) where they "start" the query - I meant that this is the table to which they want to compare the search criterias. Then we have to join this table with 4-5 other tables (go "through" them, to find the rows in the "result table" (yes, I know this is a bad term) - meaning table in which we find the columns that we're searching for.
The problem is that - according to the values of some of the columns, there are in some occations 4, in some 5 tables to be joined. From your answer (and the lack of other response) it seems that this is not a very common problem in the database world - maybe there is another newsgroup I shoud rather try?
Best regards,
Randi Wølner
Received on Tue Jun 19 2001 - 01:54:07 CDT