Database Design
This content is not available in your language yet.
Good Practices
Section titled Good PracticesSingle Source of Truth
Section titled Single Source of TruthWhen designing a database, it is important to have a single source of truth. This means that you should avoid duplicate data. For example, if you have a table of users, you should not have a table of users and a table of admins. Instead, you should have a table of users and a column in that table that specifies whether or not the user is an admin.
- Avoid duplicate data
- Avoid data that can be derived from other data
Entity Relationship Diagram
Section titled Entity Relationship DiagramAn easy way to visualize a database design is to use an entity relationship diagram (ERD). An ERD is a diagram that shows the relationships between entities in a database. An entity is a table in a database. A relationship is a connection between two entities.
Diagrams
Section titled DiagramsDrawing diagrams using tools such as draw.io can be a good way to visualize your database design.
Full ERD Software
Section titled Full ERD SoftwareAs your database design grows more complex, you may want to use a full ERD software. These tools allow you to create a database design and then generate the SQL code to create the database. They also have the ability to do analysis on your database design to find potential problems.
A good example of this is MySQL Workbench or ERD-Editor.
Guides