Assignment 1

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Assignment 1

DBMS
Maharshi M Chaudhary

Objective:
The objective of this assignment is to familiarize students with the basic concepts of creating
database tables and inserting records into them using SQL in a Database Management
System (DBMS) environment.

A. Create a database schema named "University" which includes the following tables:
1. Students
2. Courses
3. Enrollments
B. Define appropriate attributes (columns) for each table based on the provided
requirements.

C. Set primary keys, foreign keys, and any necessary constraints to maintain data integrity.
D. Insert sample records into each table to demonstrate data insertion.

Write SQL queries to perform the above tasks.


Students Table:
Attributes:

StudentID (Primary Key),Name,Age,Gender,Address

Courses Table:
Attributes:
CourseID (Primary Key),CourseName,Instructor,Credits

Enrollments Table:
Attributes:
EnrollmentID (Primary Key),StudentID (Foreign Key referencing Students table),CourseID (Foreign Key
referencing Courses table),EnrollmentDate

You might also like