UNIVERSITY OF WEST ATTICA
SCHOOL OF ENGINEERING
DEPARTMENT OF COMPUTER ENGINEERING AND INFORMATICS
University of West Attica · Department of Computer Engineering and Informatics
Databases I
Vasileios Evangelos Athanasiou
Student ID: 19390005
Supervision
Supervisor: Periklis Andritsos, Professor
Co-supervisor: Anastasios Tsolakidis, Assistant Professor
Athens, June 2023
This repository contains a relational database creation and SQL query project developed for the Databases I (Database Management) course at the University of West Attica (UNIWA).
It demonstrates database creation, schema definition, data insertion, and advanced SQL querying.
Before using this project, ensure you have the following installed:
- MySQL (recommended)
- Compatible alternatives:
- MariaDB
- PostgreSQL (minor syntax adjustments may be required)
Any SQL client capable of executing .sql scripts:
- MySQL Workbench (recommended)
- phpMyAdmin
- DBeaver
- Command-line MySQL client
Make sure your SQL client is properly connected to your database server.
Open a terminal/command prompt and run:
git clone https://github.com/Data-Bases-1/SQL-Queries.git- Open the repository URL in your browser
- Click Code → Download ZIP
- Extract the ZIP file to a local directory
Navigate to:
src/new_personnel.sqlThis file contains:
- Database creation statements
- Table definitions (
DEPT,EMP,PROJ,ASSIGN) - Primary and foreign key constraints
- Sample data insertion
- Example SQL queries
- Open your SQL client
- Create a new SQL tab
- Open or paste the contents of new_personnel.sql
- Execute the script (Run)
mysql -u your_username -pThen:
SOURCE path/to/new_personnel.sql;After successful execution, verify the setup:
SHOW DATABASES;
USE new_personnel;SHOW TABLES;Expected tables:
DEPTEMPPROJASSIGN
DESCRIBE DEPT;
DESCRIBE EMP;
DESCRIBE PROJ;
DESCRIBE ASSIGN;SELECT * FROM DEPT;
SELECT * FROM EMP;
SELECT * FROM PROJ;
SELECT * FROM ASSIGN;- Navigate to the
docs/directory - Open the report corresponding to your preferred language:
- English:
SQL-Queries.pdf - Greek:
SQL-Ερωτήματα.pdf
- English:

