Welcome Guest, Not a member yet? Register   Sign In
all ideas welcome... interesting db foreign keys question - hierarchy database stuff
#5

[eluser]september28[/eluser]
Ok guys,

I have just come up with a possible alternative... all suggestions welcome as ever!

I could create a table called link_groups and another one called link_lists or something like that.

the explanations table would be modified:
id, explanation, link_group_id, added_by, created_date etc... - the important thing to note here is the addition of the link_group_id field. If the record is not part of a link group, then link_group_id is NULL.

Now link_groups table has essentially 2 fields:
id, created_date.

link_lists has these fields:
id, link_groups_id, explanation_id

so basically each time a link is created between 2 different explanations, this happens:
(to create a link, the user specifies the 2 explanations to be linked, thus creating the variables $first_explanation_id and $second_explanation_id

later i will post up a flow diagram of what i intend to do because typing it out seems to cause more confusion.

It would be interesting to know how online dictionaries deal with synonyms...

Cheers,
Dan


Messages In This Thread
all ideas welcome... interesting db foreign keys question - hierarchy database stuff - by El Forum - 05-07-2009, 11:27 AM



Theme © iAndrew 2016 - Forum software by © MyBB