Hi all,
I have some doubts about how to implement this kind of scenario:
I have a table of elements in cronological order, let's call it table A:
for every A element, I have a number of elements ordered on a progressive number.
This could be a simply one-to-many relation, where I can handle a list of all A records with related B records using a left join.
the issue is complicated ( for me, at least ) by the fact that the records related to table A can be of two different types, that have in common some fields but not others. I mean for every record A I have an ordered list of mixed records B and C.
So I'm thinking about pro and cons of three different ways to handle this problem.
1) create tables A,B, and C, with tables B and C having a field id_A containing the ID of records A they belong, and figure out how to handle a left join having oh its right side elements from two different tables
2) create tables A,B, and C, and create an intermediate table D to link table A elements with their related B and C elements, and again figure out how to handle the list of A elements with linked B and C elements.
3) create only tables A and D, where table D is a mix of the fields from tables B and C with added a fileld rec_type to handle different fields depending on the record type ( this seems to me to be the simplest solution, although not the best in term of normalization rules )
Hope it was all clear,
thanx in advance,
Giulio
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]