Assignment 2
Assignment 2
Assignment II
Objective
The goal of this assignment is to help you design, implement, and populate a
database for a real-world business case using DDL SQL commands. This
assignment will allow you to practice and demonstrate the use of SQL
commands for creating and modifying the database structure. You will also
gain experience in textually describing the purpose of each SQL command,
including the creation of tables, definition of constraints, and data insertion.
The assignment requires the inclusion of a description for each SQL
command, detailing the purpose of the command, the columns, constraints,
and data types used.
Task Requirements
1. Database Creation
o Use the CREATE TABLE command to create tables with
appropriate names.
o Define columns with appropriate data types and constraints.
o Description Requirement: For each table creation, include a
textual explanation of the table, its purpose, and the significance
of each column, constraint, and data type chosen.
(20 pts)
2. Constraints Definition
o Use DDL commands to define Primary Keys and Foreign Keys
for all tables.
o Description Requirement: Provide an explanation of why each
key was defined, how it relates to other tables, and the purpose
of each constraint.
(20 pts)
3. Relationship and Cardinality
o Define relationships between tables and specify their cardinality
(e.g., one-to-one, one-to-many).
o Ensure relationships are properly implemented using constraints
like FOREIGN KEY.
o Description Requirement: Textually explain how the
relationships and cardinality were implemented and why they
are necessary for the database.
(20 pts)
4. Using the ALTER Command
o Use the ALTER command to make changes to the database
structure, such as adding or modifying columns or constraints.
o Description Requirement: For each ALTER command, describe
the specific change being made and its impact on the database
structure.
(20 pts)
5. Data Population
o Insert at least 30 rows of data into each table using the INSERT
INTO command.
o Use data generation tools like Mockaroo or similar tools to create
realistic sample data.
o Description Requirement: Explain the purpose of the sample
data and how it fits into the business case. Describe the
significance of each column's data in the sample rows.
(20 pts)
Grading Criteria
Important Notes
The ER-Diagram and textual descriptions are essential parts of your
submission and must reflect the implemented database design and
constraints.
Data Types: Provide a brief explanation for each data type chosen for
the columns. For example, "The VARCHAR(255) data type is used for
the 'name' column to allow flexible lengths for names up to 255
characters."
All SQL commands and their textual descriptions must be included in
the Word or PDF submission.