Goal: create the Bgee database, and insert data source information.
This step will call in order the following files, after creating a new database:
bgeeSchema.sql, insert_data_sources.sql, bgeeConstraint.sql, bgeeIndex.sql, bgeeForeignKey.sql. The new database is named bgee_vRELEASE
(e.g., bgee_v15
).
-
If it is the first time you execute this step in this pipeline run:
make clean
-
Run Makefile:
make
-
At the end of the pipeline, update data source information, with version used and types of data pulled into bgee:
make update_data_sources.sql
generated_files/db_creation/step_verification_RELEASE.txt
should contain: the number of tables in the database, and the number of data sources that were inserted into thedataSource
table.
-
update the data sources with version information and types of data used in Bgee (to be done at the end of the pipeline):
make update_data_sources.sql
-
drop the database:
make dropDatabaseBgeeRELEASE
(e.g.,make dropDatabaseBgee14
)
To manually install the Bgee database:
- create the database, e.g.:
mysql -u root -p -e 'CREATE DATABASE bgee_vXX'
- insert the database schema, e.g.:
mysql -u root -p bgee_vXX < bgeeSchema.sql
- insert the data, e.g.:
mysql -u root -p bgee_vXX < dump_bgee_vXX.sql
- create the constraints, e.g.:
mysql -u root -p bgee_vXX < bgeeConstraint.sql
- create the indexes, e.g.:
mysql -u root -p bgee_vXX < bgeeIndex.sql
- create the foreign key constraints (that will create required indexes as well), e.g.:
mysql -u root -p bgee_vXX < bgeeForeignKey.sql
Important remark: altering a table after data insertion, to add indexes and constraints, is faster than doing it before data insertion, but can fail if the table is very large, with the error 1206: "ERROR 1206 (HY000): The total number of locks exceeds the lock table size". To solve this problem, you have to increase the buffer pool size (see e.g. http://bugs.mysql.com/bug.php?id=9975), or you have to insert the data AFTER indexes and foreign key constraints generation. You'd rather increase the buffer pool size.