ITC556 Sample Exam 1 + Solution
ITC556 Sample Exam 1 + Solution
ITC556 Sample Exam 1 + Solution
EXAM CONDITIONS:
NO REFERENCE MATERIALS PERMITTED
No calculator is permitted
No dictionary permitted
The student may NOT retain the question paper
2B Pencil Eraser
NUMBER OF QUESTIONS: 28
VALUE: 50%
INSTRUCTIONS TO CANDIDATES:
1. Enter your name and student number and sign the space provided below.
2. This is a closed book examination; therefore no written material, reference books or notes will
be permitted in the examination room.
3. The examination paper, together with all answer booklets, must be returned at the completion
of the examination.
4. Section 1 consists of 20 multiple choice questions, each worth 1.25 mark. The answers to these
questions must be marked on the GPAS supplied with a 2B pencil.
7. Section 2 consists of five short answer questions each worth 5 marks. Section 3 has 3 design
questions. The marks allocated to each question are indicated. Write your answers in the answer
booklet provided.
6. You should answer ALL questions.
SIGNATURE …………………………………………………………………………………………….
Instructions:
For each question, select the single best response from the options given. Circle the
corresponding letter on your supplied GPAS.
There is no negative marking for incorrect answer. Attempt all questions. All questions
have equal value (1.25 mark each).
2. A(n) _____ join links tables by selecting only the rows with common values in
their common attribute(s).
A) attribute
B) natural
C) unique
D) foreign
4. _____ is defined as the condition in which all of the data in the database are consistent
with the real-world events and conditions.
A) Data quality
B) Data anomaly
C) Data integrity
D) Data Inconsistency
5. An XML database supports the storage and management of _____ XML data.
A) Structured
B) Multi-structured
C) Unstructured
D) Semi-structured
7. A table that has all key attributes defined, has no repeating groups, and all its attributes
are dependent on the primary key is said to be in _____.
A) 2NF
B) 3NF
C) 1NF
D) BCNF
8. BCNF can be violated only if the table contains more than one _____ key.
A) secondary
B) primary
C) candidate
D) foreign
10. A _____ derives its name from the fact that a collection of multiple entries of the same
type can exist for any single key attribute occurrence.
A) transitive dependency
B) repeating group
C) partial dependency
D) primary key
11. Attribute A _____ attribute B if all of the rows in the table that agree in value for
attribute A also agree in value for attribute B.
A) derives from
B) controls
C) joins
D) determines
12. A(n) _____ join performs a relational product (also known as the Cartesian product) of
two tables
A) cross
B) full
C) natural
D) equii
14. A(n) _____ query specifies which data should be retrieved and how it should be filtered,
aggregated, and displayed.
A) UPDATE
B) INSERT
C) SELECT
D) COMMIT
15. In subquery terminology, the first query in the SQL statement is known as the _____
query.
A) inner
B) outer
C) join
D) sum
16. Complex _____ requirements may dictate data transformations, and they may expand
the number of entities and attributes within the design.
A) entity
B) information
C) design
D) processing
18. A _____ entity has a primary key that is partially or totally derived from the parent entity
in the relationship.
A) strong
B) parent
C) weak
D) child
Instructions:
1. What is data redundancy, and which characteristics of the file system can lead
to it?
Solution: Data redundancy exists when unnecessarily duplicated data are found in the
database. For example, a customer's telephone number may be found in the customer
file, in the sales agent file, and in the invoice file. Data redundancy is symptomatic of
a (computer) file system, given its inability to represent and manage data
relationships. Data redundancy may also be the result of poorly-designed databases
that allow the same data to be kept in different locations. (Here's another opportunity
to emphasize the need for good database design!)
Solution: A table is in Boyce-Codd Normal Form (BCNF) when it is in 3NF and every
determinant in the table is a candidate key. For example, if the table is in 3NF and it
contains a nonprime attribute that determines a prime attribute, the BCNF
requirements are not met. (Reference the text's Figure 6.8 to support this
discussion.)This description clearly yields the following conclusions:
3. What is a data warehouse, and what are its main characteristics? How does it
differ from a data mart?
Solution: OLAP stands for On-Line Analytical Processing and uses multidimensional
data analysis techniques. OLAP yields an advanced data analysis environment that
provides the framework for decision making, business modeling, and operations
research activities. Its four main characteristics are:
5. What are the key assumptions made by the Hadoop Distributed File System
approach?
Instructions:
1. Given the following business scenario, create a Crow’s Foot ERD using a
specialization hierarchy if appropriate. (15 Marks)
Solution:
2. The dependency diagram in figure below indicates that authors are paid royalties for
each book that they write for a publisher. The amount of the royalty can vary by
author, by book, and by edition of the book. (7.5+7.5=15 Marks)
NOTE: If you find that drawing it difficult, please show dependencies by using
braces .For example functional dependency of ISBN->BookTitle can be
written as ISBN(BookTitle).
1. Write the SQL code that will create the table structure for a table named
EMP_1. This table is a subset of the EMPLOYEE table. The basic EMP_1 table
structure is summarized in the table below. (Note that the JOB_CODE is the FK
to JOB.)
EMP_NUM CHAR(3)
EMP_LNAME VARCHAR(15)
EMP_FNAME VARCHAR(15)
EMP_INITIAL CHAR(1)
JOB_CODE CHAR(3)
Solution:
EMP_INITIAL CHAR(1),
EMP_HIREDATE DATE,
JOB_CODE CHAR(3),
2. Having created the table structure, write the SQL code to enter the first two rows
for the table shown in Figure below.
Solution:
INSERT INTO EMP_1 VALUES (‘101’, ‘News’, ‘John’, ‘G’, ’08-Nov-00’, ‘502’);
INSERT INTO EMP_1 VALUES (‘102’, ‘Senior’, ‘David’, ‘H’, ’12-Jul-89’, ‘501’);
Solution:
SELECT *
FROM EMP_1
4. Write the SQL code that will save the changes made to the EMP_1 table.
Solution:
COMMIT;
5. Write the SQL code to change the job code to 501 for the person whose employee
number (EMP_NUM) is 107. After you have completed the task, examine the
results, and then reset the job code to its original value.
Solution:
UPDATE EMP_1
SELECT *
FROM EMP_1
To reset, use
ROLLBACK;