0% found this document useful (0 votes)
15 views20 pages

DB Bank Answers

Uploaded by

mannora2417
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)
15 views20 pages

DB Bank Answers

Uploaded by

mannora2417
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/ 20

DB EXAM BANK

Q1

a) Define the file‐based system :


Collection of application programs that perform services for the end users
b) list three limitations of the file‐based system :
1- Separation and isolation of data
2- Duplication of data
3- Data dependence
4- Incompatible file formats

Q2

a) Define the database management System :


A software system that enables users to define, create, and maintain the database and that
provides controlled access to this database.
b) list two reasons for Database Approach arose :
1- stored separately and independently
2- Data is embedded in application programs
3- No control over access and manipulation of data beyond that imposed by application
programs

Q3

a) Define each of the following:


• Relational Database :
Shared collection of logically related data (and a description of this data), designed to
meet the information needs of an organization.
• System Catalogue :
Is a group of tables and views that provides description of data to enable program–data
independence.
b) What is the difference between Data and Meta Data :
1- Metadata : provides description of data to enable program–data independence.
2- Data : comprises entities, attributes, and relationships of an organization’s information.

Q4

a) What is the difference between:


• Data Definition language :
Permits specification of data types, structures and any data constraints.
All specifications are stored in the database.
• Data manipulation language :
General enquiry facility (query language) of the data.
b) What is the difference between the Tables and the Views in database systems :
Tables :
a collection of records that can store data you can add/update/delete data from it
Views :
is essentially some subset of the database Allows each user to have his own view

1|P ag e Shift
Q5

a) What is the difference between these concepts in Database Systems:


• Relation
Is refers to a table in a relational model based database
• Relationship
is an association among several entities.
b) list four benefits of the Views in database.
1- Reduce complexity;
2- Provide a level of security;
3- Provide a mechanism to customize the appearance of the database;
4- Present a consistent, unchanging picture of the structure of the database, even if the
underlying database is changed.

Q6

a) Please define each of the following in a list:


• The five components of the DBMS environment
1- Hardware
2- Software
3- Data
4- Procedures
5- People
• The advantages of DBMSs
1- Control of data redundancy
2- Data consistency
3- More information from the same amount of data
4- Sharing of data
5- Improved data integrity
6- Improved security
7- Enforcement of standards
8- Economy of scale
• The disadvantages of DBMSs
1- Complexity
2- Size
3- Cost of DBMS
4- Additional hardware costs
5- Cost of conversion
6- Performance
7- Higher impact of a failure
b) What is the difference between Data and Meta Data.
Data :
Data refers to all the single items that are stored in database either individually or as a
set

2|P ag e Shift
Meta Data :

Refers to name of attributes ,their types, user constraints, integrity information

(Data of Data)

Q7

a) What is the ASCI‐SPARC Architecture.


is an abstract design standard for DBMS
b) Define the three different levels of ASCI‐SPARC Architecture.
1- External Level
2- Conceptual Level
3- Internal Level
c) List three or four objectives of the ASCI‐SPARC Architecture.
1- All users should be able to access same data.
2- A user’s view is immune to changes made in other views.
3- Users should not need to know physical database storage details.
4- DBA should be able to change database storage structures without affecting the users’
views.

Q8

a) What is the difference between:


• Logical Data Independence :
Refers to immunity of external schemas to changes in conceptual schema
Conceptual schema changes should not require changes to external schema or rewrites
of application programs.
• Physical Data Independence :
Refers to immunity of conceptual schema to changes in the internal schema.
Internal schema changes should not require change to conceptual or external schemas.
b) What is the difference between:
• Data Definition language :
Permits specification of data types, structures and any data constraints.
All specifications are stored in the database.
• Data manipulation language :
General enquiry facility (query language) of the data.

Q9

a) What is the difference between:


• Procedural DML
allows user to tell system exactly how to manipulate data.
• Non‐procedural DML
allows user to state what data is needed rather than how it is to be retrieved.
b) What is the difference between:

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

a) in the Database relation, define each of the following:


• The Cardinality
How many instances of one entity will or must be connected to a single instance from
the other entities.
• The degree
number of entity types that participate in a relationship.
• The Domain
is a unique set of values permitted for an attribute in a table.
b) What are the main functions of the DBMS.
1. Authorization Services.
2. Support for Data Communication.
3. Integrity Services.
4. Services to Promote Data Independence.
5. Utility Services.

Q 11

a) is there any difference between (Relation, Table, View)? Please assign each of them to one
level in ANSI‐SPARC Model.

Relation → Conceptual Level


Table → Internal Level
View → External Level

b) Define the ERD and list its three main components.


ERD :
identifies information required by the business by displaying the relevant entities and
the relationships between them
consist of :
1- Entities
2- Attributes
3- Relationships

Q 12

a) In ERD, define each of the following:

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)

Relationship : link between entities (corresponds to primary key-foreign key


equivalencies in related tables)

b) What is the difference between:


• Regular Entity :
An Entity set that has a primary key.
• Weak Entity :
An entity set that do not have sufficient attributes to form a primary key.

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

a) What is the difference between (give an example please):


• Primary Key
Unique & Not Null
• Foreign Key
allow NULL values
b) In the Relationships of ERD, what is the meaning of :
• The Cardinality
How many instances of one entity will or must be connected to a single instance from
the other entities
• The degree
number of entity types that participate in a relationship

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

