April 28, 200718 yr Hello, I am trying to get the relationship thing down, and one thing I don't understand is how to keep two tables in one database, when you want to create new records for each table one at a time. One of the most often used examples when trying to explain how to build relationships between tables is that of students and classes. I understand that you'd want one table for students containing all the relevant student id (unique id #, name, address, etc.), one for classes (all relevant class info like the title, time it takes place, as well as the unique id) and a join table (like enrollment or something). Well if they are all in the same database, on different layouts (like a student layout to enter student info, a class layout to enter in new class info, and an enrollment layout to show the two merged), how do you create a new record in the class layout without creating a new record in the student layout? My initial reaction to this situation would just be to create a seperate database for students and classes, but it seems like the trend here is to put them all in the same database in different tables. I just don't see how this works, and was wondering if someone could help explain. Thank you for your time.
April 28, 200718 yr How about create a new record in the class layout ? No record will be create in the Student table, if the relationship is correctly setted.
April 28, 200718 yr Author Wouldn't that create a new record automatically in the student layout? Which would then remain empty because you never meant to create a new record there in the first place?
April 28, 200718 yr Author Wowie wowie, you're right. I just did a tutorial from filemakeradvisor. So if I understand this correctly - if there is no relationship, then all the layout parts in a database refer to just one record. If there is a relationship, with each table having its own seperate layout, then each layout holds its own records?
April 28, 200718 yr I'm not sure that I'm understand you correctly... Each layout "can" show fields of every related table ( and even unrelated if the field is a global one ! )
April 29, 200718 yr Each layout is based on a specific table occurrence. You can set the base table occurrence in the Layout->Layout Setup dialog. Only the found sets (and records) for layouts of the same table occurrence are tied together, so that changes in one are reflected in another. But the record sets for a Student layout (based on a Student TO) and a Class layout (based on a Class TO) would be independent.
Create an account or sign in to comment