简体   繁体   中英

What are the best practices for database design?

Our current database has plenty of problems like data redundancy,slow access because of the load and because of flat tables,we are creating a list of bestpractices to design a new one and following is our list..please add your opinion

. Data normalization to reduce data redundancy.

• Creating an audit trail to track the changes occurred in the database.

• Creating archive tables to move the older data to separate db/table to keep the prod database more lightweight.

• Creating views on the database if required. Ideally backend system should access data from the views rather than the tables directly, especially when there are several tables joins. That way if any of the underlying table gets reorganized, the backend code does not have to change; the view can be modified to have the same data as before. I have not seen other teams do this but it is something we can explore, otherwise whenever the table gets altered, APIs using that table will have to be updated as well.

• Moving to AWS we decide to deploy it on AWS rather than our own server.

• Coming up with the backup system in case the database/ server goes down.

• Periodic sync up with other DB systems.

• Data replication in case we decide to have servers at different geo.

  • database tuning
  • denormalization and structure optimization for often used query
  • sharding model
  • backup and restore model and test

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM