Tips for Database Design
Database is a vital component when developing dynamic websites, database design is also very important when we design a system. Errors in designing the database will result in chaos and performance degradation on the system used by users in the future when the system is large.
There are some general tips for you when designing databases.
Some of the rules for designing a database.
- Tables in the database may not contain multiple records (data), or in other words, there should be no data redundancy. If there is the same data, it is necessary to review the table design.
- Each table in the database, must have unique fields (columns). This field is known as the Primary Key.
- The table must be normal.
- Database size or size should be kept to a minimum. This is determined by choosing the right data type.
- Designing the database should pay attention to whether the design can accommodate data (records) as required by the application.
Some Tips For Naming Identifiers.
- MySQL identifier names (databases, tables, columns) are case-sensitive. Identifier names should be consistent for all tables in a database. We can use lower-case models, UPPER-CASE, camelCase, etc.
- Database, table and column name up to 64 characters.
- Avoid using special characters, as this may cause problems in other operating systems.
- Choose a name for the field (column) that reflects the contents of the stored data.