Jump to content
Sign in to follow this  
Nagasaki

When to split related tables into separate databases?

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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 ! )

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use.