Jump to content

maybe Cap'n Kurt will help me once more?


axis

This topic is 8274 days old. Please don't post here. Open a new topic instead.

Recommended Posts

i've got two files: one of people, one of computers.

no problem causing the (as in "one") computer's information to show up in the master file -people is the master.

i have laid out the related fields in my layouts/report.

my problem is: (and i guess there are several "looks", but i just need one good example)... how should i relate and put/insert the related fields in the case of one person having several computers.

(i guess this like a one-to-many, no?) i can't believe that of all these books i've got they only have either only 2 files, which i can do or they have a whole bunch. i really really need rthat intermediary step GIVEN to me.

./rant if anyone wants to send me any files please do: g e t 8 6 a t m a c d o t c o m.

i tried to upload my files to a site but the net was so messed up around here.

thanks very much.

Mac OS X, FMP 5.5

Link to comment
Share on other sites

so besides the personal information (in the master file) -you say i should a portal in the master for all the computer records to be shown that are associated/related to that person?

how do you suggest to relate the records, since more than one computer record may be related to one person?

Thank you.

(p.s. i'd like to *study* [not do yet] repeating fields too, if that is a way to get more than one ralationship from multiple records to show in the same field of a master file.)

Link to comment
Share on other sites

***DO NOT EVEN TRY USING REPEATING FIELDS***

They are a hold over from earlier version of FMP and are NOT used in relational databases!

Here is a simplified version of you system:

People.fp5

PersonID_key

Name

Address

Computer.fp5

ComputerID_key

PersonID_fkey

Type

OS

RAM

Notice that the two files both contain the PersonID field? This is how the files are related. They only need to share that one field to make the whole relational database theory work.

A portal in the People file into the Computer file via the PersonID will show all the computers for that person.

Link to comment
Share on other sites

tthank you very much.

i notice that you don't include the computerID as the foreign_key in the person file? am i corect in assuming that that relationship must be made (lest that becomes a key of no use, correct?)?

i'm still at somewhat of a lose as to how a bunch of computer records appear in a portal -i know how a portal works- i'm just not clear on the above question and also on what fields i would put in the portal?

_________________________________________________

i have a name field in the person file -is there a way to tie that in with the personID field, e.g., when ever i add a record the personID field for the new record will automatically be filled in with the next available number?

thanks for following up.

[ September 22, 2001: Message edited by: axis ]

Link to comment
Share on other sites

Every record type (Person, Computer, etc) should have a UNIQUE identifier, even if you do not think it will be used right now. ComputerID does not belong in the Person file at all.

There is a one-to-many relationship between Person and Computer, that is one person can have many computers.

For setting up IDs see my article on IDs at http://www.fmforums.com/ubb/cgi-bin/ultimatebb.cgi?ubb=get_topic&f=8&t=000018

Link to comment
Share on other sites

This topic is 8274 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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