Any tips on planning a large database [closed] Any tips on planning a large database [closed] sql sql

Any tips on planning a large database [closed]

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.

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.

Stick with the first few normal forms when designing your schema if you don't know what you're doing. Odds are it will allow you to make changes easier than any other method when you realize your design mistakes later on.

When in doubt, feel free to ask for opinions. The easiest method of visualizing a database design is to use Entity Relationship Diagrams (ER Diagrams) and it also allows us to easily see what your design looks like without sifting through code.