Skip to content

This is a project for the Databases class in NTUA Electrical and Computer Engineering Department

License

Notifications You must be signed in to change notification settings

nickbel7/hotel-management

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hotel-Management

This is a project for the Databases class in NTUA Electrical and Computer Engineering Department (The project was graded with perfect score 100/100)

Contributors

Listed alphabetically:

  1. Elina Syrri (ElinaSyr)
  2. George Papadoulis (G-Papad)
  3. Nick Bellos (nickbel7)

Tools used

Python Dependencies pypyodbc sqlserver

  • sql server 2019
  • Flask 2.0.1
  • pypyodbc 1.3.4

ER-Diagram

Relational Model

Installation

  1. At first, make sure you have installed sql server 2019 (express) on your computer. Download page
  2. Then, connect to the server throught a DBMS (preferably Microsoft SQL Management Studio) with sa (system administrator) credentials.

Run the following sql queries inside the DMBS (at this spesific order !).

  1. CREATE_tables.sql to create the database and the tables.
  2. CREATE_indexes.sql to create the indexes.
  3. CREATE_views_1.sql and CREATE_views_2.sql to create the required views.

Insert Mock Data in the database

  1. Insert Data from the excel HotelManagement-Data.xlsx throught the Import / Export wizard of Microsoft Management Studio
(Attention !) - Insert the data table by table with strictly the following order and by enabling the identity insert in the "Edit mappings" option for each table.
Reservations
Reservations
HotelServices
HotelLocations
Doors
HotelRooms
ReservationCustomers
ReservationServices
ReservationRooms
DoorAccessLog

OR
Directly insert the Backup (.bak file) of the database with all the data located here HotelManagement.bak

	Databases (Right-click) > Restore Database..

Download and run the web-app

  1. Run,
	$ git clone https://github.com/nickbel7/hotel-management.git
	$ cd hotel-management
  1. Add your database credentials (preferably use sa user to have all privileges) at the top of the app.py file,
	ql_user = '**'
	sql_password = '****'
	sql_server_name = '*******'
	sql_database_name = 'HotelManagement'
  1. Run the following script to download all required libraries,
	$ pip install -r requirements.txt
  1. Run the following script to enter the Project folder and start the web-server,
	$ cd Project
	$ python -m flask run
  1. Open your browser and type http://127.0.0.1:5000/ to preview the website.

SQL Queries

Here we show all the Queries used in the site at each page. Find the questions for the queries attached to the file Εκφωνήσεις

YouTube

Explaining in Greek language how to use our wep application and what queries are used in each page.
https://youtu.be/qY2IX3AB5gI

About

This is a project for the Databases class in NTUA Electrical and Computer Engineering Department

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •