Pag
Faculty Information Management System
CS & IT Department, Hazara University
Purpose: To maintain a digital record of faculty members and their responsibilities, courses, research,
and office hours.
Technologies: MySQL (or SQLite compatible) for the database backend.
SQL Implementation Overview
This implementation includes:
1. Creating the database and tables
2. Inserting sample data
3. Writing SQL queries to manage:
o Faculty profiles
o Course assignments
o Office hours
o Research projects and publications
____________________________________________________________________
STEP 1: Database Setup
First, we'll create the database and set it as the active database.
-------------------------------------------------------------------------------------------------------------------------------------
STEP 2: Drop Tables if They Already Exist
To ensure a clean slate for the database, we'll drop existing tables in the correct order to avoid foreign
key constraint issues.
Pag
---------------------------------------------------------------- ---------------------------
STEP 3: Create Tables
Now, we'll define the schema for each table.
1. Departments Table
Stores information about academic departments.
----------------------------------------------------------------------------------------------------------------------------------
2. Faculty Table
Maintains detailed profiles of faculty members.
Pag
---------------------------------------------------------------------------------------------------------------------------------
3. Courses Table
Stores details about courses offered.
4. CourseAssignments Table
Links faculty members to the courses they teach.
Pag
-----------------------------------------------------------------------------------------------------------------------------
5. OfficeHours Table
Manages the schedule of faculty office hours.
6. ResearchProjects Table
Records details of ongoing or completed research projects.
Pag
------------------------------------------------------------------------------------------------------------------------------
7. Publications Table
Stores information about faculty publications.
8. FacultyResearch Junction Table
Links faculty members to their research projects (many-to-many relationship).
Pag
----------------------------------------------------------------------------------------------------------------------------
9. FacultyPublications Junction Table
Links faculty members to their publications (many-to-many relationship).
STEP 4: Inserting Sample Data
Now we'll populate the tables with some sample data.
1. Insert Sample Data into Departments
Pag
------------------------------------------------------------------------------------------------------------------------------
2. Insert Sample Data into Faculty
-=--------------------------------------------------------------------------------------------------------------------------------
3. Insert Sample Data into Courses
4. Insert Sample Data into CourseAssignments
Pag
------------------------------------------------------------------------------------------------------------------------------
5. Insert Sample Data into OfficeHours
---------------------------------------------------------------------------------------------------------------------------------
6. Insert Sample Data into ResearchProjects
7. Insert Sample Data into Publications
Pag
---------------------------------------------------------------------------------------------------------------------------------------
8. Insert Sample Data into FacultyResearch