Database Project Report
Database Project Report
Overview
Key Features
1. User Authentication: The system allows users to sign up and sign in. It checks for
existing users during sign-up and validates credentials during sign-in.
2. Appointment Booking: Users can book appointments by providing their details and a
message describing their requirements.
3. User Session Management: The application manages user sessions to keep track of
logged-in users and allows them to log out when done.
4. Information Pages: The application includes static information pages such as a
homepage and an about page.
5. Database Schema
Users Table: Stores user details including first name, last name, email, and
password.
Appointments Table: Stores appointment details including the user's full name,
email, phone number, and message.
6. Flask Routes and Functionality
Home Route (/home): Renders the homepage.
Sign-in Route (/): Handles user login. Validates user credentials against the
database and redirects to the homepage upon successful login.
Sign-up Route (/signup): Handles user registration. Checks for existing users
and inserts new user details into the database.
Logout Route (/logout): Manages user logout and session clearing.
About Route (/about): Renders the about page.
Appointment Route (/appointment): Handles appointment booking by
inserting appointment details into the database.
7. Database Connection
app = Flask(__name__)
app.secret_key = 'your secret key'
9. User Sign-In
@app.route("/logout")
def logout():
session.pop('loggin', None)
session.pop('username', None)
return redirect(url_for('signin'))
This Hospital Database Management System serves as a foundational project for managing
hospital appointments and user authentication. With further enhancements and additional
features, it can be expanded into a comprehensive hospital management system.