Click here to Skip to main content
15,922,650 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
if there are two or three users,it was able to create tables for registration page
but if there are 1000 members..is it possible to create table for every single user or one table for all and tell me how it can retrieve
plz help me
Posted

create one table for all the users, you need to have way to identity each user by having unique field. for example user name field can be used as unique column for your table. when user register you can check whether given user name is already given or not from your existing data.
when you need to get user details you can query using the user name column, for example
SQL
select * from Userdetail where username ='user1' 

above will give only the details of user1 even you have 1000s or users in your table. these are very basics of SQL and ASP.NET, you better read books/articles/tutorials on this topic.
Any way ASP.NET provide more secure and easy to configure membership mechanism which you can try. plese check below CP tutorial
ASP.NET Membership and Role Provider[^]
 
Share this answer
 
Comments
Santosh K. Tripathi 14-Jan-15 1:43am    
its correct use one table and identify user by Unique key.
Apart from the above solutions, you have to learn database design in order to really understand how databases are designed and work, start from Introduction to database design[^]
 
Share this answer
 
v3
Comments
Rajesh waran 14-Jan-15 2:35am    
My +5
Santosh K. Tripathi 14-Jan-15 6:55am    
+5
What you have to do is to create a single table say "USER" and store each and every user registration detail in it. This table must contain UserID as its primary key.

After that create another table lets say "USER_DETAILS". This table must contain primary key "UserID" of table "USER" as its foreign key. Insert user details in "USER_DETAILS" table. and Retrieve all details with its foreign key.

select * from USER_DETAILS where UserID = UserId
 
Share this answer
 
v2
Based on my Observation,If the records to be stored is similar for 1000 users. no need to create thousands of tables.You can use single table with primary key Identity.
Refer something about Primary Key Identity to store different Users record with unique id.

Refer this link and have a look about Primary Key concept. http://www.w3schools.com/sql/sql_autoincrement.asp[^]
http://www.w3schools.com/sql/sql_primarykey.asp[^]

You can store 1000 Users Data's in a single table, differentiating them with their identity column Id.
 
Share this answer
 
v2
Create only one table and identify the users by adding UserInfo column in that table.

If you want to maintain more details of a user in the table, create one UserTable with UserID column (Unique Values) and map the userID in your main table.

Please refer SQL 'Normalization Techniques'
 
Share this answer
 
You have to understand, a table is used as the please that save a set of information what have the same properties, such as lot of member's information, the row in the table save one member information.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900