Results 1 to 9 of 9
  1. #1
    jase118 is offline Novice
    Windows 7 Access 2003
    Join Date
    Jun 2010
    Location
    Plymouth, UK
    Posts
    6

    Question Help needed with table design/layout for newbie

    Hi, i have just joined the forum and have built a few DB's in the past but found i have forgotten almost everything!


    I do remember with a previous DB i layed the tables out incorrectly which impacted on the flexibility down the line so would like advise before i start in order to get a good foundation.
    My dB is for our watersports centre to book people onto courses and retain their details in a contacts table to be imported to Outlook for mailing info.
    We run various courses which then run on multiple dates across the year. So for example we may run a Powerboat Level 1 course, this then runs 4-6 jan, 4-6 Feb and so on. I then need to add customers to each course date (i want to retain the customer information for use on email or telephone marketing etc)
    This is the basic concept, the additional functionality i require is:

    -Add/ Remove courses - add/remove course dates

    -view courses by type or date (ie view all power boat courses, or all courses for January or all powerboat courses for January)

    -view available spaces on courses (same search criteria as above)

    -Add/ Remove people off courses

    -Print bookings (same search criteria as above)

    -view reserve space bookings (people who can fill cancellation slots on certain courses at certain dates)

    -View payments received /outstanding payments

    This is my plan for the way i want it to work! I now need to start building the tables.
    For the contacts table i plan on using the same format as Outlook contacts so i can import directly into outlook for emailing customers (i would be happy to change this especially if i could send mails direct from access into Outlook, rather than importing a contacts list every-time i add a new name)
    I am very open to suggestions here as i am finding the first step a bit daunting and dont want to waste lots of time making a DB that wont do what i want a bit later down the line.
    I have tried to give as much detail as i can, if you want to know anything else please ask.

    I will be grateful for any help with this

    Cheers
    Jase

  2. #2
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    If this is something that will be done for a business, I suggest you get professional help. The one time fee for proper setup is well worth it if you know enough to maintain.

  3. #3
    jase118 is offline Novice
    Windows 7 Access 2003
    Join Date
    Jun 2010
    Location
    Plymouth, UK
    Posts
    6

    update1

    i agree it would be better to get it done professionally but this is a shoe string out fit and we are currently doing it all on excel spread sheets and things are far from perfect!
    I am a sailing instructor not a DB designer but i am going to give this a good go and see if i cant improve a bad situation with a bit of hard graft.

    Just received this from another forum, what do you think as a start point?

    You can use Access automation with Outlook to send out e-mails, but that is down the road at this point. The table structure is the most critical aspect.

    You'll need tables for members and courses

    tblMembers
    -pkMemberID primary key, autonumber
    -txtFName
    -txtLName

    tblCourses
    -pkCourseID primary key, autonumber
    -txtCourseName

    You'll also need a table for the course dates or sessions

    tblSessions
    -pkSessionID primary key, autonumber
    -dteStart (session start date)
    -dteEnd (session end date)
    -fkCourseID foreign key to tblCourses

    Now you'll need to associate the members with the applicable session

    tblSessionMembers
    -pkSessionMemberID primary key, autonumber
    -fkSessionID foreign key to tblSessions
    -fkMemberID foreign key to tblMembers

    In order to determine if there are vacancies in a particular session, you will need to know the maximum # of students/session or course. If a session is limited by its location, then the field for the max # belongs in the session table. If the max # only depends on the course, then it belongs in the tblCourses. The same would be true for the course fee. If the fee is dependent on the session (you might charge less for sessions conducted in the off season versus those conducted during the season), then the field belongs there. If the fee is just dependent on the course, then it belongs in tblCourses.

  4. #4
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    the form sounds about right. I'd add a few fields though.
    1. in members add a ActiveInd field which basically is a 1/0, yes/no, whateveryouwant field that lets you know if an entry is a current member. Having archived data of previous member is always good and when you query you can set your WHERE clause to query only active accounts.
    2. under Courses I'd add an isAvailable field. again a 1/0, yes/no whateveryouwant field that will be updated to signify if a course is currently in use. This will help determine vacancies.

    the SessionMembers table is there to accomodate a Many to Many relationship between Session and Members. If you havn't already, read up on realtionships to ensure you understand what the purpose is and which tables to query for specific information.

    Also read up on Normalization. I can't stress this part enough. We have way too many questions here that are seemingly unrelated but stem from normalization issues.

    take care and good luck.

  5. #5
    jase118 is offline Novice
    Windows 7 Access 2003
    Join Date
    Jun 2010
    Location
    Plymouth, UK
    Posts
    6
    My Table layout so far:

    tblMembers
    -pkMemberID primary key, autonumber
    -txtFirstName
    -txtLastName
    -txtAddress1
    -txtPostcode
    -numTel
    -numMobile
    -txtEmail

    tblCourses
    -pkCourseID primary key, autonumber
    -txtCourseName
    -numMax (maximum places available on the course)
    -curPrice

    tblSessions
    -pkSessionID primary key, autonumber
    -dteStartDate (session start date)
    -dteEndDate (session end date)
    -fkCourseID foreign key to tblCourses

    tblSessionMembers
    -pkSessionMemberID primary key, autonumber
    -fkSessionID foreign key to tblSessions
    -fkMemberID foreign key to tblMembers


    As for tracking who has paid, would i be right to put that under tblSessions with a yes/no option?
    I am not sure how to setup a foreign key, went into relationships and setup a 1 to many link, is this correct?

    We dont have members but do have customers who use us alot, im not sure if i would need to specify active or inactive members?

  6. #6
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    Read, Read, Read. It's the best you can do.

    Paid Indicator... not sure. Might go under SessionMembers.
    The foreign key... correct
    ActiveInd.... your call

  7. #7
    jase118 is offline Novice
    Windows 7 Access 2003
    Join Date
    Jun 2010
    Location
    Plymouth, UK
    Posts
    6
    I have put it under:
    tblSessionMembers
    -pkSessionMemberID primary key, autonumber
    -fkSessionID foreign key to tblSessions
    -fkMemberID foreign key to tblMembers
    -logPaid yes/no
    -logInstructionsSent yes/no


    I have a tut on relationships, relational database principles sticky and am reading up on normalization.
    Will read these before setting up my relationships or adding anymore fields.

    Im glad i didnt just make a quick atempt at this, it seems to be taking the right sort of shape thanks to all your help! not going to be quick or easy though will keep you posted on future developments!

  8. #8
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    If it was quick or easy, most of us would be out of a job =P

  9. #9
    jase118 is offline Novice
    Windows 7 Access 2003
    Join Date
    Jun 2010
    Location
    Plymouth, UK
    Posts
    6
    i have done my reading and i have attached a picture of my tables and the relationships i have setup. I have attempted to normalize it and as a result have created new tables.
    Let me know what you think.

    since posting this i have changed my phone fields to txt instead of numbers.
    Last edited by jase118; 06-05-2010 at 12:51 PM.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. please help to design a table
    By oas in forum Database Design
    Replies: 3
    Last Post: 02-11-2012, 08:54 AM
  2. table design: one big table vs. multiple small tables
    By lstairs in forum Database Design
    Replies: 3
    Last Post: 12-31-2009, 08:46 AM
  3. Newbie Table Setup
    By debl5 in forum Access
    Replies: 3
    Last Post: 05-15-2009, 07:46 AM
  4. newbie needs design help
    By ashiers in forum Database Design
    Replies: 0
    Last Post: 09-13-2008, 07:05 PM
  5. Table Layout Question
    By WonkeyDonkey in forum Database Design
    Replies: 6
    Last Post: 11-22-2005, 08:16 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums