Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Mar 2010
    Location
    Orlando, FL
    Posts
    154
    Thanks
    2
    Thanked 8 Times in 8 Posts

    One table vs. multiple tables

    Quick question...is it better to have one big table or many small ones? Example: What are the pros and cons of having one table with a list of teachers and one table with a list of all the students belonging to those teachers as opposed to each teacher having their own table of students?

  • #2
    Super Moderator guelphdad's Avatar
    Join Date
    Mar 2006
    Location
    St. Catharines, Ontario Canada
    Posts
    2,631
    Thanks
    4
    Thanked 147 Times in 138 Posts
    See Normalization, that is the important concept to learn, not whether or not you have a certain number of tables.

    As for splitting tables so you don't have "too many" rows, properly normalized and indexed tables with appropriate server tuning and you can get into the hundreds of millions of rows without taxing your server.

  • #3
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,020
    Thanks
    75
    Thanked 4,323 Times in 4,289 Posts
    More succinctly: One table per teacher is a *terrible* design. Don't even think about it.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •