0% found this document useful (0 votes)
154 views6 pages

La2 1

The document describes a lab activity on relational data modeling. The activity covers understanding components of database tables like attributes, tuples, domains; characteristics of relation schemes including relation name and attributes; and describing a relation instance. Students are asked to match table components to descriptions, list attributes of sample tables, and identify degrees and cardinalities. They are also asked to label relation scheme components, write syntax for a relation scheme, and describe relation schemes and instances.

Uploaded by

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

La2 1

The document describes a lab activity on relational data modeling. The activity covers understanding components of database tables like attributes, tuples, domains; characteristics of relation schemes including relation name and attributes; and describing a relation instance. Students are asked to match table components to descriptions, list attributes of sample tables, and identify degrees and cardinalities. They are also asked to label relation scheme components, write syntax for a relation scheme, and describe relation schemes and instances.

Uploaded by

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

DFC 20203 DATABASE DESIGN

LAB ACTIVITY 2: Relational Data Model – PART 1


Duration: 4 hours

Learning Outcomes

This activity encompasses activities 2A, 2B, 2C, 2D.

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

SCENARIO

Infinity Design Solution Sdn. Bhd, an advertising company wants to automate the system
of managing Human Resources (HR) data. Miss Suria was selected to be an IT
programmer for Infinity Design Solution. En. Mohamed insist to develop a system to
manage staff payroll. Miss Suria needs to prepare preliminary research about the
components of a database table, relation scheme, relation instance, relations key and
integrity rules.

INSTRUCTION:
Answer the entire questions below.

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

Page 11 of 57
DFC 20203 DATABASE DESIGN

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
Page 12 of 57
DFC 20203 DATABASE DESIGN

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_N Quantity
o

2. Identify degree and cardinality for relation STUDENT.

Degree Cardinality
Customer_No ,Customer_Name , 1234,DIYA NATASHA,DIYA ENT.
KUCHING SARAWAK ,2345 ,FILA
Customer_Address AZIRA ,FILARA SDN. BHD, MIRI
SARAWAK ,3456 ,RINA WAFIZA ,RIZA
CUSTOMER_T ENT. SIBU SARAWAK,
4567 ,HARITH FAZLY ,HARITH,SDN.
BHD, MIRI SARAWAK ,5678 ,JERRY
STANLEY ,JERRY ENT. MUKAH
SARAWAK
PRODUCT_T Product_No ,Product_Descriptio A123 ,PENCIL, 0.30 ,B234,
n, ERASER ,0.20 ,C345,
SHARPENER ,0.50 ,D456,
Product_Unit_Price
RULER ,0.80 ,E567 ,PEN, 1.00

Page 13 of 57
DFC 20203 DATABASE DESIGN

1111 ,2014-02-01 ,1234 ,


Order_No ,Order_Date , 1122 ,2014-02-05 ,3456,1133
ORDER_T Customer_No ,2014-02-21 ,5678 ,1144,
2014-03-30 ,2345, 1155,
2014-04-01 ,4567
Order_No ,Product_No , 1111, B234, 100, 1122 ,C345,
Quantity 150, 1133, E567, 120, 1144,
ORDER_PRODUCT_T D456, 150, 1155, A123,200,
1122, A123, 150, 1144, C345,
120

Activity 2C

Activity Outcome: Understand characteristic of relation scheme:


relation name, attribute name and domain.

1. Label the following components of a database table.

Relation name Attributes

Tuple

2. Write syntax and relation scheme for relation STUDENT.

Page 14 of 57
DFC 20203 DATABASE DESIGN

Syntaxta
xntax

Relation
Relation
Scheme

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


schema for each tables.

CUSTOMER_T

PRODUCT_T

ORDER_T

ORDER_PRODUCT_T

Activity 2D

Activity Outcome : Describe a relation instance

Briefly explain your own words the definition below.

Relation
Scheme

Relation
Relation
Intancee

Page 15 of 57
DFC 20203 DATABASE DESIGN

Page 16 of 57

You might also like