DB Bank Answers
DB Bank Answers
Q1
Q2
Q3
Q4
1|P ag e Shift
Q5
Q6
2|P ag e Shift
Meta Data :
(Data of Data)
Q7
Q8
Q9
3|P ag e Shift
• Data Model
Integrated collection of concepts for describing data, relationships between data, and
constraints on the data in an organization.
• Database
A collection of related data.
Q 10
Q 11
a) is there any difference between (Relation, Table, View)? Please assign each of them to one
level in ANSI‐SPARC Model.
Q 12
Entity : person, place, object, event, concept (often corresponds to a real time object
that is distinguishable from any other object)
4|P ag e Shift
Attribute : property or characteristic of an entity type (often corresponds to a field in a
table)
Q 13
a) In ERD, define each of the following and give a simple example for each of them:
• Entity
(often corresponds to a real time object that is distinguishable from any other object)
Ex : person, place, object, event, concept
• Attribute
property or characteristic of an entity type Ex : often corresponds to a field in a table
• Relationship :
link between entities
Ex : corresponds to primary key-foreign key equivalencies in related tables
b) What is the difference between (list an example for each):
5|P ag e Shift
Q 14
a) In ERD, define each of the following and give a simple example for each of them:
• Simple Attribute
A Simple attribute can uniquely identify an entity from an entity set. For example,
student roll number can uniquely identify a student from a set of students
• Composite Attribute
An attribute that is a combination of other attributes is known as composite attribute.
For example, In student entity, the student address is a composite attribute as an
address is composed of other attributes such as pin code, state, country.
• Derived Attribute
A derived attribute is one whose value is dynamic and derived from another attribute. It
is represented by dashed oval in an ER Diagram. For example – Person age is a derived
attribute as it changes over time and can be derived from another attribute (Date of
birth).
b) What is the difference between:
• Primary Key :
is the candidate key that is chosen by the database designer as the unique identifier of
an entity. [Unique & Not Null]
• Composite Primary Key :
is a combination of two or more columns in a table that can be used to uniquely identify
each row in the table when the columns are combined uniqueness is guaranteed
Q 15
Q 16
a) Give an example for each of the following (with a simple figure only):
• Unary Relationship : Between two instances of one entity type
• Binary Relationship : Between the instances of two entity types
• Ternary Relationship : Among the instances of three entity types
6|P ag e Shift
b) What the difference between:
• Relation Schema
is the collection of relation schemas for a whole database
• Relational Database Schema
is a collection of meta-data
Q 17
a) Give an example for each of the following ERD relationship (with a simple figure only):
• 1:1 1:M M:N
Q 19
7|P ag e Shift
• Irreducibility :
means no proper subset of K has the uniqueness property.
• Uniqueness :
means in each tuple of R, values of K uniquely identify that tuple.
b) What is the difference between:
• Primary Key
Candidate key selected to identify tuples uniquely within relation.
• Alternate Key
Candidate keys that are not selected to be primary key.
Q 20
Q 21
a) Define the Transaction concept and list its four main properties.
- Transaction is considered as a logical unit of work
Transaction properties are:
1- Atomicity
2- Consistency
3- Isolation
4- Durability
b) What is the difference between:
o Base Relation :
Named relation corresponding to an entity in conceptual schema, whose tuples are
physically stored in database.
o View
Dynamic result of one or more relational operations operating on base relations to
produce another relation.
o Materialized View
– Materialized view materializes physical data by making a physical copy of data from
tables.
– Materialized view is referred to a view with saved expression and schema.
Q 22
a) See the following ERD (Fig. 1) and answer the following questions:
8|P ag e Shift
a) How many tables will be created from this ERD? 3
b) Draw all tables please (just empty tables without data)
Employee_ID Employee_Name Course_ID Course_Name
Q 23
See the following ERD (Fig.2 ) and answer the following questions:
9|P ag e Shift
b) What is the type of relationship between (Department) and (Employee) :
1:M
c) What is the Degree of the WORKS_IN2 relationship : Ternary
Q 24
Explain the difference between the Data Redundancy and the Data Duplication in Relational
database and discuss how the Normalization process deals with each of them?
Data redundancy occurs when the same data is entered in to two or more fields of a
database.
When designing a database, is it required to do the Third Normal form (3NF) Or it will be
Q 25
Functional Dependency :
Determinants :
table is any attribute that you can use to determine the values assigned to other
attribute(s) in the same row
- Transitive dependence
10 | P a g e Shift
Q 26
From Fig. 4, What is the result of applying First Normal Form (1NF)?
11 | P a g e Shift
Q 27
12 | P a g e Shift
Q 28
13 | P a g e Shift
• Make new tables to eliminate partial dependencies
Q 30
14 | P a g e Shift
Q 31
a) Explain the difference between Relational Algebra and SQL, then list the five main operations
of Relational Algebra.
o Relational Algebra : is a formal structure consisting of sets and operations on those sets.
o SQL : is used to communicate with a database
• Selection,
• Projection,
• Cartesian product,
• Union, and
• Set Difference.
b) From Fig. 9, what is the output of each of these operations:
• A UNION B
Q 32
15 | P a g e Shift
• Projection
Works on a single relation R and defines a relation that contains a vertical subset of R, extracting
the values of specified attributes and eliminating duplicates.
a) Define the meaning of Database Security, explain the difference between Authorization and
Authentication.
Database Security :
Mechanisms that protect the database against intentional or accidental
threats.
• Authorization
• Authentication
16 | P a g e Shift
b) Define the Security Threat. Then give an example for each of the threats types (by figures only
o Threat is a danger which could affect the security (confidentiality, integrity, availability)
of assets, leading to a potential loss or damage.
Threats Types
Q 35
Q 36
17 | P a g e Shift
- SELECT statement
- Series of related UPDATE statements
- Series of INSERT statements
- Combination of SELECT, UPDATE, and INSERT statements
Q 37
Database Administrator :
able to change database storage structures without affecting the users’ views.
Data Administrator :
implements and executes data mining projects and creates reports to provide insight into
sales, marketing and purchasing opportunities and trends.
Database Design :
is responsible for defining the detailed database design, including tables, indexes, views,
constraints, triggers, stored procedures, and other database-specific constructs needed to store,
retrieve, and delete persistent objects
Database Security :
Data is a valuable resource that must be strictly controlled and managed, as with any
corporate resource.
Database Integrity
is the maintenance of, and the assurance of the accuracy and consistency of data
Concurrency Control
Q 38
a) In Relational Database, the NULL value is equal to Zero, Correct? Explain your answer.
False, A null is not the same as 0 (zero) or blank. Null means no entry has been made for the
column and it implies that the value is either unknown or inapplicable
b) In ERD, define each of the following and give a simple example for each of them:
• Single‐value Attribute :
is an attribute that can have only a single value
• Multi‐value Attribute
can have more than one value at a time for an attribute
18 | P a g e Shift
• Derived Attribute
is an attribute whose value is calculated (derived) from other attributes
Q 39
a) In Relational Database, the Relational Algebra is executed by DBMS, correct? Explain your
Answer
False, Relational algebra is (more) procedural language
b) The database administrator is the person who is responsible of drawing the ERD, correct?
Explain your answer
False, because it is Data designer role
c) Can we include two tables with the same name in the same Database? Why?
False, because the table has a unique name.
Q 40
19 | P a g e Shift