SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Freelance Web Designer KeithMcL's Avatar
    Join Date
    Oct 1999
    Location
    Dublin, Ireland
    Posts
    1,125
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help with database design?

    Hi folks,

    Iím planning on building a site somewhat similar to a web hosting directory and was hoping to get some input/advice on the database design from all you coding gurus

    Iíd like to have two different types of users: 1) hosts 2) normal users

    Because of the this, Iíll need two seperate registration forms (with different fields). Will I require two tables in the db or can I combine them into one? I would also like to allow the host admin to be able to add/edit/delete users associated to that host.

    What would be the best way to go about creating the database?

    Thanks in advance

  2. #2
    SitePoint Guru
    Join Date
    Nov 2005
    Location
    Norway
    Posts
    715
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm guessing they have some similar fields like name, email etc? If they have I would add the fields that are similar between the two in the same table and the variable fields (eg. fields that are either specific to hosts or normal users) in each of their own table. Then I would just add a foreign key reference from the first table to each of the other two.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •