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

Workbook Activity 2

1. The document discusses several lab activities related to relational databases. The activities help students understand key concepts like the components of a database table, relational schemas, and primary keys. 2. One activity involves matching terms like attributes, tuples, and domains to their definitions. Another requires students to analyze sample tables and answer questions about attributes, degrees, and cardinalities. 3. Students are asked to write the relational schemas of tables from an order management example database based on identifying the relation name and attribute names and domains. The activities aim to help students comprehend fundamental relational database concepts.

Uploaded by

Nurul Iman
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)
239 views5 pages

Workbook Activity 2

1. The document discusses several lab activities related to relational databases. The activities help students understand key concepts like the components of a database table, relational schemas, and primary keys. 2. One activity involves matching terms like attributes, tuples, and domains to their definitions. Another requires students to analyze sample tables and answer questions about attributes, degrees, and cardinalities. 3. Students are asked to write the relational schemas of tables from an order management example database based on identifying the relation name and attribute names and domains. The activities aim to help students comprehend fundamental relational database concepts.

Uploaded by

Nurul Iman
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

DEPARTMENT OF INFORMATION AND COMMUNICATION TECHNOLOGY

Name :NURUL IMAN BINTI MD NOR Reg. No. :21DDT21F1206


Code & Course : DFC 20203 Class : DDT2C
Lecturer(s) : PN. ZAMHARIAH BT. Date :
Lab : 1 / 2 /3 Duration :

Activity 1F
Activity Outcome: Identify the contribution of database technology to the society.

1. In groups of two, discuss and list the contribution of database technology to the society.

1. communicate information related to your Business


sales transactions, product inventory,
customer profiles, and marketing activities.
Without a centralised place to store all this
information, you have no clue what is
occurring within your business.

1. Learning new skills and acquiring new

knowledge are two very important aspects of

life that learners should be able to enjoy’

Education

Social workers use technology in

creative ways to address compelling


Social Work
social justice issues, organize

communities, administer

organizations, and develop social

policy. Social workers also explore

and develop new technologies for


LAB ACTIVITY 2: Relational Databases
Duration: 4 hours
Learning Outcomes

This activity encompasses activities 2A, 2B ,2C, 2D, 2E and 2F.


By the end of this tutorial session, you should be able to:
1. Understand components of a database table: record(tuple), attribute(field), domain,
degree and cardinality
2. Understand characteristic of relation scheme:
a. Relation name
b. Attribute name
c. Domains
3. Describe a relation instance
4. Identify relations key: Primary key, Candidate key and Foreign key
5. Understand integrity rules:
a. Entity integrity
b. Referential integrity

Activity 2A

Activity Outcome : Understand components of a database table: record(tuple),


attribute(field), domain, degree and cardinality

Match the components of a database table below with its appropriate description.

Attribute Tuple Domain Degree Cardinality

Degree • Total number of attributes of one relation

Domain • One set values for one or more attributes

• One row in one relation


Tuple
• Also known as record in MS Access table

Cardinality • Total number of tuples of one relation

• One column in one relation


Attribute
• Also known as field in MS Access table
Activity 2B

Activity Outcome : Understand components of a database table: record(tuple),


attribute(field), domain, degree and cardinality

Consider the database below that consists of four relations, namely CUSTOMER_T,
PRODUCT_T, ORDER_T and ORDER_PRODUCT_T. Answer the following questions:

CUSTOMER_T

Customer_No Customer_Name Customer_Address


1234 DIYA NATASHA DIYA ENT. KUCHING
SARAWAK
2345 FILA AZIRA FILARA SDN. BHD, MIRI
SARAWAK
3456 RINA WAFIZA RIZA ENT. SIBU SARAWAK
4567 HARITH FAZLY HARITH SDN. BHD, MIRI
SARAWAK
5678 JERRY STANLEY JERRY ENT. MUKAH
SARAWAK

PRODUCT_T
Product_No Product_Description Product_Unit_Price
A123 PENCIL 0.30
B234 ERASER 0.20
C345 SHARPENER 0.50
D456 RULER 0.80
E567 PEN 1.00

ORDER_T
Order_No Order_Date Customer_No
1111 2014-02-01 1234
1122 2014-02-05 3456
1133 2014-02-21 5678
1144 2014-03-30 2345
1155 2014-04-01 4567

ORDER_PRODUCT_T
Order_No Product_No Quantity
1111 B234 100
1122 C345 150
1133 E567 120
1144 D456 150
1155 A123 200
1122 A123 150
1144 C345 120
1. List all the attributes for each tables.

CUSTOMER_T PRODUCT_T ORDER_T ORDER_PRODUCT_T


Customer_No Product_No Order_No Order_No
Customer_Name Product_Description Order_Date Product_No
Customer_Address Product_Unit_Price Customer_No Quantity

2. Identify degree and cardinality for relation STUDENT.

Degree Cardinality
CUSTOMER_T
3 5

PRODUCT_T
3 5

ORDER_T
3 5

ORDER_PRODUCT_T
3 7
Activity 2C

Activity Outcome : Understand characteristic of relation scheme: relation name, attribute


name and domain based on Figure 5.1:

1. Label the following components of a database table.

Etity Attributes

Cardinality

2. Write syntax and relation scheme for relation STUDENT.

• RelationName ( attribute _1, attribute_2,....., attribute_n)


Syntax

• STUDENT ( Name, Ssn, Home_phone, Address, Office-phone, Age, Gpa)


Relation
Scheme

3. Based on ORDER_STATIONERY database in Activity 2B, write the relation schema


for each tables.

CUSTOMER_T Customer_No,Customer_Name,Customer_Address)

PRODUCT_T (Product_No,Product_Description,Product_Unit_Price)

ORDER_T (Order_No,Order_Date,Customer_No)

ORDER_PRODUCT_T (Order_No,Product_No,Quantity)

You might also like