make the following project: Database Systems Term Project
ABC Training Center
ABC is a training center that conducts various training courses. Each course is identified by a course no, title, units, level, and subject. Courses are conducted by instructors, who can be full time or part time. Instructors are identified by an identifier, name, mobile phone number, email, address comprising of street name, city and country, and specialty. An instructor’s employment status is determined at the time of appointment. Part time instructors work a number of hours each month and are paid according to a pay rate, which must be greater than 20, determined by the training center. Full time instructors have monthly salaries. In certain circumstances, full time instructors may be assigned additional training courses besides to their training load and they are paid as part time instructors. An instructor can train a group of students in one course for each training period. The same course may be conducted by several instructors at the same training periods. Each year is divided into 4 training periods. The starting and ending dates describe a training period. A student, described by an id, student number, name, address, at least one email, and age, may participate in up to 3 training courses per period. Students' information may be queried using first and last names.
The project consists of four phases:
In this phase, you are to develop an Enhanced Entity-Relationship (EER) diagram using UML notation for the database based on the information provided. If there are ambiguities, you must resolve them and state your assumptions. The EER diagram must conceptually model the data requirements of the enterprise.
Logical Design Phase In this phase, you must map the EER diagram into a set of relations with minimal nulls. Show primary keys and identify foreign keys.
Relations Normalization Phase In this phase, you must normalize your relational database design to the 3NF.
Database Implementation Phase In this phase, write SQL DDL statements that can be used to create the tables for the relations you obtained from phase (3) with sample data (an average of 3 rows per table). Write an SQL statement to list all instructors who are full time and worked on a part time basis in alphabetical order of names. Write an SQL statement to list all student names and their completed courses.
Given the requirements and the limitations of our interaction (as I cannot actually draw an EER diagram or execute SQL statements), I can provide a textual description of how this project could be approached in each phase:
To create the EER diagram, you need to entities, their attributes, and relationships. Here is how you can conceptualize it:
Entities and Their Attributes:
Relationships:
Assumptions:
Mapping the EER into relations and ensuring minimal nulls with primary and foreign keys:
Tables (Primary keys are underlined and foreign keys are asterisks):
Notes:
To normalize the tables to 3NF:
Creating tables using SQL (DDL):
CREATE TABLE Course ( _No INT PRIMARY KEY, Title VARCHAR(255), Units INT, VARCHAR(255), Subject VARCHAR(255) ); CREATE TABLE Instructor ( Instructor_ID INT PRIMARY KEY, Name VARCHAR(255), Mobile_Phone VARCHAR(20), Email VARCHAR(255), Street_Name VARCHAR(255), City VARCHAR(255), VARCHAR(255), Specialty VARCHAR(255), Employment_Status VARCHAR(50), Monthly_Salary DECIMAL(10, 2), Hours_Worked INT, Pay_Rate DECIMAL(10, 2) ); CREATE TABLE Training_Period ( Period_ID INT PRIMARY KEY, Start_Date, End_Date DATE ); CREATE TABLE Student ( Student INT PRIMARY KEY, Student_Number VARCHAR(255), Name VARCHAR(255), Street_Name VARCHAR255), City VARCHAR(255), Country VARCHAR(255 Email VARCHAR(255), Age INT ); -- Assuming a composite key here for the junction tables. CREATE TABLE Course_Offering ( Course_No INT, Period_ID INT, Instructor_ID INT, PRIMARY KEY (_No, Period_ID), FOREIGN KEY (Course_No) REFERENCES Course(Course_No), FOREIGN KEY (Period_ID) REFERENCES Training_PeriodPeriod_ID), FOREIGN KEY (Instructor_ID) REFERENCES Instructor(Instructor_ID) ); CREATE TABLE Student_Enrollment ( Student_ID INT, Course_No INT, Period_ID INT, PRIMARY KEY (Student_ID, Course_No, Period_ID), FOREIGN KEY (Student_ID) REFERENCES Student_ID), FOREIGN KEY (Course_No) REFERENCES Course(Course_No), FOREIGN KEY (
make the following project: Database Systems Term Project
ABC Training Center
ABC is a training center that conducts various training courses. Each course is identified by a course no, title, units, level, and subject. Courses are conducted by instructors, who can be full time or part time. Instructors are identified by an identifier, name, mobile phone number, email, address comprising of street name, city and country, and specialty. An instructor’s employment status is determined at the time of appointment. Part time instructors work a number of hours each month and are paid according to a pay rate, which must be greater than 20, determined by the training center. Full time instructors have monthly salaries. In certain circumstances, full time instructors may be assigned additional training courses besides to their training load and they are paid as part time instructors. An instructor can train a group of students in one course for each training period. The same course may be conducted by several instructors at the same training periods. Each year is divided into 4 training periods. The starting and ending dates describe a training period. A student, described by an id, student number, name, address, at least one email, and age, may participate in up to 3 training courses per period. Students' information may be queried using first and last names.
The project consists of four phases:
In this phase, you are to develop an Enhanced Entity-Relationship (EER) diagram using UML notation for the database based on the information provided. If there are ambiguities, you must resolve them and state your assumptions. The EER diagram must conceptually model the data requirements of the enterprise.
Logical Design Phase In this phase, you must map the EER diagram into a set of relations with minimal nulls. Show primary keys and identify foreign keys.
Relations Normalization Phase In this phase, you must normalize your relational database design to the 3NF.
Database Implementation Phase In this phase, write SQL DDL statements that can be used to create the tables for the relations you obtained from phase (3) with sample data (an average of 3 rows per table). Write an SQL statement to list all instructors who are full time and worked on a part time basis in alphabetical order of names. Write an SQL statement to list all student names and their completed courses.
Assumptions:
Course
**Instructor - Attributes: Instructor ID (PK), Name, Mobile Phone, Email, Street, City Country, Specialty, Employment Status (Which can determine if Monthly Salary or Hours Worked and Pay Rate attributes should be filled)
Training Period
Relationships:
In UML notation, entities would be as rectangles, relationships as diamonds, and PK as underlined attributes.
Course
Instructor -_ID (PK), Name, Mobile_Phone, Email, Street, City, Country, Specialty, Employment_Status
Training_Period
Student
Course_Instructor
Studentourse
Foreign Keys (FK) are marked and reference the Primary Key (PK) of their respective related table.
All relations are normalized to 3NF:
-- tables CREATE TABLE Instructors ( Instructor_ID INT PRIMARY KEY, -- Other attributes ); -- Similar CREATE TABLE statements for Course, Student, Training_Period -- Note: The Course_Instructor and Student_Course are -- junction tables to resolve many-to-many relationships. CREATE TABLE Coursestructor ( Course_No INT, Instructor_ID INT, Period_ID, PRIMARY KEY (Course_No, Instructor_ID, Period_ID), FOREIGN KEYCourse_No) REFERENCES Course(Course_No), FOREIGN KEY (Instructor_ID) REFERENCES Instructors(Instructor_ID), FOREIGN KEY (Period_ID) REFERENCES Training_Period(_ID) ); CREATE TABLE Student_Course ( Student_ID INT, Course_No INT, Period_ID INT, PRIMARY KEY (Student_ID, Course_No, Period_ID), FOREIGN KEY (Student_ID) REFERENCES Student(Student_ID), FOREIGN KEY (Course_No) REFERENCES Course(Course_No), FOREIGN KEY (Period_ID) REFERENCES Training_Period(_ID) ); -- Insert sample data -- INSERT INTO statements for each table with sample data goes here
-- List instructors who are full time and worked on a part-time basis, in alphabetical order SELECT Name FROM Instructors WHERE Employment_Status = 'Full time' AND Instructor_ID IN ( SELECT Instructor_ID FROM Course_Instructor WHERE Instructor_ID IN ( SELECT Instructor_ID FROM Part_Time ) ) ORDER Name; -- List all
conceptdraw.com
gleek.io
gleek.io