Sign up ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

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?

share|improve this question

closed as too broad by BЈовић, GlenH7, MichaelT, Dan Pichelman, gnat Oct 10 '14 at 20:53

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

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. –  Kilian Foth Oct 9 '14 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 –  isea Oct 9 '14 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. –  GlenH7 Oct 10 '14 at 14:25

2 Answers 2

up vote 2 down vote accepted

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.

share|improve this answer

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.

share|improve this answer

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