locked
Link accounts RRS feed

  • Question

  • User-1640063376 posted

    I am designing a website for my local table tennis club. I want to include a page  that parents can log into to find out when their children have games and where they are. Both the parent and child must have an account. Is there a way to link accounts? Also how would I set-up the calendar database. Would I have a relation to the userid field in the membership database and add events to that account? Also, the child shouldn't be able to see the parents account, but the parent should be able to see the childs. There should also be a page that the parent can register the child at. Any Ideas??? I don't know where to begin or whether its possible!!!

    Thursday, November 4, 2010 2:45 PM

Answers

  • User-952121411 posted

    Both the parent and child must have an account. Is there a way to link accounts?
     

    Yes. In the database have a 'Children' table that has a column containing a foreign key ID of the Parent account creating a 1:many relationship; meaning there can be 1:many children for each single parent ID record. So you might have the following

    ParentAccount Table

    ID     FirstName   LastName

    5          Jane             Smith

    ChildrenAccount Table

    ID     fkParentID   FirstName   LastName

    1             5              Johnny         Smith

    2             5               Suzy            Smith

    Also how would I set-up the calendar database. Would I have a relation to the userid field in the membership database and add events to that account?

    Yes. You can have an Events and EventsLookup table of sorts.

    Events Table

    ID                 EventName                       Date

    4               Fall Tournament                   11/15/10

    5               Holiday Spectacular              12/20/10

    Events Lookup Table

    ID          fkEventID         fkParentID

    10                4                     5

    Also, the child shouldn't be able to see the parents account, but the parent should be able to see the child's. There should also be a page that the parent can register the child at.

    You can set up security based on the account type so that children can't see the parents, but the parents can see the children's.  You can create a form for registration.

    Lastly, this type of system (a Reservation and accounts system) is nothing new and you can probably find open source projects or even some Content Management Systems that have most all of the components you need right out of the box (calendar, accounts, event planning, etc.)

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, November 5, 2010 9:37 AM

All replies

  • User-60558687 posted

    Let's first tackle the accounts linking issue. 

    I think one way to handle this to have two-field account number. Let's call these two fields account_number and player_number. One family, for example, can share the same account_number but each individual within the family will have her/his own player_no. You can set a convention that player_number 1 is always the guardian/parent/guarantor etc. 

    Your other tables that have relations with the "person" table should also have these two fields account_number and player_number as pointers back to the main table; foreign keys so to speak.

    Thursday, November 4, 2010 10:57 PM
  • User-952121411 posted

    Both the parent and child must have an account. Is there a way to link accounts?
     

    Yes. In the database have a 'Children' table that has a column containing a foreign key ID of the Parent account creating a 1:many relationship; meaning there can be 1:many children for each single parent ID record. So you might have the following

    ParentAccount Table

    ID     FirstName   LastName

    5          Jane             Smith

    ChildrenAccount Table

    ID     fkParentID   FirstName   LastName

    1             5              Johnny         Smith

    2             5               Suzy            Smith

    Also how would I set-up the calendar database. Would I have a relation to the userid field in the membership database and add events to that account?

    Yes. You can have an Events and EventsLookup table of sorts.

    Events Table

    ID                 EventName                       Date

    4               Fall Tournament                   11/15/10

    5               Holiday Spectacular              12/20/10

    Events Lookup Table

    ID          fkEventID         fkParentID

    10                4                     5

    Also, the child shouldn't be able to see the parents account, but the parent should be able to see the child's. There should also be a page that the parent can register the child at.

    You can set up security based on the account type so that children can't see the parents, but the parents can see the children's.  You can create a form for registration.

    Lastly, this type of system (a Reservation and accounts system) is nothing new and you can probably find open source projects or even some Content Management Systems that have most all of the components you need right out of the box (calendar, accounts, event planning, etc.)

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, November 5, 2010 9:37 AM
  • User-1640063376 posted

    I've added a new table in the database called Parents. It has two rows:

    UserID            uniqueidentifier             (relation to the aspnet_users table)

    ID                   int                               (identity)

     

    And i've added a child table. It has three rows:

    UserID            uniqueidentifier             (relation to the aspnet_users table)

    ParentID         int                               (identity)

    ID                  int                               (identity)

     

    I have a form in my parents page. Parents are in the parents role. How will I use the CreateUserWizard to add children to my table? On my main register page, how will I add users to the parents table?????

    Friday, November 5, 2010 12:06 PM