dbTalk Databases Forums  

One-to-many relationships

comp.databases.filemaker comp.databases.filemaker


Discuss One-to-many relationships in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mushabab
 
Posts: n/a

Default One-to-many relationships - 12-04-2010 , 08:03 AM






Hello

Would you please comment about the best way to have one-to-many
relationships either tables in the same file , a new file or joint
file ?

Thanks !

Mushabab Al-Murayeh, MD

Reply With Quote
  #2  
Old   
Bill
 
Posts: n/a

Default Re: One-to-many relationships - 12-04-2010 , 09:56 AM






In article
<d0e18eba-077a-48ed-9170-0227ebc135bf (AT) 22g2000prx (DOT) googlegroups.com>,
Mushabab <malmurayeh (AT) saudimedicine (DOT) net> wrote:

Quote:
Hello

Would you please comment about the best way to have one-to-many
relationships either tables in the same file , a new file or joint
file ?

Thanks !

Mushabab Al-Murayeh, MD
This is basic stuff.

Need fields in both tables to hold the relationship keys.

Each table in a database should have a primary key field that can be
used for relationships to other tables. The value of the primary key
field should be assigned automatically by the database on record
creation, must be unique, and not editable by the user. Normally the
primary key field is defined as a number field, value option set to
serial number, and validation set not empty, strict numerical, unique,
validate always, do not allow user override.

The other table would have a foreign key field to hold the value of the
primary key of the first table.

The two are connected in the relationship diagram, primary key field of
the first table equal to foreign key field of the second table.

This relates one record in the first table to many records in the second
table.

The FileMaker Help file discusses all this and there are white papers on
the FileMaker web site about database design, as well as the FileMaker
Training Series. Except for the latter (FileMaker Training Series) these
are all available at no charge.

--
Bill Collins
FileMaker 11 Certified Developer

Reply With Quote
  #3  
Old   
Mushabab
 
Posts: n/a

Default Re: One-to-many relationships - 12-05-2010 , 06:13 AM



On Dec 4, 6:56*pm, Bill <bbcoll... (AT) earthlink (DOT) net> wrote:
Quote:
In article
d0e18eba-077a-48ed-9170-0227ebc13... (AT) 22g2000prx (DOT) googlegroups.com>,

*Mushabab <malmura... (AT) saudimedicine (DOT) net> wrote:
Hello

Would you please comment about the best way to have one-to-many
relationships either tables in the same file , a new file or joint
file ?

Thanks !

Mushabab Al-Murayeh, MD

This is basic stuff.

Need fields in both tables to hold the relationship keys.

.
..
..
..
..
..
Quote:
--
Bill Collins
FileMaker 11 Certified Developer
Thank you Bill for your reply. As you said "This is basic stuff" ,
where I have been intermittently building some databases with FM since
2001 ! and still want to learn more this why I asked this question
which you have been kind to answer PART of it and still waiting for
the rest of the answer

Thanks!

Mushabab


--
__________________________________________________ ____________
Mushabab Ayedh Al-Murayeh, MBBS(hon.), FRCPC, FACC
Consultant, Cardiovascular Diseases and Internal Medicine
Head, Cardiology Department
Armed Forces Hospital Southern Region,
Khamis Mushayt
P.O. Box 101
Saudi Arabia

e-mail: malmurayeh (AT) saudimedicine (DOT) net
http://www.saudimedicine.net

(Tel. )+966 7 250 0001 E 2504/2860
(Fax )+966 7 250 0001 E 2535/2538

Reply With Quote
  #4  
Old   
Bill
 
Posts: n/a

Default Re: One-to-many relationships - 12-05-2010 , 08:11 AM



In article
<9bef1573-4770-40df-bb50-26d18667932e (AT) k38g2000vbc (DOT) googlegroups.com>,
Mushabab <malmurayeh (AT) saudimedicine (DOT) net> wrote:

Quote:
On Dec 4, 6:56*pm, Bill <bbcoll... (AT) earthlink (DOT) net> wrote:
In article
d0e18eba-077a-48ed-9170-0227ebc13... (AT) 22g2000prx (DOT) googlegroups.com>,

*Mushabab <malmura... (AT) saudimedicine (DOT) net> wrote:
Hello

Would you please comment about the best way to have one-to-many
relationships either tables in the same file , a new file or joint
file ?

Thanks !

Mushabab Al-Murayeh, MD

This is basic stuff.

Need fields in both tables to hold the relationship keys.

.
.
.
.
.
.
--
Bill Collins
FileMaker 11 Certified Developer

Thank you Bill for your reply. As you said "This is basic stuff" ,
where I have been intermittently building some databases with FM since
2001 ! and still want to learn more this why I asked this question
which you have been kind to answer PART of it and still waiting for
the rest of the answer

