parent, child, grandchild schema

R

r

I have a database with tables as follows

FILM
* filmID
FilmTitle
FilmLength

FILMKEYWORD
*filmID
*keywordID

KEYWORD
*keywordID
*Keyword

* denotes primary key
Keywords are simply text descriptors for use by a search engine. Films can
have multiple keyword associations.

----------

I am trying to build an interface which would display all three tables in
datagrids.

As the user moves through the items in the FILM (parent) grid, the
FILMKEYWORD grid should track the filmID to filmID relation defined in the
dataset schema to display the associated filmID keywordID rows in the
FILMKEYWORD (child) grid. (this part is actually working!)

The KEYWORD (grandchild) grid should track the keywordID keywordID relation
in the schema so that clicks on the FILMKEYWORD grid display the
corresponding keywords.

------------

I followed a nice walkthrough I found to get the parent/child part of the
system to work but the keyword (grandchild) grid doesn't display the keyword
when I click in the filmkeyword grid although it shows the column names in
the fixed row at the top.

I'm also wondering; when I define the keywordID to KeywordID (grandchild)
relation in the dataset schema between FILMKEYWORD and KEYWORD, the
relationship dialog box will not enable the OK button unless I choose field
associations for both keys in the FILMKEYWORD compound-primary-key though
only the keywordID actually relates to the foreign key, keywordID, in the
KEYWORD table.
To fix this, I removed the primary keys in the FILMKEYWORD schema and
redefined just keywordID as the primary.
This allowed me to define the relationship but I'm thinking it will cause
trouble when update time comes.

Also, the FILMKEYWORD/KEYWORD relationship doesn't show up as an option in
the grid datamember property like the FILM/FILMKEYWORD relationship did.
This is probably why the keyword grid won't track the relationship (doh!)

I hate to whine but I can't be the only nerd trying to do this and it
shouldn't be this hard!

Is there a walthrough tutorial for a parent child grandchild system like
this somewhere?
Tips and hints are welcome!

Thanks,
Roger
 
R

r

actually the FILMKEYWORD/KEYWORD relationship did show up as an option of
the keyword datagrid's datamember property. I set it but it still doesn't
work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top