Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6249341
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:13:13+00:00 2026-05-24T13:13:13+00:00

I have to realize a system with different kind of users and I think

  • 0

I have to realize a system with different kind of users and I think to realize it in this way:

  • A user table with only id, email and password.
  • Two different tables correlated to the user table in a 1-to-1 relation. Each table define specific attributes of each kind of user.

Is this the best way to realize it? I should use the InnoDB storage engine?

If I realize it in this way, how can I handle the tables in the Zend Framework?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T13:13:14+00:00Added an answer on May 24, 2026 at 1:13 pm

    I can’t answer the second part of your question but the pattern you describe is called super and subtype in datamodelling. If this is the right choice can’t be answered without knowing more about the differences between these user types and how they will be used in the application. There are different approaches when converting logical super/subtypes into physical tables.

    Here are some relevant links:
    http://www.sqlmag.com/article/data-modeling/implementing-supertypes-and-subtypes
    and the next one about pitfalls and (mis)use of subtyping
    http://www.ocgworld.com/doc/OCG_Subtyping_Techniques.pdf

    In general I am, from a pragmatic point of view, very reluctant to follow your choice and most often opt to create one table containing all columns. In most cases there are a number of places where the application needs show all users in some sort of listing with specific columns for specific types (and empty if not applicable for that type). It quickly leads to non-straigtforward queries and all sort of extra code to deal with the different tables that it’s just not worth being ‘conceptually correct’.

    Two reasons for me to still split the subtypes into different tables are if the subtypes are so truly different that it makes no logical sense to have them in one table and if the number of rows is so enormous that the overhead of the ‘unneeded’ columns when putting it all in one table actually starts to matter

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I realize this is a basic question but I have searched online, been to
I realize that this question has been asked 100times but none that I have
I have pieces of code like this in a project and I realize it's
I realize this question has probably been asked numerous times, but I have not
I am using asp.net 2.0 and have a different Sql Database table schema for
Perhaps this question has been asked before in a different way, but I haven’t
Developing a project of mine I realize I have a need for some level
We have a number of data objects that realize INotifyPropertyChanged to allow for WPF
So I realize that the docs have the list of node types for the
I realize that iOS has the ability to have keyboard shortcuts (e.g.: Command-C for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.