A database project to store testing and assembly information for the the construction of the Endcap Timing Layer detector in CMS
Install PostgresSQL: more info here: https://ubuntu.com/server/docs/databases-postgresql In a linux terminal do:
- sudo apt install postgresql
- sudo -i -u postgresql
- createdb ETL_database
You check it is there by doing (in same terminal):
- psql -d ETL_database This should bring you into the database and using postgresql in the terminal where you can execture SQL commands
Now configure your password (you might have to exit the database, if it doesnt work refer to link above)
- ALTER USER postgres with encrypted password 'your_password';
Now you can close this terminal.
- git clone git@github.com:user_name/ETL_database.git
- cd ETL_database
Install packages for the repository so make sure you are in it: I would also recommend you setting up your own virtual environment it uses python=3.11.4
- pip install psycopg2
- python test_db_connection.py If this says you successfully connected to the database you are good to go!
- python build_db.py This will build the database and all the data in it!