![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm trawling through the manual and trying things out, but I can't seem to figure out how Filemaker does the equivalent to such a simple SELECT statement. Can anyone help me? I've a feeling it's because I'm entrenched in an SQL mindset but I can't see any other way of doing it. I'm not familiar with 6 but up to 5 that is it for doing the links |
#3
| |||
| |||
|
|
[FileMaker Newbie!] I'm used to using SQL for databases, and I really can't get my head around the way Filemaker does it (it took me long enough to come to the conclusion that in Filemaker parlance, "Database" means "table", rather than "database" - though I'm still not entirely sure!). Anyway, I want to have a database with two sets of data, "Contact" and "Conference". A contact can attend many conferences, and a conference can be attended by many contacts. I'd like to display all contacts attending a given conference, and I'd also like to display all conferences a contact is attending. In an SQL environment I would have three tables: Contact ------- ContactID Unique number, not null. FirstName Text LastName Text Conference ---------- ConferenceID Unique number, not null. Subject Text ContactConferenceLink --------------------- ContactID Number, not null ConferenceID Number, not null and to find out all the attendees for a given conference I would do: SELECT Contact.FirstName, Contact.LastName FROM Contact, Conference, ContactConferenceLink as Link WHERE Conference.ConferenceID = 7 AND Conference.ConferenceID = Link.ConferenceID AND Contact.ContactID = Link.ContactID; And to do the reverse, all the conferences a given contact is attending, I do something similar: SELECT Conference.Subject FROM Contact, Conference, ContactConferenceLink as Link WHERE Contact.ContactID = 89 AND Conference.ConferenceID = Link.ConferenceID AND Contact.ContactID = Link.ContactID; I'm trawling through the manual and trying things out, but I can't seem to figure out how Filemaker does the equivalent to such a simple SELECT statement. Can anyone help me? I've a feeling it's because I'm entrenched in an SQL mindset but I can't see any other way of doing it. Thanks, -zoara- -- "I'm not sure how useful this is, but it's bloody clever." - Jonathon Sanderson in uk.comp.sys.mac Are you posting responses that are easy for others to follow? http://www.greenend.org.uk/rjk/2000/06/14/quoting |
#4
| |||
| |||
|
|
zoara <me3 (AT) privacy (DOT) net> wrote: and to find out all the attendees for a given conference I would do: SELECT Contact.FirstName, Contact.LastName FROM Contact, Conference, ContactConferenceLink as Link WHERE Conference.ConferenceID = 7 AND Conference.ConferenceID = Link.ConferenceID AND Contact.ContactID = Link.ContactID; And to do the reverse, all the conferences a given contact is attending, I do something similar: SELECT Conference.Subject FROM Contact, Conference, ContactConferenceLink as Link WHERE Contact.ContactID = 89 AND Conference.ConferenceID = Link.ConferenceID AND Contact.ContactID = Link.ContactID; I'm trawling through the manual and trying things out, but I can't seem to figure out how Filemaker does the equivalent to such a simple SELECT statement. I don't know about FMP6, but in 5.5 you would organise it exactly the same way. In your Contacts window you would have a portal into your ContactConferenceLink, with the relationship Contact.ContactID = Link.ContactID so it will list all the Link table records with tat contactID. |
|
FileMaker seems like it was written by someone who has never had any formal database training at all, but just kind of worked it out as they went along. |

#5
| |||||
| |||||
|
|
In article <1fzdn7o.1w1sog21m63az4N%me3 (AT) privacy (DOT) net>, me3 (AT) privacy (DOT) net (zoara) wrote: I'm trawling through the manual and trying things out, but I can't seem to figure out how Filemaker does the equivalent to such a simple SELECT statement. Can anyone help me? I've a feeling it's because I'm entrenched in an SQL mindset but I can't see any other way of doing it. I'm not familiar with 6 but up to 5 that is it for doing the links between fields in separate tables. |
|
I have set up a number of databases with similar relational links to what you want to do, including auto fields that update the original file. |
|
It really is as easy as you think. Throw some dummy data in there, suck it and see, shouldn't take long. |
|
this very ease of use is part of the whole point of filemaker after all. It means I don't have to learn SQL to build a fairly sophisticated database. |
|
Though in what I do now the records are all kept in single Excel spreadsheets, eurghhh!!! |
#6
| |||
| |||
|
|
PeterD <pd.news (AT) dsl (DOT) pipex.invalid> wrote: zoara <me3 (AT) privacy (DOT) net> wrote: and to find out all the attendees for a given conference I would do: SELECT Contact.FirstName, Contact.LastName FROM Contact, Conference, ContactConferenceLink as Link WHERE Conference.ConferenceID = 7 AND Conference.ConferenceID = Link.ConferenceID AND Contact.ContactID = Link.ContactID; And to do the reverse, all the conferences a given contact is attending, I do something similar: SELECT Conference.Subject FROM Contact, Conference, ContactConferenceLink as Link WHERE Contact.ContactID = 89 AND Conference.ConferenceID = Link.ConferenceID AND Contact.ContactID = Link.ContactID; I'm trawling through the manual and trying things out, but I can't seem to figure out how Filemaker does the equivalent to such a simple SELECT statement. I don't know about FMP6, but in 5.5 you would organise it exactly the same way. In your Contacts window you would have a portal into your ContactConferenceLink, with the relationship Contact.ContactID = Link.ContactID so it will list all the Link table records with tat contactID. I've done exactly that; it was there that I got stuck. I'm only able to show the data in ContactConferenceLink, ie I can show that Contact "Fred" is going to Conferences 7, 18 and 39 because ContactConferenceLink contains the records ContactConferenceLink --------------------- ContactID ConferenceID 269 7 269 19 269 20 (where 269 is Fred's ContactID) but I can't show what those conferences actually *are* because that info is listed in the Conference table: Conference ---------- ConferenceID Subject 18 Databases and Spreadsheets - the differences 19 FileMaker Basics 20 Relational Databases rather than the ContactConferenceLink table. The Relationships in FileMaker only span across two files, not three, so I'm stumped as to how I can make the relationship Contact Link Conference ------------- --------------- ----------------- FName, CtctID <-> CtctID, CfrceID <-> CfrnceID, Subject work in Filemaker, without resorting to some sort of kludge whereby the attendees of a conference are kept in the Conference file itself, which to my eyes is backwards as it isn't normalised to even 3NF, you get duplicated data and difficulty in keeping the data clean, and it looks scarily easy to get into a mess very quickly: Conference ---------- ContactID Subject 332 Relational Databases 138 Relational Databases 269 Relatoinal (sic) Databases 269 Filemaker Basics This is - to my eyes - a horrible kludge; maybe I'm missing something? I've tried creating a Relationship in the ContactConferenceLink table to the Conference table, so if I *open* the ContactConferenceLink file, I can see the Subjects of the Conferences (based on the ConferenceID). But if I try to then access this data through my previously set up relationship between Contact and ContactConferenceLink, only the actual Fields (and not the relationships) in ContactConferenceLink are visible - so I still can't see the Subjects of the Conferences. Do I need to perhaps use a lookup from ContactConferenceLink to get the data from Conference, which will then be accessible via my Contacts <- ContactConferenceLink Relationship? This smacks of even *more* duplication, but is probably less error-prone. FileMaker seems like it was written by someone who has never had any formal database training at all, but just kind of worked it out as they went along. I'm glad it's not just me who feels that way. ![]() Thanks, -zoara- -- "I'm not sure how useful this is, but it's bloody clever." - Jonathon Sanderson in uk.comp.sys.mac Are you posting responses that are easy for others to follow? http://www.greenend.org.uk/rjk/2000/06/14/quoting |
#7
| |||
| |||
|
#8
| |||
| |||
|
|
Build your relationships from Conference and Contact to the join file, not to each other. Yes, you will need to add, as lookups, whatever data fields you want to display, to the join file, even though it 'it isn't normalised to even 3NF'. If you keep trying to force the model to the SQL model, you will keep being disappointed. While breaking basic normalization may seem like a crime, it's actually not all that tough to manage, although there's no way around the fact that there is no real enforcement of relational integrity. Two (somewhat mutually self-exclusive) arguments: Codd's rules reflect a necessity for economy in storage and processor power that is less important now than in 1978; we have been asking for years for a more conventional model in which the data ('tables') are separated from the meta-data, and we hope that the next version, under development for some two years now, will give us that, as well as the ability to look two tables away. -- John Weinshel Datagrace Vashon Island, WA (206) 463-1634 Associate Member, Filemaker Solutions Alliance "zoara" <me3 (AT) privacy (DOT) net> wrote in message news:1fzdtb4.hz6n3i14337bsN%me3 (AT) privacy (DOT) net... PeterD <pd.news (AT) dsl (DOT) pipex.invalid> wrote: zoara <me3 (AT) privacy (DOT) net> wrote: and to find out all the attendees for a given conference I would do: SELECT Contact.FirstName, Contact.LastName FROM Contact, Conference, ContactConferenceLink as Link WHERE Conference.ConferenceID = 7 AND Conference.ConferenceID = Link.ConferenceID AND Contact.ContactID = Link.ContactID; And to do the reverse, all the conferences a given contact is attending, I do something similar: SELECT Conference.Subject FROM Contact, Conference, ContactConferenceLink as Link WHERE Contact.ContactID = 89 AND Conference.ConferenceID = Link.ConferenceID AND Contact.ContactID = Link.ContactID; I'm trawling through the manual and trying things out, but I can't seem to figure out how Filemaker does the equivalent to such a simple SELECT statement. I don't know about FMP6, but in 5.5 you would organise it exactly the same way. In your Contacts window you would have a portal into your ContactConferenceLink, with the relationship Contact.ContactID = Link.ContactID so it will list all the Link table records with tat contactID. I've done exactly that; it was there that I got stuck. I'm only able to show the data in ContactConferenceLink, ie I can show that Contact "Fred" is going to Conferences 7, 18 and 39 because ContactConferenceLink contains the records ContactConferenceLink --------------------- ContactID ConferenceID 269 7 269 19 269 20 (where 269 is Fred's ContactID) but I can't show what those conferences actually *are* because that info is listed in the Conference table: Conference ---------- ConferenceID Subject 18 Databases and Spreadsheets - the differences 19 FileMaker Basics 20 Relational Databases rather than the ContactConferenceLink table. The Relationships in FileMaker only span across two files, not three, so I'm stumped as to how I can make the relationship Contact Link Conference ------------- --------------- ----------------- FName, CtctID <-> CtctID, CfrceID <-> CfrnceID, Subject work in Filemaker, without resorting to some sort of kludge whereby the attendees of a conference are kept in the Conference file itself, which to my eyes is backwards as it isn't normalised to even 3NF, you get duplicated data and difficulty in keeping the data clean, and it looks scarily easy to get into a mess very quickly: Conference ---------- ContactID Subject 332 Relational Databases 138 Relational Databases 269 Relatoinal (sic) Databases 269 Filemaker Basics This is - to my eyes - a horrible kludge; maybe I'm missing something? I've tried creating a Relationship in the ContactConferenceLink table to the Conference table, so if I *open* the ContactConferenceLink file, I can see the Subjects of the Conferences (based on the ConferenceID). But if I try to then access this data through my previously set up relationship between Contact and ContactConferenceLink, only the actual Fields (and not the relationships) in ContactConferenceLink are visible - so I still can't see the Subjects of the Conferences. Do I need to perhaps use a lookup from ContactConferenceLink to get the data from Conference, which will then be accessible via my Contacts <- ContactConferenceLink Relationship? This smacks of even *more* duplication, but is probably less error-prone. FileMaker seems like it was written by someone who has never had any formal database training at all, but just kind of worked it out as they went along. I'm glad it's not just me who feels that way. ![]() Thanks, -zoara- -- "I'm not sure how useful this is, but it's bloody clever." - Jonathon Sanderson in uk.comp.sys.mac Are you posting responses that are easy for others to follow? http://www.greenend.org.uk/rjk/2000/06/14/quoting |
#9
| |||
| |||
|
|
I'm trawling through the manual and trying things out, but I can't seem to figure out how Filemaker does the equivalent to such a simple SELECT statement. |
#10
| ||||
| ||||
|
|
Build your relationships from Conference and Contact to the join file, not to each other. Yes, you will need to add, as lookups, whatever data fields you want to display, to the join file, even though it 'it isn't normalised to even 3NF'. |
|
If you keep trying to force the model to the SQL model, you will keep being disappointed. |
|
Codd's rules reflect a necessity for economy in storage and processor power that is less important now than in 1978; |
|
we have been asking for years for a more conventional model in which the data ('tables') are separated from the meta-data, and we hope that the next version, under development for some two years now, will give us that, as well as the ability to look two tables away. |
![]() |
| Thread Tools | |
| Display Modes | |
| |