Thanks!

Mushabab


--

Mushabab Ayedh Al-Murayeh, MBBS(hon.), FRCPC, FACC
Consultant, Cardiovascular Diseases and Internal Medicine
Head, Cardiology Department
Armed Forces Hospital Southern Region,
Khamis Mushayt
P.O. Box 101
Saudi Arabia

e-mail: malmurayeh (AT) saudimedicine (DOT) net
http://www.saudimedicine.net

(Tel. )+966 7 250 0001 E 2504/2860
(Fax )+966 7 250 0001 E 2535/2538
What version of FileMaker are you using? Details of building
relationships are different in versions before FileMaker 7 and from
FileMaker 7 on.

--
Bill Collins
FileMaker 11 Certified Developer

Reply With Quote
  #5  
Old   
Mushabab
 
Posts: n/a

Default Re: One-to-many relationships - 12-05-2010 , 10:31 AM



On Dec 5, 5:11*pm, Bill <bbcoll... (AT) earthlink (DOT) net> wrote:
Quote:
In article
9bef1573-4770-40df-bb50-26d186679... (AT) k38g2000vbc (DOT) googlegroups.com>,





*Mushabab <malmura... (AT) saudimedicine (DOT) net> wrote:
On Dec 4, 6:56 pm, Bill <bbcoll... (AT) earthlink (DOT) net> wrote:
In article
d0e18eba-077a-48ed-9170-0227ebc13... (AT) 22g2000prx (DOT) googlegroups.com>,

Mushabab <malmura... (AT) saudimedicine (DOT) net> wrote:
Hello

Would you please comment about the best way to have one-to-many
relationships either tables in the same file , a new file or joint
file ?

Thanks !

Mushabab Al-Murayeh, MD

This is basic stuff.

Need fields in both tables to hold the relationship keys.

.
.
.
.
.
.
--
Bill Collins
FileMaker 11 Certified Developer

Thank you Bill for your reply. As you said "This is basic stuff" ,
where I have been intermittently building some databases with FM since
2001 ! and still want to learn more this why I asked this question
which you have been kind to answer PART of it and still waiting for
the rest of the answer

Thanks!

Mushabab

--

Mushabab Ayedh Al-Murayeh, MBBS(hon.), FRCPC, FACC
Consultant, Cardiovascular Diseases and Internal Medicine
Head, Cardiology Department
Armed Forces Hospital Southern Region,
Khamis Mushayt
P.O. Box 101
Saudi Arabia

e-mail: malmura... (AT) saudimedicine (DOT) net
http://www.saudimedicine.net

(Tel. )+966 7 250 0001 E 2504/2860
(Fax )+966 7 250 0001 E 2535/2538

What version of FileMaker are you using? Details of building
relationships are different in versions before FileMaker 7 and from
FileMaker 7 on.

--
Bill Collins
FileMaker 11 Certified Developer- Hide quoted text -

- Show quoted text -
FM 11 Pro advanced

MA

Reply With Quote
  #6  
Old   
Your Name
 
Posts: n/a

Default Re: One-to-many relationships - 12-05-2010 , 02:10 PM



"Mushabab" <malmurayeh (AT) saudimedicine (DOT) net> wrote

Quote:
Thank you Bill for your reply. As you said "This is basic stuff" ,
where I have been intermittently building some databases with FM since
2001 ! and still want to learn more this why I asked this question
which you have been kind to answer PART of it and still waiting for
the rest of the answer
Whether you put related tables in the same file or in separate files is
largely a matter of personal choice. It makes little real difference to
FileMaker itself.

Storing tables in one file makes it easy to move the database to another
computer and keep track of what belongs together, but it can also make huge
files if you have LOTS of records or are storing graphics within the
database file.

If newer versions of FileMaker don't resave files when quitting when there
have been no changes, then storing tables in separate files may make it
easier / quicker for incremental backup systems like the Mac's Time Machine
since it won't bother re-backing up a file / table that hasn't changed.

Reply With Quote
  #7  
Old   
Philippe Manet
 
Posts: n/a

Default Re: One-to-many relationships - 12-05-2010 , 07:00 PM



Mushabab <malmurayeh (AT) saudimedicine (DOT) net> wrote:

Quote:
still want to learn more this why I asked this question
which you have been kind to answer PART of it and still waiting for
the rest of the answer
you may have to think about 2 features :
- allow creation of records via the relationship
- delete related record when...

thoses features are very good things typical of the FMP way, but can be
dangerous if poorly understood.

FMP is really a very useful tool for medical data work.
--
Philippe Manet
en fait, c'est manet avant @

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.