Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » How To » grandparent - parent - child link entity
Re: grandparent - parent - child link entity [message #2643 is a reply to message #2641] Fri, 31 December 2010 10:22 Go to previous messageGo to previous message
gpatti is currently offline  gpatti
Messages: 283
Registered: August 2008
Senior Member
Hi Tony,

I'm afraid I don't have an easy way to draw the schema so I hope the following rambling description will suffice. Please let me know if this creates additional questions.

The application will be to allow a person to create a dance routine for a given dance type from a set number of figures.

Table dance_type
- dance_type_id (PK)
- other columns

Table figure
- figure_id (PK)
- other columns

Table dance_figure (link table allowing many-many between dance_type and figure)
- dance_type_id
- figure_id

Now a new link table is introduced and relationships used to join dance_figure to itself in a many-many relationship

Table follow
- dance_type_id
- figure_id
- follow_id

Two relationships between dance_figure and follow usng figure_id and follow_id as foreign key
1 - dance_type_id and figure id as snr
2 - dance_type_id and follow_id as jnr

The concept is that a dance_type consists of a number of figures. A figure may exist in more than one dance_type (hence many-many link relationship using dance_figure).

Any figure (within a particular dance_type) can have one or more allowed following figures.

Therefore, I need to be able to able to specify for each row in dance_figure, which other figures are valid follows (it isn't allowed to mix dance_types, so dance_id as follow does not need to be included in the follow table).

In terms of the framework, I wanted to be able to navigate from the dance_type list screen to a link screen allowing the valid dance_figures to be selected (this part is easy and is complete). However, for a selected dance_figure I then want to navigate to another link screen to select the valid follows.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Delete with Cascade
Next Topic: RIGHT JOIN in LINK
Goto Forum:
  


Current Time: Wed Jun 26 09:54:52 EDT 2024

Total time taken to generate the page: 0.00920 seconds