Topic: Large Database Design

I am unfamiliar will large database design and am having a hard time grasping or finding information about it.

For something like Basecamp would they contain everything in one database or would they create a new database for each user accounts?

Re: Large Database Design

one database, tons of tables.

That's a large database design.

Last edited by DFischer (2007-02-21 01:07:14)

http://danielfischer.com - Personal Web-Technology-Blog, Los Angeles.

Re: Large Database Design

Would each project get there own set of tables that would have prefix of the project name or would it all be stored in one general table?

Re: Large Database Design

Usually you have one database server (ex. MySQL), within that server you have many databases (ex. MyProgram1, SomeOtherProgram), within those databases you have many tables (ex. both databases above have a Users table, a Notes table, etc.).

Sometimes you can only have one database, depends on your webhost, so then you would have to do something to rename your tables like appname_tablename.

Re: Large Database Design

You need to find a book on database design.  It sounds like you need a lot of basic information and that's where you'll find it.

For a quick outline look at this: http://www.databasedev.co.uk/design_basics.html

Re: Large Database Design

OmenKing wrote:

Would each project get there own set of tables that would have prefix of the project name or would it all be stored in one general table?

You wouldn't create a separate table for each account, it would be one generic table for each model.

Railscasts - Free Ruby on Rails Screencasts

Re: Large Database Design

I book on data modeling would be your best start. I haven't read this book but it appears to teach what you need...

Beginning Relational Data Modeling:
http://www.amazon.com/Beginning-Relatio … mp;s=books

Last edited by JackBauer (2007-02-21 14:10:48)

Re: Large Database Design

I think I understand databases better since I've researched clustering.
I have a good grasp of Relational Data Modeling.
I haven't come across a book that explain the architecture of a large web application such as BaseCamp.

Thanks for your suggestions.

ryanb wrote:
OmenKing wrote:

Would each project get there own set of tables that would have prefix of the project name or would it all be stored in one general table?

You wouldn't create a separate table for each account, it would be one generic table for each model.

Thanks ryanb, thats exactly what I wanted to know smile

Last edited by OmenKing (2007-02-22 01:06:07)

Re: Large Database Design

If the database is going to be immensely large (>100m rows in the core tables) then you will need to plan out the physical aspects of the datafiles to improve sequential read peformance.  Tyically some type of partitioning is involved in the largest tables to reduce the overhead in read/write operations, or in general the IOs required to fetch a set of related rows.  You will also want to look at running a raw file system if the db supports it which will eliminate the redundant buffering of data between the OS and database.