Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is the problem with a big table?

 
Rujitha Patel
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to my business rules it is enough for me to have a single database table. I also like to have a single table because it is easy to apply data retreval SQL quries on a single table.(without JOINing many tables)

But I have more than 60 columns, is it acceptable to have that amount of columns in a single table? (I am using MySQL database)

Thank you very much.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rujitha,
There isn't any inherent problem with having a big table. However, it is only appropriate in very simplistic situations. An example would be a table of employees where we store information about the employee (id, name, address, gender, etc.)

However, I'm having trouble thinking of 60 columns for any entity that don't contain duplication. If there is duplication, it makes sense to separate them out into another table. It's also easier to manage smaller tables.

There's nothing wrong with joining multiple tables. Even though it is more code to write, it gets easy with practice. Multiple tables make the data model clearer and the database can potentially make your query more efficient. (through a smaller overall database size)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic