Last doubt moved to thread: "[DAS Java] created SDO graph doubt 2"

Adriano Crestani

On 4/7/07, Adriano Crestani <[EMAIL PROTECTED]> wrote:

Another doubt:

I have the following tables on my database:

create table B (
    ID INTEGER NOT NULL PRIMARY KEY
);

create table A (
    ID INTEGER NOT NULL PRIMARY KEY,
    B_ID INTEGER,
    FOREIGN KEY (B_ID) REFERENCES B(ID)
);

OK, then I was analyzing the generated sdo graph when I execute the query
"select * from A, B;", I got something like this:

Graph1:
http://cwiki.apache.org/confluence/download/attachments/45093/das_graph.JPG

I understand the column B_ID would be considered only an integer column
when of table A when there is no B table returned on the query. However, the
B table is also returned on the query and as the B_ID column is a FK to the
table B, shouldn't the graph be like this?:

Graph2: http://cwiki.apache.org/confluence/download/attachments/45093/das+
graph+as+I+suppose+it+shoud+be.JPG

This way I think the data returned by the query would be better
represented on the graph. Maybe there is a reason for the graph to be
generated as Graph1 instead of Graph2.
What do you say guys?

Adriano Crestani

On 4/5/07, Adriano Crestani <[EMAIL PROTECTED]> wrote:
>
> Thanks kelvin ; )
>
> Adriano Crestani
>
> On 4/4/07, Kevin Williams <[EMAIL PROTECTED]> wrote:
> >
> > The RDB DAS will only populate a graph with data returned from the
> > used
> > query.  If you want a graph that contains data from related tables
> > then
> > the query provided must return that data (typically a join).  The
> > relationship tests in the test suite demonstrate this.
> > --Kevin
> >
> > Adriano Crestani wrote:
> >
> > > Let me try to explain my doubt:
> > >
> > > Lets suppose I create a select command and execute it. The returned
> > > ResultSet has an attribute that belongs to the table X and is a FK
> > to the
> > > table Y, but no Y attribute is contained in the ResultSet. The
> > > question is:
> > > does the das create, and also populate, the SDO graph only with the
> > > metadata
> > > and data contained in the ResultSet or the das also adds to the SDO
> > graph
> > > the referenced Y table and its attributes and keep doing it till
> > there
> > > is no
> > > more referenced table?
> > >
> > > I expect to be clear enough ; )
> > >
> > >
> > > Adriano Crestani
> > >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>

Reply via email to