Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Database Design Best Practices [closed]

I am pretty well versed with SQL Server, MySQL, Oracle etc but putting these Database products aside, is there a resource that will help me design relational databases well? Is there something like patterns or best practices for database design?

I have seen a few times that database is often not scalable; people have personal preferences with keeping columns like isChecked column which is boolean in nature but stored as Char(1) with values like 'Y' and 'N' instead of 0 and 1 which to me sounds better. Ways not to commit common mistakes while doing database design?

Links to books or articles will be highly appreciated.

Thanks in advance.

like image 584
Perpetualcoder Avatar asked Dec 22 '08 20:12

Perpetualcoder


People also ask

What is the most important thing in a good database design?

The information requirements are the most important part.

What happens when a database is closed?

Once you are done using the database, you must close it. You use the DB->close() method to do this. Closing a database causes it to become unusable until it is opened again.

What are the 5 phases of database design?

Logical design. Physical design. Implementation. Monitoring, modification, and maintenance.


2 Answers

A few points:

  • Learn as much as you can about problem domain. You can't create good data model without knowing what you're designing for
  • Have good knowledge about data types provided by your database provider
  • How to properly use normalisation and design tables
  • Performance: when and how to apply indexes, how to write efficient queries etc.
  • When and how to use different DB objects like views, procedures, functions, triggers
like image 74
Rockcoder Avatar answered Sep 21 '22 06:09

Rockcoder


There are numerous database design patterns. They aren't often nicely formalized, so you may have to simply look at lots of database design.

See, for example, Fowler's books on design patterns. Also Nock's Book.

There are blogs, like database programmer.

There's an IEEE book, On Pattern-Based Database Design and Implementation.

The Google Search (link) turned up 24M hits.

like image 33
S.Lott Avatar answered Sep 18 '22 06:09

S.Lott