How to handle different datas for different users in a registration table

Hello all

I am designing a table.My situations are as follows

I have so many user types.I am defining the user types as type1,type2,type3 etc

I have a registration system and I have different data for each types.Even admin can add the data for these types

I am not getting an idea how to handle my registration table.Should I store everything in a single table for all types ?

please help me

The rules of “normalization” dictate that you should break your data down into small units - without repeating data among tables.
In your USERS table include only data that relates directly to a USER. That should include a [foreign] key field that contains the type. That references a row in a TYPES table; which contains all the data that represents a type.
These ‘relationships’ among tables is the heart of a ‘relational database’ schema.

everything? no :slight_smile:

but you should have a main registration table, which will hold one row for every user, and which contains all the columns that are common to all users

this is called a supertype table

then you would have individual subtype tables, one for each different type of user, and each of these subtype tables would have userid both as the primary key and also as a foreign key to the main registration table userid

Thanks r937

Thanks ParkinT

it has been mentioned here null is allowable

What I have understood that is not normalized.Am I right ?

sure NULLs are allowable – having just one table with NULLable columns is an alternative to the supertype/subtype structure that i suggested to you