Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Any tips on planning a large database [closed]

Tags:

sql

mysql

I usually fly by the seat of my pants when building my databases. However, my new project is going to need quite a bit of planning. I never went to school for database development so I have no formal training on the planning process.

Is there any good software, methodologies for planning these things out?

like image 961
simonwjackson Avatar asked Aug 21 '09 00:08

simonwjackson


2 Answers

Don't fall into the trap of trying to design everything up front. It simply cannot be done. As the project proceeds, you find better ways of implementing the features that you already had implemented. And as you gain experience from you project, you also gain insight on the domain, and how to best design the database.

I would recommend taking an agile approach. Design a litte bit at the time. And when you see that stuff you already created could have been designed in a better way, refactor that. This goes both to code and database schema.

One word of note however. Where it is easy to refactor the business logic (unless you place the business logic in the database - which you don't. Right?) after launcing the application, refactoring the database after launch is considerably more difficult because you have to maintain data. So if you need to move one field from one table to another, you need change scripts.

So when you near a launch, it might be a good idea to plan a little ahead. But in the early phases of development, I would definately recommend taking an agile approach. Create one table at a time. One field at a time.

like image 75
Pete Avatar answered Oct 07 '22 19:10

Pete


Drawing things out in E-R Diagrams can help with managing the complexity.

Edit: Let me add that there are also rules/guidelines to help translate E-R Diagrams into relational schema, and there are also tools to aid in the process.

like image 23
T.R. Avatar answered Oct 07 '22 20:10

T.R.