Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2003
    Location
    Denver, CO
    Posts
    34

    Question Relation needed?

    Hi,

    I'm new to DB design and I have a question about whether a relationship is needed in my database. Here's the scenario ...

    I have a table that stores all of a user's login information. I also need to store a bunch of other info about the user (address, phone, etc).

    Should I store all of this stuff in one table or should I set up a relation and store all of the user login info in one table and all the profile info in another?

    I've read up on relationships and it seems that my simple DB doesn't really need one ... but at the same time the two tables do have different functions.

    Thanks in advance ...

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171

    Re: Relation needed?

    Keep it simple if you can, i.e. one table. But there may be other considerations, e.g. security. If some users can see/update contact info but not login info, then keeping them in separate tables makes it easier to control the access.

    Pedantic note on terminology: "relation" is the relational term for a table; "relationship" is an analysis term meaning (more or less) foreign key. The two terms are not synonymous!

  3. #3
    Join Date
    Feb 2003
    Location
    Denver, CO
    Posts
    34

    Thanks!

    Tony,

    Thanks for the quick reply and the correction on terminology. Sounds like I can just use one table because all users can update contact info as well as login info ... in fact I have it set up where they do it all in the same place.

  4. #4
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171

    Re: Thanks!

    Originally posted by Wigz
    Tony,

    Thanks for the quick reply and the correction on terminology. Sounds like I can just use one table because all users can update contact info as well as login info ... in fact I have it set up where they do it all in the same place.
    That settles it - one table then!

Posting Permissions

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