Using sub-tables
The user manual indicates that when using a sub-table, as soon as a data record is deleted from the Supertable, all linked data in the sub-table is deleted as well. But what if that same data exisits in more than one record in the Supertable? Will it still delete the associated record from the sub-table?
Ex: The Artists sub-table is linked to the Music Supertable which contains three albums by the same artist. If I delete just one of the three albums from the Supertable (leaving two remaining records referencing the same artist) will that artist remain a part the sub-table because there are two remaining references or will it delete that artist completely?
1 reply
-
HI DH -
A linked table is not necessarily a "sub" table. If you didn't set Composition to Yes on the sub table then it is not a sub. The tables are now just linked.
What they are saying is if you have a Parent/Child relationship. If you delete the Parent record then it will delete all records in the Child table that link to the now deleted Parent record.
You could make your albums table a subtable/child of Artists. One way to think about table relationships, if a record in a table couldn't exist without the existance of a record in the other table then the first table is a child of the second. You could say an album wouldn't exist without the artist, and an artist can make many records so there is natural 1:Many relationship as well. How you handle multiple artists is another discussion.
Good luck.
Content aside
- 3 yrs agoLast active
- 1Replies
- 215Views