Review Questions - Chapter One Introduction To Database
Review Questions - Chapter One Introduction To Database
Review Questions - Chapter One Introduction To Database
INTRODUCTION TO DATABASE
1.List four government sectors in your country that use database systems
I. AIR TAZANIA
II. TANESCO
III. TANZANIA REVENUE AUTHORITY(TRA)
IV. TANZANIA TELECOMMUNICATION COMPANY(TTCL)
2.Discuss each of the following terms:
I. Data- is the item stored in database and represented as text, numbers or
multimedia. Acts as bridge between machine components and human components.
It can be processed or unprocessed.
II. Database-is the specialized structure that allow computer-based system to store,
manage and retrieve data very quickly. A school database may have tables of
students, teachers and other staff and these tables would have different field that
are relevant to the stored information.
III. Database management system-is the collection of programs that manage database
structure and control access to the data stored in the database.
IV. Database application program- is the computer program that retrieve information
from computerized database. It can create, search, calculate and share information.
V. Data independence-is the property of database Management System that helps you
to change the database schema at one level of a database system without requiring
to change the schema at the next higher level. It can be physical or logical data
independence.
VI. Security-refers to the range of tools, controls measures designed to establish and
preserve database confidentiality, integrity and availability.
VII. Integrity-is the principle of cyber security which ensure the accuracy, trustworthiness
and validity of information through it’s life cycle. Effective measures should be taken
to prohibit the alteration of data that can be done by unauthorized person.
VIII. Views-is a searchable object in a database that is defined by query.it sometimes
referred to as virtual table you can query a view like you query a table. Is created
from a query using CREATE VIEW command.
3.Describe the role of database management systems (DBMS) in the database approach.
Discuss why knowledge of DBMS is important for database administrators.
I. The role of database management system.
II. Allow users to define the database through data definition language
III. Allow users to insert, update, delete and retrieve data from database through data
manipulation language.
IV. It provides controlled access to the database.
4.Why knowledge of DBMS is important for database administrators.
I. Control of data redundancy- integrating the files so that multiple copies of the same
data are not stored.
II. Data consistency. By eliminating data redundancy, the risk of inconsistence occurring
is reduced. Help the administrator to change and control the data easily.
III. Sharing of data. Database belongs to the organization can be shared to all of
authorized users.
IV. More information from the same amount of data. This helps the administrator to
access data easily due to integration of the files that are relates to each other.
5.Describe the main characteristics of the database approach and contrast it with the file-
based approach.
I. Self-describing nature of the database. Meaning that it contains not only the
database but also its meta-data and it’s stored within database management system.
And in file-based system the definition of data is embedded in application programs.
II. Isolation between programs and data(data abstraction). The DBMS doesn’t require
changes to many cases. But in file- based system, when making changes you should
also making changes to the application programs since the data definition is
embedded in application programs
III. Support of multiple users. The DBMS support subset of the database since it has
many users and each one requires a special view of the database. But in file-based
system each file manages its own data.
6.Describe the five components of the DBMS environment and discuss how they relate to
each other
I. Hardware is the important component in DBMS, since DBMS itself and other
application programs run through the presence of hardware like small computer and
mainframes and servers that runs backend DBMS. So hardware runs the DBMS and
other application programs which is software.
II. Software. This component includes DBMS software itself, the application programs,
the operating system, including network software if the DBMS is being used over a
network.
III. Data.Perhaps the most important component of the DBMS environment—certainly
from the end-users’ point of view. Acts as a bridge between hardware and people.
IV. Procedures. This is the instructions and rules that govern the design and use of the
database. Example of the procedures is to login to the system which involve user of
the system(people).
V. People. Are the ones that are using the database. Controlling each component
above.
7.Discuss the roles of the following personnel in the database environment:
I. data administrator – is the person that manages the data resource including
database planning developing and maintaining procedures.
II. database administrator-is the responsible with physical realization of the database,
including the database design and its implementation, maintenance of the operating
system
III. logical database- designer is the designer the identifying the constraints on data,
identifying entities and attributes.
IV. physical database designer- is the designer that make logical design to be physical
realized.
V. application developer-providing application programs that provides functionality to
the end-user.
VI. end-users is the client of the database.
8.Discuss the three generations of DBMSs.
I. First generation
The first generation is hierarchal network or CODASYL. It was developed by IMF(information
management system) and CODASYL was developed by integrated data store.
II. Second generation
Second generation is relational model, here is where there is representation of data inform
of tables
Known as relational data model.
III. Third generation
9.Is the object relational DBMS model and object-oriented DBMS. Object relational DBMS
adds storage capability.
Exercises
1.Interview some users of database systems. Which DBMS features do they find most useful
and why? Which DBMS facilities do they find least useful and why? What do these users
perceive to be the advantages and disadvantages of the DBMS
-DBMS feature found useful is the most useful, since it simplify the update of data in bunch
of data
-facilities that is least useful is duplicity because it can be removed easily by small program.
advantage
I. Data availability. It is because the amount of data can be available to different user
of the system at any its requested
II. Data integrity. Which ensure the accuracy, consistency and relevant data. Since the
data changes can be done in one place also prevent errors and loss of data.
III. Improved security. Some amount of data can be set to be available only for
authorized user.
disadvantage
I. Complexity- The provision of the functionality that we expect of a good DBMS makes
the DBMS an extremely complex piece of software.
II. Size- complexity leads to large size of DBMS that occupying large space of the disk
and requires sufficient amount of memory to tun.
2.Organizations have a vital need for quality information. Discuss how the following database roles
relate to each other.
(a) Data Administrator is the person that will be required to manage the data resource of the
organizations including database planning developing and maintaining procedures
(b) Database Administrator is the responsible with physical realization of the database, including the
database design and its implementation, maintenance of the operating system and ensure proper
performance to the user.
(c)database signer- can be a physical database designer- that make logical design to be physical
realized. Or logical database the constraints on data, identifying entities and attributes.
2.3 What is a data model? Discuss the main types of data model.
A set of concepts to describe the structure of a database, the operations for manipulating
these structures and certain constraints that the database should obey.
Conceptual data model - Provide concepts that are close to the way many users perceive data.
Physical data models - Provide concepts that describe details of how data is stored in the
computer.
Implementation data models - Provide concepts that fall between the above two, used by
many commercial DBMS implementations.
2.5 Describe the types of facility that you would expect to be provided in a multi-user DBMS.
Data Storage, Retrieval and Update Authorization Services
A User-Accessible Catalog Support for Data Communication
Transaction Support Integrity Services
Concurrency Control Services Services to Promote Data Independence
Recovery Services Utility Services
2.6 Of the facilities described in your answer to Question 2.5, which ones do you think would
not be needed in a standalone PC DBMS? Provide justification for your answer.
Concurrency Control Services - only single user.
Authorization Services - only single user but may be needed if different individuals are to use
the DBMS at different times.
Utility Services - limited in scope.
Support for Data Communication - only standalone system.
2.8 Discuss the differences between DDL and DML. What operations would you typically
expect to be available in each language?
• Data Definition Language (DDL)
– Allows the DBA or user to describe and name entities, attributes, and
relationships required for the application e.g. CREATE, DROP,
ALTER, TRUNCATE, COMMENT, RENAME
• Data Manipulation Language (DML)
– Provides basic data manipulation operations on data held in the database e.g.
INSERT, UPDATE, DELETE
2.9 Discuss the differences between procedural DMLs and nonprocedural DMLs.
• 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.
2.10 Name four object-based data models.
Entity Relationship Data Model.
Object Oriented Data Model.
Semantic Data Model.
Functional Data Model.
2.11 Name three record-based data models. Discuss the main differences between these data
models.
The relational model represents data as relations, or tables. For example, in the
membership system at Science World, each membership has many members. The
membership identifier, expiry date and address information are fields in the
membership.
The hierarchical model represents data as a hierarchical tree structure. Each branch of the
hierarchy represents a number of related records.
A simple example of a transaction will be dealing with the bank accounts of two users, let say
Karlos and Ray. A simple transaction of moving an amount of 5000 from Karlos to Ray
engages many low-level jobs. As the amount of Rs. 5000 gets transferred from the Karlos's
account to Ray's account, a series of tasks gets performed in the background of the screen.
This straightforward and small transaction includes several steps: decrease Karlos's bank
account from 5000:
Open_Acc (Karlos)
OldBal = Karlos.bal
Ram.bal = NewBal
CloseAccount(Karlos)
You can say, the transaction involves many tasks, such as opening the account of Karlos,
reading the old balance, decreasing the specific amount of 5000 from that account, saving
new balance to an account of Karlos, and finally closing the transaction session.
For adding amount 5000 in Ray's account, the same sort of tasks needs to be done:
OpenAccount(Ray)
Old_Bal = Ray.bal
Ahmed.bal = NewBal
CloseAccount(B)
2.13 What is concurrency control and why does a DBMS need a concurrency control facility?
Concurrency Control is the management procedure that is required for controlling concurrent
execution of the operations that take place on a database.
The goal of concurrency control in DBMS is to coordinate execution so that the VIEW or
effect from the database's perspective is the same as if the concurrently executing transactions
were executed in a serial fashion.
2.14 Define the term “database integrity”. How does database integrity differ from database
security?
Database integrity refers to the accuracy and consistency (validity) of data over its lifecycle.
Their difference is that database security refers to the prevention of data from unauthorized
users. While database integrity is defined as the data contained in the database is both correct
and consistent.
Exercise questions
2.15 Analyse the DBMSs that you are currently using. Determine each system’s compliance
with the functions that we would expect to be provided by a DBMS. What type of language
does each system provide? What type of architecture does each DBMS use? Check the
accessibility and extensibility of the system catalog. Is it possible to export the system catalog
to another system?
DBMS is a tool which manages data for any organization. We can take the example of SQL.
For knowing about any DBMS there is a predefined information available for each database.
In SQl we have predefined function which can be used for operation.
For Example a search tool in company which is used to search the records of employee and
this is maintained with high security so that unauthorized people do not have access for that.
For update and alteration or renaming any table or information we have alter, rename, create,
Apart from that there are multiple commands in SQL like, DML, DDL, DCL, DQL, which
has some predefined meaning out of these commands some are auto committed and some are
not, based on requirement these functions are used for any program.
DBMS should have following features-:
Security: - for maintaining any database it should be highly secure so that unauthorized
people do not access it and do not misplace the company confidential information.
Integrity: - It should have good performance and consistence so that it does not change
automatically.
Manipulation of data: - manipulation of data inserted so as to give useful information.
Type of architecture use is A 3-tier architecture which separates its tiers from each other
based on the complexity of the users and how they use the data present in the database.
It is the most widely used architecture to design a DBMS.
Each system should provide a machine language or machine understandable language so that
it can be understandable by everyone means for users and creators. Each system should use a
definite architecture so that it always follows the same set of protocols while doing any
operation, like in DBMS it follows two-tier architecture or three tier/multi-tier architecture
based on system requirement.
Catalog is another important function for any system and in DBMS there are some set of
catalogs which has its meaning which is predefined and each thing of catalog should be
stored in system and if it is secure data it should be managed in such a way that only
authorized people should have access and this way you can protect company data.
Yes, is it possible to transfer one system catalog to another but there are some conditions for
this like compatibility, and transfer software which you are going to use to transfer the
catalog.
2.18 A database approach uses different data models. Common database models include the
relational model, the network model and the hierarchical model. Which data model should be
chosen under which circumstances and why?
Circumstances to choose relational model.
i. Size of the data footprint - If you have a large amount of data, you can save
space using a relational database format. Relational database Normalization can
save a great deal of space by reducing or eliminating data redundancy.
ii. Data relationship complexity - How complex are the relationships inherent in
your data. For example, when you write a query to a relational database how
many complex relationships do you have to include in the query. If the answer is
many, then database users have to spend more time writing these queries. This
increases both development and operational time and costs.
iii. Robustness and efficiency - How fast do you need your database to perform in
relation to your application. Relational database operations, due to the time
required to make the relational connections, can take longer to perform. This is
one reason that a great deal of time is required to tune queries, stored procedures,
and other database operations to meet application requirements.
iv. User expertise - If your database is subject to multiple users, then relational
database queries and other data manipulations require a higher level of user
expertise. Both the design and use of a relational database are more complex. For
operational deployment, this is frequently a consideration in employing a
relational database format.
3.1 What is meant by the term ‘client–server architecture’ and what are the advantages of this
approach? Compare the client–server architecture with two other architectures.
Client–server refers to the way in which software components interact to form a system. As
the name suggests, there is a client process, which requires some
resource, and a server, which provides the resource. There is no requirement that the client
and server must reside on the same machine. In practice, it is quite common to place a server
at one site in a LAN and the clients at the other sites.
Client server architecture diagram
3.2. Compare and contrast the two-tier client–server architecture for traditional DBMSs with
the three-tier client–server architecture. Why is the latter architecture more appropriate for
the Web?
Two-tier client–server architecture is an architecture in which Data is stored on the server and
the presentation layer runs on the client side.
Three-tier client–server architecture has 3 layers which are presentation layer that run on end
user computer, application layer that based on business logic and data processing and its run
on application server and the database server store the data that required by the application
layer.
3.3. How is an application server different from a file server?
The business logic and data processing layer. This middle tier runs on a server
and is often called the application server.
While
A file server
A computer attached to a network with the primary purpose of providing shared storage for
computer files such as documents, spreadsheets, images, and databases.
3.7. What technologies and standards are used to develop Web services and how do they
relate to each other?
A Web service is a software system designed to support interoperable machine-to-machine
interaction over a network. They are based on standards such as XML, SOAP, WSDL, and
UDDI.
• XML (extensible Markup Language).
• SOAP (Simple Object Access Protocol) is a communication protocol for exchanging
structured information over the Internet and uses a message format based on XML. It
is both platform- and language-independent.
• WSDL (Web Services Description Language) protocol, again based on XML, is used
to describe and locate a Web service.
• UDDI (Universal Discovery, Description, and Integration) protocol is a platform
independent, XML-based registry for businesses to list themselves on the Internet. It
was designed to be interrogated by SOAP messages and to provide access to WSDL
documents describing the protocol bindings and message formats required to interact
with the Web services listed in its directory.
Relationship diagram
Figure above illustrates the relationship between these technologies. From the database
perspective, Web services can be used both from within the database (to invoke an external
Web service as a consumer) and the Web service itself can access its own database (as a
provider) to maintain the data required to provide the requested service.
3.8. What is a service-oriented architecture?
Service-Oriented Architecture (SOA) is a business-centric software architecture for building
applications that implement business processes as sets of services published at a granularity
relevant to the service consumer.
Database manager (DM). The DM interfaces with user-submitted application programs and
queries. The DM accepts queries and examines the external and conceptual schemas to
determine what conceptual records are required to satisfy the request. The DM then places a
call to the file manager to perform the request.
3.12 Compare and contrast the four main deployment models for the cloud.
• Private cloud.
Cloud infrastructure is operated solely for a single organization, whether
managed internally by the organization, a third party, or some combination of
them, and it may be hosted internally or externally.
• Community cloud.
Cloud infrastructure is shared for exclusive use by a specific community of
organizations that have common concerns (e.g., security requirements,
compliance, jurisdiction). It may be owned and managed by one or more of the
organizations in the community, a third party, or some combination of them, and
it may be hosted internally or externally.
• Public cloud.
Cloud infrastructure is made available to the general public by a service provider.
These services are free or offered on a pay-per-use model. It may be owned and
managed by a business, academic, or government organization, or some
combination of these. It exists on the premises of the cloud provider.
3.13 What is the difference between Data as a service (DaaS) and Database as a service
(DBas)
Examples of DaaS are Urban Mapping, a .For example, Amazon Web Services
geography data service, which provides provides three database as a service
data for customers to embed into their offerings as part of its cloud
own Web sites and application portfolio: SimpleDB, a NoSQL key-value
store; Amazon RDS, a relational database
service that includes support for MySQL,
Oracle,
REVISION QUESTIONS
1. Discuss each of the following concepts in the context of the relational data model:
(a) relation
is the table with columns and rows. All data are inserted in this kind of structure. Where rows
takes the records and column takes the attributes.
(b) attribute
is column of the relation since the relation has columns and rows the column responds to
attribute.
(c) domain
A domain is the set of allowable values for one or more attributes. Also is known as a pool of
legal values.
(d) tuple
Is the row of a table or relation. A single tuple contains a single record and contains one value per
each attribute.
(e) intension and extension
Intension is a constant value that gives the name, structure of the table and constants on it.
Extension -is the number of tuples present in a table at any instance.
(f) degree and cardinality.
is the total number of rows present in table/relation.
2. Describe the relationship between mathematical relations and relations in the relational data
model.
Relation in the relational database model is like finding a cartesian product of values of two
sets of values in mathematical relations in which every subset of the cartesian product is a
relation.
Any set of n-tuples from this Cartesian product is a relation on the n sets. Note that in
defining these relations we have to specify the sets, or domains, from which we choose values
3.Describe the term “normalized reaction.” Why are constraints so important in a relational database?
Normalized reaction is a technique in which each cell contains only one value in order to
minimize duplication of data.
6. Define the two principal integrity rules for the relational model. Discuss why it is desirable to
enforce these rules.
I. entity integrity: no attribute of a primary key can be null.
II. Relational integrity: If a foreign key exists in a relation, either the foreign key value must
match a candidate key value of some tuple in its home relation or the foreign key value must
be wholly null.
7. Define “views.” Why are they important in a database approach?
View is the subset of the database. It has a variety of advantages in a data base approach, some of
the importance of views is as follows