0

We are using two table to manage user data. A user table that has a username, email, password. Then a user profile that has first name, last name, bio, etc. Due to some other requirements it has been made clear it would be so much easier to combine the tables.

What is the thinking generally with separating these tables and what should I be concerned about if we combine them?

3
  • 3
    Does every user have exactly one profile, and does every profile correspond to exactly one user? Then there is no sense whatsoever in storing them as separate tables. Otherwise, it depends on the access patterns. Please elaborate. Commented Oct 9, 2014 at 17:35
  • Yes, 1:1 relation for users and user profiles. One profile to every user. So good, it doesn't make sense to me either to separate these. thanks
    – bonum_cete
    Commented Oct 9, 2014 at 17:38
  • 2
    This question appears to be off-topic because it is about a specific situation, particular to one individual and does not have broad enough relevance to the programming community.
    – user53019
    Commented Oct 10, 2014 at 14:25

2 Answers 2

2

It's possible that the original design kept them separate because the original designer thought that the full user profile would not always be populated for each user. Their original goal might have been to separate a few mandatory fields from a large number of optional and sparsely used fields. They might have done this in an attempt to gain or improve performance of the system when querying the table.

It's also possible that there is (or was, at some point) a 1:n relationship between users and user profiles.

2

As was noted in the comments, it sounds that under third normal form definitions, your proposed fusing of the tables is utterly correct.

Fuse 'em.

Not the answer you're looking for? Browse other questions tagged or ask your own question.