0% found this document useful (0 votes)
67 views

Ass 01 Ads Lab Activity1

This document outlines two lab assignment questions about modeling relationships between entities. The first question asks students to design an entity relationship diagram (ERD) for two scenarios: one involving citizenship of people in countries, and another involving students in classes. The second question asks students to implement the scenarios by coding them in MySQL, including defining primary and foreign keys with appropriate data types and constraints. Students are instructed to submit their solutions in an SQL file, text file with comments, and PDF with ERDs and code explanations.

Uploaded by

Nauman Qaiser
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views

Ass 01 Ads Lab Activity1

This document outlines two lab assignment questions about modeling relationships between entities. The first question asks students to design an entity relationship diagram (ERD) for two scenarios: one involving citizenship of people in countries, and another involving students in classes. The second question asks students to implement the scenarios by coding them in MySQL, including defining primary and foreign keys with appropriate data types and constraints. Students are instructed to submit their solutions in an SQL file, text file with comments, and PDF with ERDs and code explanations.

Uploaded by

Nauman Qaiser
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Institute of Southern Punjab, Multan Campus

Department of Computer Science & IT

Lab Assignment No. 01: -

Scenario-1:

A person must be a citizen of at most one country. A country must


have one or more than one citizens.

Scenario-2:

In a school, Each STUDENT must be allocated to exactly one class and


a CLASS must be formed by at least twenty or more than twenty
number of STUDENTs. There are Many Mandatory posts for
STUDENT’s exists in every CLASS and there are Many Mandatory
STUDENT’s assigned to different posts (like CR and GR) in every CLASS.

Question Number 1: -

Design an ERD of Scenario 1 and Scenario 2 (Transform Scenario into


Relation where required as per Logical Data Modeling of an ERD) in an
Information Engineering Standard of the above given scenario’s along
with the meaningful Attributes (Attributes are designed in an ERD as
per Type of Attributes) using any Simulator/Tool (Online Simulator
preferable)

Page 1 of 3
Question Number 2: -

As per Implementation Phase, Code the following above both


Scenarios in MySQL (also explain each line of code via Comments)
using Console and assigning Primary and Foreign keys with meaningful
Data Types (as per designed attributes) along with meaningful Range
and Referential Integrity Constraint as required using XAMPP
Integrated Development Environment (IDE).

Hint: Use Conditions like IF EXISTS and IF NOT EXISTS to make your line
of code efficient.

Important Note:

Lab Assignment 1 Deliverables: -

1) Export single SQL file of code that will generate the desired
output whenever Imported with name of Database:

lab1solution.sql

/* Hint: Drop database if exists lab5solution;


created database if not exists lab5solution;
Use lab5solution; */

Also, Both Scenarios must be implemented via coding in a single


file of SQL code using Multi-Line comments but in a same
Database.

2) Also, Make a text file of Code (Notepad File) with name:


lab1solution.txt

Both Scenario’s Coding must be commented by Using Multi Line


Comments

Page 2 of 3
3) Make a single Solution file that includes ERD Designs of Scenario
1 and 2 and Code of both Scenarios with PDF Extension starting
with Assignment Top Sheet that must be named as:
Lab1solution.pdf

4) All the deliverables as mentioned above (PDF File, SQL File and
Text File) must be mailed in a single Zipped folder that must be
named as:

Your_Name-Your_Enrollment_No.-Program_Semester and Section


Example: M. Nouman-023R23-MCS2A(W)

5) Last Date of Submission Date & Time is Updated on Blog.

6) Assignment must be mailed on the following E-mail ID:


[email protected]

So, Name of Zip Folder and Subject of Mail must be: -

Your_Name-Your_Enrollment_No.-Program_Semester and Section

Example: M. Nouman-023R23-MCS2A(W)

7) Marks of this Assignment is Equivalent to 20 Marks

8) No Late Assignment will be accepted at any cost

(Anything Missing from above mentioned Points will result in


Cancellation of your Assignment)

Page 3 of 3

You might also like