Go Back   CodingForums.com > :: Server side development > MySQL

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-21-2012, 03:55 PM   PM User | #1
wojo1086
Regular Coder

 
Join Date: Mar 2010
Location: Orlando, FL
Posts: 153
Thanks: 2
Thanked 8 Times in 8 Posts
wojo1086 is an unknown quantity at this point
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?
wojo1086 is offline   Reply With Quote
Old 08-21-2012, 07:14 PM   PM User | #2
guelphdad
Super Moderator


 
guelphdad's Avatar
 
Join Date: Mar 2006
Location: St. Catharines, Ontario Canada
Posts: 2,629
Thanks: 4
Thanked 147 Times in 138 Posts
guelphdad will become famous soon enoughguelphdad will become famous soon enough
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.
guelphdad is offline   Reply With Quote
Old 08-21-2012, 07:51 PM   PM User | #3
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,556
Thanks: 62
Thanked 4,056 Times in 4,025 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
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.
Old Pedant is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:46 PM.


Advertisement
Log in to turn off these ads.