0% found this document useful (0 votes)
7 views5 pages

ICS 321: Database Systems (232) Homework # 1 Due: February 17, 2024

The document outlines a homework assignment for ICS 321: Database Systems, due on February 17, 2024, which includes definitions and examples of key database concepts, a 3-tier architecture diagram, and a work plan for data design phases. It also discusses integrity constraints related to database update operations and provides a scenario for creating an Entity Relationship diagram for a courier company's product tracking system. The assignment requires students to demonstrate understanding of database management and design principles.
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)
7 views5 pages

ICS 321: Database Systems (232) Homework # 1 Due: February 17, 2024

The document outlines a homework assignment for ICS 321: Database Systems, due on February 17, 2024, which includes definitions and examples of key database concepts, a 3-tier architecture diagram, and a work plan for data design phases. It also discusses integrity constraints related to database update operations and provides a scenario for creating an Entity Relationship diagram for a courier company's product tracking system. The assignment requires students to demonstrate understanding of database management and design principles.
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/ 5

ICS 321: Database Systems (232)

Homework # 1
Due: February 17, 2024

1. Give one example each to illustrate the following terms:

i. Database, Database System, Database Management System


Database: database at kfupm that includes students, departments …information

Database System: kfupm application and its database.(includes db and a program)

DBMS: a collection/group of software tools used to manage and manipulate databases such as
MySQL, oracale,Mariadb.

ii. Relations, Attributes, Tuples, Constraints (Entity, Referential Integrity, Semantic


Integrity)
Relations: refers to a table that stores data. For example, a company's database may have a table
named "Employees" that contains information about all the employees.

Attributes: the characteristics or properties associated with a relation (table). In the "Employees"
table, attributes could include "EmployeeID," "Name,".

Tuples: A tuple refers to a single row or record in a relation (table). In the "Employees" table, each
tuple represents a specific employee's information, such as their unique EmployeeID.

Entity Constraint: having an attribute that ensures that every tuple has a unique identifier , the
EmployeID attribute could be defined as the primary key.

Referential Integrity Constraint: If the database has another table called "Departments" with a
foreign key attribute "DepartmentID" in the "Employees" table, a referential integrity constraint
can enforce that the DepartmentID values in the "Employees" table match valid DepartmentID
values in the "Departments" table, you can not insert a value in the foreign key that does not exist
in the primary key.

Semantic Integrity : the salary of an employee should not exceed the salary of the employee’s supervisor
and the maximum number of hours an employee can work on all projects per week is 56, or the salary of the
employee must be positive

2. A database system uses an Apache web server, a WebLogic Application server, and an Oracle
database. Draw a 3-tier architecture for this system. Use the Internet to identify the latest versions
of the above-mentioned software to use in your architecture diagram.
3. As the leader of the data design team, you have been asked to bring a work plan that identifies the
phases of data design and includes the following information for each phase:

• description of the data design phase

• the inputs of the phase

• the outputs of the phase

Based on the above scenario, fill up the following table:


Data Design Phase Description Inputs Outputs
Requirements interview prospective database database users Complete and specified
Gathering users to understand and requirements. requirements get
document their data documented
requirements.
Conceptual Design create a conceptual schema for The requirements Conceptual ER diagram
the database, using a high-level that we gathered from the describes the
conceptual data model. the previous phase. requirements and
constrains
Logical Design Converting the conceptual Conceptual ER database schema in the
design into a relational model diagram implementation data
that can be implemented model of the DBMS
Physical Design Defining the underlying DB schema the internal storage
physical structure structures, file
organizations, indexes,
access paths, and physical
design parameters for the
database files are
specified.
4. Suppose that each of the following Update operations is applied directly to the database
state shown in Figure 5.6. Discuss all integrity constraints violated by each operation, if any, and
the different ways of enforcing these constraints.

Insert <‘Robert’, ‘F’, ‘Scott’, ‘943775543’, ‘1972-06-21’, ‘2365 Newcastle Rd, Bellaire, TX’, M, 58000, ‘888665555’, 1>
into EMPLOYEE. the internal storage struc tures, file organizations, indexes, access paths, and physical design
parameters for the database files are specified.
a.

No violation.
b. Insert <‘ProductA’, 4, ‘Bellaire’, 2> into PROJECT.

Refrential integrity constraint has been violated since Dnum in project relation refers to Dnumber in
Department relation, and there is no tuple in Department relation has the value 2 for Dnumber
attribute.

We can enforce by :
1- Rejecting
2- Inserting a tuple in Department relation that has Dnumber value =2
3- Change the inserted value to a value that already exist.

c. Insert <‘Production’, 4, ‘943775543’, ‘2007-10-01’> into DEPARTMENT.

Key constraint has been violated since there is a department that has the value 4 for Dnumber primary
key attribute.

We can enforce by:


1- Rejecting
2- Changing the Dnumber to a unused value.
d. Delete the WORKS_ON tuples with Essn = ‘333445555’.
Good to go.
e. Delete the EMPLOYEE tuple with Ssn = ‘987654321’.
Referential integrity constraint has been violated because there are tuples in this and several
other relations that refer to the "Ssn" value of the tuple that is being deleted. We can enforce this
constraint by:

•1-deleting every tuple, from this and other relations, that has a reference to the "Sen" value of
the tuple that is being deleted and doing the new required deletions in a cascade

2-changing the value of each attribute that refers to the "Ssn" value, of the tuple that is being
deleted, to some other allowed value, and doing the new required changes in a cascade

F- Modify the Mgr_ssn and Mgr_start_date of the DEPARTMENT tuple with Dnumber = 5 to ‘123456789’ and ‘2007-10-01’,
respectively.

Good to go
G-Modify the Super_ssn attribute of the EMPLOYEE tuple with Ssn = ‘999887777’ to ‘943775543’.

Good to go

5. A courier company maintains up-to-date information on the processing and current location of
each shipped item. To do this, the courier relies on a company-wide system described as follows:
• Shipped items are the heart of the courier product tracking information system. Shipped
items can be characterized by item number (unique), weight, dimensions, insurance
amount, destination, and final delivery date.
• Shipped items are received into the courier system at a single retail center. Retail centers
are characterized by their type, unique ID, and address.
• Shipped items make their way to their destination via one or more standard the courier
transportation events (i.e., flights, truck deliveries). These transportation events are
characterized by a unique schedule number type (e.g., flight, truck) and a delivery route.

Create an Entity Relationship diagram that captures this information about the courier system.
Be certain to indicate identifiers and cardinality constraints.

You might also like