In various projects that have been done before, there is a problem of poor database management. can you develop a database management specification like a code specification?
Principles: During the entire development process, database management and maintenance are conducted by a technical expert from the project team.
The following describes two roles:
1) The database management and maintenance personnel responsible for the project, dBA for short;
2) project team members (all members of the project team, including DBAs responsible for database maintenance) (PM for short;
Three database instances are involved:
Project Standard Library: <project> _ STD: only DBA can manage operations
Project development Test Library: <project> _ test: PM can all manage operations
Test release library of the test group: <project> _ release: PM and test group can all be managed.
1. Create a database
1) PM creates a standard database according to the design documents:
<Project> _ std ;
2) PM organizes the SQL statement for database creation: createdb. SQL;
3) PM sorts out the SQL statements of the database Ql: initdb. SQL (SQL statements are used for frameworks that do not contain any test data );
4) DBA creates a test database based on the compiled database creation SQL and initialization SQL: <project> _ test;
5) insert data records for testing in the PM test database;
6) use the Test Library of PM
<Project> _ Test , All development tests and debugging;
2. database Update
1) Test the update in the test database _ test .
2) after the PM test is successful, the SQL statements updated by the database are sorted out by _ test and sent to the DBA.
3) the DBA collects all update SQL statements sent by the PM on a daily basis and sorts them into update SQL scripts named after the date :****-**-**. SQL;
4) the DBA runs ***-** in the test database _ test ****-**-**. update the test database with SQL, and notify all pm to verify the update in _ test .
5) if the verification is faulty, repeat the preceding steps. 1), 2), 3), 4) steps until the verification is passed;
6) DBA in the standard library _ STD Line ****-**-**. SQL, and put the script into CC management, and publish the modification log within the project team (preferably on the project management platform that allows you to conveniently see and query all historical changes );
3. database test and release
1) DBAs use the standard database _ STD to export database files (whole database files), such as prjname_std1.0_db.dmp, create a test database for the test group _ release ;
2) PM adds business data for testing and publishing in the release database _ release. PM performs function testing and verification.
3) if the verification succeeds, prjname_std1.0_db.dmp is the official database release version file.