Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create a complete Entity - Relationship ( ER ) diagram for a Student Information System and identify the entities and their relationships. Here's a simplified
Create a complete EntityRelationship ER diagram for a Student Information System and identify the entities and their relationships.
Here's a simplified ER diagram for a Student Information System, including key entities:
Entity Attribute
Student
StudentID Primary Key FirstName, LastName, DateOfBirth, Gender, Email, Phone, Address
Course CourseID Primary Key CourseName, Credits
Enrollment EnrollmentID Primary Key StudentID Foreign Key referencing Student CourseID Foreign Key referencing Course EnrollmentDate
Faculty FacultyID Primary Key FirstName, LastName, Email, Phone
Department DepartmentID Primary Key DepartmentName
Grade GradeID Primary Key GradeName
Attendance
AttendanceID Primary Key StudentID Foreign Key referencing Student CourseID Foreign Key referencing Course Date, Status
Classroom RoomID Primary Key RoomNumber, Capacity
User UserID Primary Key Username, Password, Role eg student, faculty, admin
Relationships: Below are some established relationships created for you. Your task is to complete the rest of the relationships using the selections provided.
A Student can be enrolled in multiple Courses. OnetoMany relationship between Student and Enrollment
A Course can have multiple Enrollments. OnetoMany relationship between Course and Enrollment
A Faculty can teach multiple Courses. OnetoMany relationship between Faculty and Course
A Department can offer multiple Courses. OnetoMany relationship between Department and Course
An Enrollment has one Grade. ManytoOne relationship between Enrollment and Grade
A Student can have multiple Attendances. OnetoMany relationship between Student and Attendance
A User can be associated with one or more Students or Faculty members. OnetoMany relationship between User and StudentFaculty
Submit your answers for grading:
A Course can have multiple Attendances. Fill In the blank relationship between Course and Attendance Select one of the options listed below and type the letter in the space provided.
a OnetoMany
b ManytoOne
c ManytoMany
d None of the listed choices
A Course can be assigned to multiple Classrooms. Fill In the blank relationship between Course and Classroom Select one of the options listed below and type the letter in the space provided.
a OnetoMany
b ManytoOne
c ManytoMany
d None of the listed choices
ANNEX
Definitions
Data Definition Language DDL deals with database schemas and descriptions, of how the data should reside in the database.
CREATE to create a database and its objects table index, views, store procedure, function, and triggers
ALTER alters the structure of the existing database.
DROP deletes objects from the database.
TRUNCATE removes all records from a table; also, all spaces allocated for the records are removed.
COMMENT adds comments to the data dictionary.
RENAME rename an object.
Data Manipulation Language DML used for data manipulation, and includes most common SQL statements such SELECT, INSERT, UPDATE, DELETE, etc. DDL is used to store, modify, retrieve, delete, and update data in the database.
Data Control Language DCL includes commands such as GRANT, and is mostly concerned with rights, permissions, and other controls of the database system.
GRANT allow users access privileges to the database.
REVOKE withdraw users' access privileges given by using the GRANT command.
Transaction Control Language TCL deals with transactions within a database.
COMMIT commits a transaction.
ROLLBACK Rollback a transaction in case of any error occurs.
SAVEPOINT a point inside a transaction that allows a rollback state to what it was at the time of the save point.
SET TRANSACTION specify characteristics for the transaction.
Data Definition Language DDL
CREATE TABLE Student
StudentID INT PRIMARY KEY,
FirstName VARCHAR
LastName VARCHAR
DateOfBirth DATE,
Gender VARCHAR
Email VARCHAR
Phone VARCHAR
Address VARCHAR
;
CREATE TABLE Course
CourseID INT PRIMARY KEY,
CourseName VARCHAR
Credits INT
;
CREATE TABLE Enrollment
EnrollmentID INT PRIMARY KEY,
StudentID INT,
CourseID INT,
EnrollmentDate DATE,
FOREIGN KEY StudentID REFERENCES StudentStudentID
FOREIGN KEY CourseID REFERENCES CourseCourseID
;
CREATE TABLE Faculty
FacultyID INT PRIMARY KEY,
FirstName VARCHAR
LastName VARCHAR
Email VARCHAR
Phone VARCHAR
;
CREATE TABLE Department
DepartmentID INT PRIMARY KEY,
DepartmentName VARCHAR
;
CREATE TABLE Grade
GradeID INT PRIMARY KEY,
GradeName VARCHAR
;
CREATE
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started