Criminology Database containing the most significant crime-related entities, views and queries
To create the Crimes Database:
- Download and open MySQL Workbench.
- Sign in as administrator.
- Drag & drop the
crimesDB.sql
file from thedatabase
folder, or just open it through MySQL Workbench. - Press the lightning symbol to run the executable and create the database.
- In order for it to appear in the
schemes
tab, you might need to refresh it.
To create the users:
- Open a new query file in MySQL Workbench and transfer
users.sql
fromdatabase
folder in it. - Press the lightning symbol to run the executable and create the users.
To sign in as a user:
- In the home tab, create a new connection.
- Type the name of the user you want to sign in as.
- Use as password, the one declared during the creation of the user. This can be obtained from the
users.sql
file indatabase
folder. Just look through the code. - Now you are logged in and can verify the restricted usage capabilities of each user, compared to the administrator's full access.
To try out the queries:
- Open a new query in MySQL Workbench.
- Transfer the code of the desired query from
queries
folder. - Hit the lightning button to see that the database indeed returns what was requested.