b) List four main properties of Relations in the Relational Database


• Values Are Atomic.
• Column Values Are of the Same Kind.
• Each Row is Unique.
• The Sequence of Columns is Insignificant.
Q 18

a) What is the difference between


• Super key
An attribute, or a set of attributes, that uniquely identifies a tuple within a relation.
• Candidate Key
– Super key (K) such that no proper subset is a super key within the relation.
b) The Candidate key must be Unique and Irreducible, explain?
- Because it candidate to be primary key

Q 19

a) Define each of the following

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

a) In Relational Integrity, what is the meaning of NULL value?


– Represents value for an attribute that is currently unknown or not applicable for tuple.
– Deals with incomplete or exceptional data.
– Represents the absence of a value and is not the same as zero or spaces, which are values.
b) What is the difference between:
o Entity Integrity
– In a base relation, no attribute of a primary key can be null.
o Referential Integrity
– If foreign key exists in a relation, either foreign key value must match a candidate
key value of some tuple in its home relation or foreign key value must be wholly null.

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

Employee_ID Course_ID Data_Completed

c) What is the cardinality of the COMPLETES relationship ? Many- Many Relationship


d) What is the Degree of the COMPLETES relationship ? Binary

Q 23

See the following ERD (Fig.2 ) and answer the following questions:

a) How many tables will be created from this ERD? 3

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.

Data duplication occurs when an exact copy of a piece of data is created.

normalization removes duplication and minimizes redundant chunks of data.

Define the meaning of Normal Forms .

evaluating and correcting table structures to minimize data redundancies

When designing a database, is it required to do the Third Normal form (3NF) Or it will be

correct to do 1NF and 2NF only? When finding transitive dependencies

Q 25

a) In the Normalization process, define each of the following:

Functional Dependency :

The attribute B is fully functionally dependent on the attribute A if each value of


A determines one and only one value of B.

Determinants :

table is any attribute that you can use to determine the values assigned to other
attribute(s) in the same row

b) In the following Figure (Fig 3):

What is the kind of dependency between X and Z

- Transitive dependence

What are the Dependents and the Determinants in this Figure?

- Z is Transitively dependent on X when X determines Y and Y determines Z

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

What is the result of applying Second Normal Form (2NF)?

12 | P a g e Shift
Q 28

What is the result of applying Third Normal Form (3NF)?

Q 29 What is the result of applying Second Normal Form (2NF)?

13 | P a g e Shift
• Make new tables to eliminate partial dependencies

• Reassign corresponding dependent attributes

Q 30

What is the result of applying Third Normal Form (3NF)?

• Make new tables to eliminate transitive dependencies

• Reassign corresponding dependent attributes

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

• Five basic operations in relational algebra:

• Selection,
• Projection,
• Cartesian product,
• Union, and
• Set Difference.
b) From Fig. 9, what is the output of each of these operations:

• A UNION B

• select * from A where CITY = London

Q 32

a) In the Relational Algebra, what is the meaning of:


• Selection
Works on a single relation R and defines a relation that contains only those tuples (rows) of R
that satisfy the specified condition

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.

b) From Fig. 10, what is the output of each of these operations:


• A MINUS B

• select SNAME from B where STATUS = 30 : Jones


Q 33

a) In the Relational Algebra, what is the meaning of:


Union‐compatible :
the two relations have the same no. of attributes with matching domains
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.
b) From Fig. 11, what is the output of each of these operations:
• (A)INTERSECT (B)

• select * from B where STATUS = 50 : null


Q 34

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

• The granting of a right or privilege, which enables a subject to have access to a


system or a system’s object.

• Authentication

• A mechanism that determines whether a user is who he or she claims to be.

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

a) In DB security, what is the difference between:


• Integrity :
Prevents data from becoming invalid, and hence giving misleading or incorrect results.
• Encryption :
The encoding of the data by a special algorithm that renders the data unreadable by any
program without the decryption key.
b) What is the meaning of Concurrency Control?
Coordination of the simultaneous transactions execution in a multiuser database system

Q 36

a) In DB security, what is the difference between:


• Lock
is a variable associated with a data item in the database. Generally there is a
lock for each data item in the database.
• Deadlock
occurs when each transaction T in a set of two or more transactions is waiting
for some item that is locked by some other transaction T in the set.
b) List the main properties of Transaction.
• Atomicity
• Consistency
• Isolation
• Durability
• Serializability
c) List the main components of Transaction.

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

a) In DB systems, what is the role of each of the following:

Database Administrator :

able to change database storage structures without affecting the users’ views.

able to change conceptual structure of database without affecting all users.

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

b) What is the difference between:

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

Coordination of the simultaneous transactions execution in a multiuser database system

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

a) Is there a maximum number of columns for a Table? Why?


True, because the table has 2048 column as a maximum value
b) It is not possible to duplicate the same row in the same table, why?
True, because DBMS prevent the database duplication
c) Define the Security Threat. Then give an example for each of the threats types (by figures only
Threat is a danger which could affect the security (confidentiality, integrity, availability)
of assets, leading to a potential loss or damage.
Threats Types

19 | P a g e Shift

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy