Newbies gogolo Posted April 25, 2002 Newbies Posted April 25, 2002 Hello all. i've got 3 questions for all you out there. I'm somewhat new to FM so these might be easily answered questions. And sorry, wishes/magic genie not offered for answers. Anway: 1) I read several FM books. But none explicitly mention the fact that relationships seem to be made in the children files. Why is this done instead of making the relationships in the Parent file? E.G. the relationship btw. customer (one) to invoices (many) is created in the invoices file. This seems odd to me. Anyone know why its done like this- to confuse beginners? Odd. Seems it would be more logical to define it in the parent file.... 2)I thought one of the rules for a db to be relational is that every record MUST have a primary key. Seems FM will let you create a record w/o one. Does it use a default pk as the first record or does FM just wink at this rule? 3)I've been experimenting and found that I was able to creat a child file (invoice) w/o necessarily defining a specific parent (customer) to which it belongs. What happens to this file- is it just an orphan? How can it exist if there is no customer tied to it? Any help FM masters would be most appreciated. Cheers.
kenneth2k1 Posted April 25, 2002 Posted April 25, 2002 Hello, gogolo. 1. Perhaps I don't quite understand what you mean, but it seems to me it depends on what you consider your parent file. Consider the "Many to 1" relationship, where many items can be related to one item, you can certainly create your relationship in the "many" file. I did it, because the "many" file I considered to be my "parent file." I think the "customer to invoice" analogy is good, but may be too limiting when considering the different types of relationships. 2. You're right. Every relational database must have a primary and foreign key. And yes, FM allows you to create records without them. I think there might be two reasons for this: 1. flat files don't need them (unless youre doing a self-join) 2. The DEVELOPER should be the one to determine what the p/f. keys are, not the application. You are the one that knows what data you want to extrapolate (did I spell that right???) 3. Again, the customer/invioce analogy may be a little limiting to understand this. If you do not desire creation of related records, then uncheck "Allow creation of related records" when defining relationships. For a great explanation of relationships, check out this string: http://www.fmforums.com/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=8;t=000018;p= I hope I could be of some help. There are a great number of experienced FM users here that will be able to help you more. Ken
kenneth2k1 Posted April 25, 2002 Posted April 25, 2002 Oops, Sorry. I gave you the wrong path. Try this: http://www.fmforums.com/threads/showflat.php?Cat=&Board=UBB8&Number=1472&page=1&view=collapsed&sb=5&o=0&fpart=
Recommended Posts
This topic is 8304 days old. Please don't post here. Open a new topic instead.
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 accountSign in
Already have an account? Sign in here.
Sign In Now