There is probably a good approach to this but I need some help. For many years, I have maintained sets in Alpha 5 linking them on a "set of fields" rather than just using the SQL approach of using a primary key as an incremental value, and then linking child tables to that table using the primary key as the foreign key in a child file. I want like to give this approach a try now working with my existing table structure.
My parent table contains roughly 1750 records. My first child has over 2000 records and there is a one to many relationship currently. Obviously many parent records only have 1 child in this example. They parent and child each have a field in their tables in the database that gets maintained with field rules: (UT(NEW_NAME)+"-"+UT(PROD_CODE)). I enter New_Name and Prod_Code in a form in the parent.
All I did so far is to create a new field called ID in the parent table and I set it to a number and caused it to auto increment. I haven't done anything in my child table yet. So, I believe I need to do an update to assign ID numbers to my ID field. Then, the trick would be to create a foreign key field in the child, and insert the parent's ID as a foreign key in the child table. To this, I would anticipate using the linking methodology described above.
This is just one example of what I would need to do at this point. Once I understand the process, I hopefully can duplicate it in other cases for the same database.
Thanks in advance for getting me started.
Bruce
My parent table contains roughly 1750 records. My first child has over 2000 records and there is a one to many relationship currently. Obviously many parent records only have 1 child in this example. They parent and child each have a field in their tables in the database that gets maintained with field rules: (UT(NEW_NAME)+"-"+UT(PROD_CODE)). I enter New_Name and Prod_Code in a form in the parent.
All I did so far is to create a new field called ID in the parent table and I set it to a number and caused it to auto increment. I haven't done anything in my child table yet. So, I believe I need to do an update to assign ID numbers to my ID field. Then, the trick would be to create a foreign key field in the child, and insert the parent's ID as a foreign key in the child table. To this, I would anticipate using the linking methodology described above.
This is just one example of what I would need to do at this point. Once I understand the process, I hopefully can duplicate it in other cases for the same database.
Thanks in advance for getting me started.
Bruce
Comment