Page 465 - Computer_Science_F5
P. 465
Computer Science multivalued attributes in a single table. It Table 8. 3: Trivial dependency table
consists of at least two dependent attributes
Emp_name
Emp_id
on its attributes; thus, it always requires
Harry
AS555
at least three attributes. For example,
Mwajuma
AS811
FOR ONLINE READING ONLY
consider a motorbike manufacturing
AS999
Kelvin
company that produces two colours (black In this case, {Emp_id, Emp_name}
and red) in each model every year. Table -> Emp_id is a trivial functional
8.2 shows multivalued dependency. dependency as Emp_id is a subset of
{Emp_id, Emp_name}.
Table 8.2: Multivalued dependency
Motorbike_ Model Manuf_year Colour (iii) Non-trivial dependency
M1001 2017 Black This functional dependency occurs when
M1001 2017 Red A->B holds true where B is not a subset
M2012 2018 Black of A. In other words, if a functional
M2012 2018 Red dependency X->Y holds true, then Y is
not a subset of X; thus, this dependency
M2222 2019 Black is called a non-trivial functional
M2222 2019 Red dependency. For example, an employee
table with three attributes: emp_id,
Here columns manuf_year and colour are emp_name and emp_address. From
independent of each other and dependent this example, the following functional
on motorbike_model. In this case, the dependencies are non-trivial: emp_id ->
two columns are said to be multivalued emp_name (This means that if we know
dependent on motorbike_model. These emp_id, we know emp_name. but emp_
dependencies are represented like this: name is not a subset of emp_id) emp_id
motorbike_model ->> manuf_year; and -> emp_address (This imply that, if we
motorbike_model ->> colour. know emp_id, we know emp_address
which is not a subset of emp_id).
(ii) Trivial dependency
(iv) A transitive dependency
This type of functional dependency occurs It is a type of functional dependency that
when a set of attributes called a trivial is happens when it is indirectly formed by
included in that attribute. So, X -> Y is two functional dependencies, and can
a trivial functional dependency if Y is a only occur with three or more attributes.
subset of X. For example, consider this Consider the following Table 8.4
Employee Table 8.3 with two columns, containing the details of the company’s
Emp_id and Emp_name. Chief Executive Officers (CEOs).
456
for Advanced Secondary Schools
Computer Science Form 5.indd 456 23/07/2024 12:34

