Everyone makes mistakes, but as a database administrator, we should avoid mistakes as much as possible to reduce costs for the company and ensure data quality. The following five Database design mistakes must be vigilant. 1. select an appropriate data type to avoid excessive database expansion. everyone should make mistakes, but as a database administrator, we should avoid mistakes as much as possible to reduce costs for the company and ensure data quality. The following five Database design mistakes must be vigilant.
1. select an appropriate data type to avoid excessive database expansion
Pay attention to the selection of data types. For example, if you know that the value range of a column is between 0 and 100,000, you do not need to use the BIGINT data type, because the INT type is sufficient.
Selecting the former means that every time you insert a piece of data, it is a waste of 4 bytes than the latter. This may sound insignificant, but the problem will be highlighted as the data volume increases.
2. compliance with ISO standards to ensure interoperability between heterogeneous database systems
The IT infrastructure of large enterprises is very complex and may require data exchange between different database systems. Take the TIMESTAMP data type as an example. the TIMESTAMP data type defined in Transact-SQL is different from the ISO standard. Other database systems are also different from ISO standards. Therefore, we should follow the ISO standards as much as possible to ensure interoperability between heterogeneous database systems.
3. serialization with appropriate mechanisms
It is necessary to ensure the serialization of records inserted into the database. many database designers use various mechanisms to ensure the serialization of applications. Some database designers like to introduce GUID in database design, but introducing GUID is not a good choice, because GUID is not serialized by default, using the GUID column as the primary key and/or index may even cause performance problems.
4. take the foreign key into account when creating an index
If a foreign key has been defined in your database, you need to pay more attention when creating an index. you need to incorporate this situation into the database design.
5. do not ignore candidate keys related to business requirements
The database designer should not focus only on the proxy key, but forget the business needs. Obviously, this is very bad for data quality. Duplicate values may occur if you have not created any constraints or indexes on the business-related candidate keys.
Keep away from the above five Database design mistakes. This will help you save costs for your company and improve data quality.
Original article: Do You Make These 5 Database Design Mistakes?