locked
Databas related RRS feed

  • Question

  • If i want to store data of 2000  students separately with 30 rows and 3 columns for each student.

    then should i hav 2000 different tables???????

    is it efficient or there is any other solution???????????????

    Friday, September 10, 2010 10:45 AM

Answers

  • No, have one table for students.... If the below does not fit your requirements please explain the logic

    CREATE TABLE Students

    (

    StudentID INT NOT NULL PRIMARY KEY,

    StudentName VARCHAR(20)

    ..............

    .................

    )


    Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/
    Monday, September 13, 2010 10:04 AM

All replies

  • Hi ,

      What is the actual requirement .. To store Student data with 30 columns(attributes), one database table is sufficient .. Or if there are any One to Many relationships, then we need to store them as seperate tables. Based on this concept the number of tables will vary .. Give us some more information to give solution 


    -- Reddy Balaji C. ##Mark as answer if it solves the issue
    Friday, September 10, 2010 11:40 AM
  • No, have one table for students.... If the below does not fit your requirements please explain the logic

    CREATE TABLE Students

    (

    StudentID INT NOT NULL PRIMARY KEY,

    StudentName VARCHAR(20)

    ..............

    .................

    )


    Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/
    Monday, September 13, 2010 10:04 AM
  • See ...1 Table is enough to store all the student information...

    Create a table with the attributes of your required data, fill the student data you have for the attributes and leave if you don't have data. it will consider as NULL.

     

    thanks,


    - MS (We are what we repeatedly do, Excellence, then, is not an act, but a habit.)
    Monday, September 13, 2010 10:13 AM
  • Firstly, you should analyze the requirement. Identify any redundant information that you are storing and normalize the same. Have minimum number of tables to cater your requirement.

    Provide us with more details to help you in giving better solution.

    Regards,


    Phani Note: Please mark the post as answered if it answers your question.
    Monday, September 13, 2010 11:26 AM
  • You need to clear your requirements here on base of requirement tables can be created.and how mininaly it can be manage and how tables can be normalized its all depend on requirement.

     

    Thanks

    Monday, September 20, 2010 4:36 AM