Prev: Slow running reports
Next: data checking
From: .:RoKsTaR:. on 27 Apr 2010 09:06 I'm just curious if it makes sense to use junction tables in this instance: student - studentID, studentfirst, studentlast, gender, age (adult, teen, or child), lessonday, status (current or retired) address - addressID, address, city, province, postalcode phone- phoneid, phonenum, extension, phlocation email - emailid email, emailLocation gaurdian – gaurdianid, gaurdianfirst, gaurdianlast, relationship studentaddress - studentID, addressID studentguardian - studentID, guardianID GuardianAddress - guardianID, addressid Studentphone - studentID, PhoneID Guardianphone - guardianID, PhoneID Notes on this table: I'm a music teacher who teaches an average of 50 students at a time. I'm trying to build a database track contact info, invoice students, and track attendance. I'm starting off with the contact portion of the database and once that is done I'll move on to the rest. -Adult students don't have guardians -Students with divorced parents may have 2 addresses and 4 Guardians. Not many students in this situation -Most parents have 2 emails and phone numbers -Some young students may provide their own phone and email That's it, thanks in advance
From: Stefan Hoffmann on 27 Apr 2010 10:26 hi, On 27.04.2010 15:06, .:RoKsTaR:. wrote: > I'm just curious if it makes sense to use junction tables in this instance: > > student - studentID, studentfirst, studentlast, gender, age (adult, teen, or > child), lessonday, status (current or retired) > address - addressID, address, city, province, postalcode > phone- phoneid, phonenum, extension, phlocation > email - emailid email, emailLocation > gaurdian – gaurdianid, gaurdianfirst, gaurdianlast, relationship > > studentaddress - studentID, addressID > studentguardian - studentID, guardianID > GuardianAddress - guardianID, addressid > Studentphone - studentID, PhoneID > Guardianphone - guardianID, PhoneID In short: Yes, normally it does. But you can "simplify" it a little bit more: Guardians and Students are People ;) So I would generalize it: People: ID, FirstName, LastName Address: ID, address, city, province, postalcode Email: ID, email, emailLocation Phone: ID, phonenum, extension, phlocation PeopleAdress: idPeople, idAddress PeopleEmail: idPeople, idEmail PeoplePhone: idPeople, idPhone Student: ID, idPeople, LessonDay, Gender, Age, Status Guardian: ID, idPeople, Relationship StudentGuardian: ID, studentID, guardianID mfG --> stefan <--
From: .:RoKsTaR:. on 27 Apr 2010 12:00 Ok, I see what's going on. You're using the student/gaurdian table to join people together from the separate student and guardian tables. I can follow that, thanks!
From: Jeff Boyce on 27 Apr 2010 12:01 I'll add another observation ... Your field [age] is guaranteed to require maintenance (i.e., "fixing"). Even if you don't use age = years, but the categories you mentioned, sooner or later kids grow up. How frequently do you plan to revisit [age] and update it? What criteria will you use? What happens if someone else takes over the maintenance of this application? Do they use the same criteria? Do they even know they need to maintain (AKA "fix") that field? How frequently? As an alternative, you could enter Date of Birth ... and use a function to "calculate" age, or age category, or ... That way, you NEVER need to maintain/fix that field's values! Regards Jeff Boyce Microsoft Access MVP -- Disclaimer: This author may have received products and services mentioned in this post. Mention and/or description of a product or service herein does not constitute endorsement thereof. Any code or pseudocode included in this post is offered "as is", with no guarantee as to suitability. You can thank the FTC of the USA for making this disclaimer possible/necessary. ".:RoKsTaR:." <RoKsTaR(a)discussions.microsoft.com> wrote in message news:A13CF825-7B51-4E59-A256-5519C063B74B(a)microsoft.com... > I'm just curious if it makes sense to use junction tables in this > instance: > > student - studentID, studentfirst, studentlast, gender, age (adult, teen, > or > child), lessonday, status (current or retired) > > address - addressID, address, city, province, postalcode > > phone- phoneid, phonenum, extension, phlocation > > email - emailid email, emailLocation > > gaurdian - gaurdianid, gaurdianfirst, gaurdianlast, relationship > > > studentaddress - studentID, addressID > studentguardian - studentID, guardianID > GuardianAddress - guardianID, addressid > Studentphone - studentID, PhoneID > Guardianphone - guardianID, PhoneID > > Notes on this table: > I'm a music teacher who teaches an average of 50 students at a time. I'm > trying to build a database track contact info, invoice students, and track > attendance. I'm starting off with the contact portion of the database and > once that is done I'll move on to the rest. > > -Adult students don't have guardians > -Students with divorced parents may have 2 addresses and 4 Guardians. Not > many students in this situation > -Most parents have 2 emails and phone numbers > -Some young students may provide their own phone and email > > That's it, thanks in advance >
From: .:RoKsTaR:. on 27 Apr 2010 12:53
That's a really cool idea, great thinking! How's that done? I'll be the only one using this database, so I'm not to worried. However, anything to make it work better is great :) |