0

I'm building a site using a CMS that already holds user information such as userId, Username, Firstname, Lastname.

I want to build a system that holds additional user information such as the user's Title, Date of birth etc…

Should I:

  1. Create a new table to hold the additional fields? This would prevent needing duplicate data, but it means data is split between the CMS tables, and my custom tables.
  2. Create a seperate table to hold all the user info I need and keep it in sync with the CMS user table? The advantage I see is that the two systems would be separate, but it requires keeping the data in Sync between my system and the CMS.

What are the advantages / disadvantages of each approach?

1
  • I edited your question to remove the request for articles to avoid down-votes and close-votes for requesting resources. That is off topic. I also removed the request for "best practices" because questions like that almost always get closed as needing focus. Instead, I changed the question to ask for advantages and disadvantages of both approaches. That might be a more answerable question. Feel free to revert my edit if you do not agree with it. Mar 23, 2022 at 13:59

1 Answer 1

0

Assumed you are talking about a relational database (with the usual means for referential integrity), use approach #1 (new table only with additional fields), and create a view which joins the two tables and returns the fields you need from both together.

No need to reinvent the wheel by implementing your own synching mechanism.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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