Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 18

Maulik Chandarana DBMS

__________________________________________________
Unit 1
Part 1 – Introduction To DBMS
------------------------------------------------------------------------------------
Basic Concepts

Q. What is ‘data’?
 Data is meaningful known raw facts that can be processed and stored as information.

Q. What is ‘database (DB)’?


 Database is a collection of interrelated and organized data.

Q. What is ‘Database Management System (DBMS)’?


 Database Management System (DBMS) is a collection of interrelated data [usually called database] and a
set of programs to access, update and manage those data [which form part of management system]. The
data describe one particular enterprise.
OR
 It is a software package to facilitate creation and maintenance of computerized database. It is general
purpose software that facilitates the following:
1. Defining: Specifying data types and structures, and constraints for data to be stored.
2. Constructing: Storing data in a storage medium.
3. Manipulating: Involves querying, updating and generating reports.
4. Sharing: Allowing multiple users and programs to access data simultaneously.
5. For example, Access, dBase, FileMaker Pro, and FoxBASE, ORACLE, Ingres, Informix, SyBase, etc.

Q. What is ‘Database System (DBS)’?


 Database System (DBS) is a DBMS (i.e. a powerful software system) together with the data (i.e. actual
data and metadata stored in files), the database (i.e. the data files in an organized database structure)
and the end-users (i.e. people accessing, modifying or managing the data via the DBMS).

Q. Is there any difference between DBMS and DBS?


 Not as such. One need not differentiate too much between DBMS and DBS though technically they are
distinct.

Q. What are the primary goals of DBMS?


 Primary goals of DBMS are:
1. To provide a way to store and retrieve database information that is both convenient and efficient.
2. To manage large and small bodies of information. It involves defining structures for storage of
information and providing mechanism for manipulation of information.
3. It should ensure safety of information stored, despite system crashes or attempts at unauthorized
access.
4. If data are to be shared among several users, then system should avoid possible anomalous results.

Q. Name some DBS applications?


 DBS applications include:
1. Banking – For customer information, accounts, and loans, and banking transactions. [all
transactions]
2. Airlines – For reservation and schedule information. [reservations, schedules]
3. Universities – For student information, course registrations, and grades. [registration, grades]
4. Credit Card Transactions – For purchases on credit card and generation of monthly statements.
5. Telecommunication – For keeping records of calls made, generating monthly bills, maintaining
balances on prepaid calling cards, and storing information about communication networks.
6. Finance – For storing information about holdings, sales, and purchases of financial instruments such
as stocks and bonds.
7. Sales – For customer, product, and purchase information. [customers, products, purchases]
8. Manufacturing – For management of supply chain and for tracking production of items in factories,
inventories of items in warehouses/stores, and orders for items. [production, inventory, orders,
supply chain]
9. Human Resources – For information about employees, salaries, payroll taxes and benefits, and
generation of paychecks. [employee records, salaries, tax deductions]
Maulik Chandarana DBMS

In exam, don’t need to write in detail and all applications. Just mention applications in short as given in square
brackets. The detailed information is to familiarize one with relevant database of enterprises.

Q. What do you mean by direct and indirect Interaction with DBS?


 Voice Response Systems, Web browsing, online purchasing, checking of bank balances in ATMs are all
part of directly interacting with the database systems. Whereas getting information via agents like bank
tellers, printed reports such as credit card statements, etc. is an indirect means of interacting with
database systems.
Advantages of a DBMS over file-processing systems

Q. What are file systems/file processing systems?


 A file system is basically storing information in data structures called ‘files’ in the operating system and
manipulating this information via application programs that manipulate the files.

Q. How does a typical file processing system work?


 Working of a typical file-processing system:
1. A typical file processing system is supported by the conventional operating system.
2. This system stores permanent records in various files.
3. It needs different application programs to extract records from, and to add records to, the appropriate
files.
4. New application programs must be written as the need arises.
5. Over a long period of time files may be in different formats, and application programs may be in different
languages.
6. Before DBMSs, organizations usually stored information in such systems.

It is advisable you remember following seven terms. These will help you answer the next three questions
1. Data redundancy and inconsistencies
2. Difficulty in accessing data
3. Data isolation
4. Integrity problems
5. Atomicity of updates
6. Concurrent access by multiple users
7. Security

Q. What is the purpose/Need of DBMS? OR


Q. What are the drawbacks/disadvantages of file-processing systems?
 Answer to both questions is the same.
1. In the early days, database applications were built on top of file systems
2. Drawbacks of using file systems to store data: OR Disadvantages of file-processing systems:
a. Data redundancy and inconsistency
 Multiple file formats, duplication of information in different files and non-proper
updating of all copies
b. Difficulty in accessing data
 Need to write a new program to carry out each new task
c. Data isolation
 Multiple files and formats make it difficult to write new programs to isolate/retrieve
required data
d. Integrity problems
 Integrity constraints (e.g. account balance > 0) become part of program code
 Hard to add new constraints or change existing ones
e. Atomicity of updates
 Failures may leave database in an inconsistent state with partial updates carried out
• E.g. transfer of funds from one account to another should either complete
or not happen at all
f. Concurrent access by multiple users
 Concurrent access needed for performance
 Uncontrolled concurrent accesses can lead to inconsistencies
• E.g. two people reading a balance and updating it at the same time
g. Security problems
 Every user of the system should be able to access only the data they are permitted to
see.
Maulik Chandarana DBMS

• E.g. payroll people only handle employee records, and cannot see
customer accounts; tellers only access account data and cannot see
payroll data.
 Difficult to enforce this with application programs.
3. Database systems offer solutions to all the above problems and have advantages over file-system. Hence,
are required.

Please refer to Database System Concepts by Korth, [Sec. 1.2 on pgs. 3, 4] for detailed explanation of each
point.

Q. What are the advantages of a DBMS over file-processing system?


 A DBMS has three main features: (1) Centralized data management, (2) Data independence and (3)
Data integration
Due to the above features, the advantages of DBMS can be listed as follows:
1. Multiple file formats and duplication of data in DBMS is eliminated. Hence, redundancies and
inconsistencies can be reduced.
2. No difficulty in accessing data. Hence, better service to users is provided.
3. Required data can be retrieved or isolated without problems. Hence, there is scope for flexibility in
system.
4. Integrity problems can be solved as new constraints or changes in existing ones can be easily done.
5. Atomicity of updates is possible.
6. Concurrent accesses are possible.
7. Better security is possible due to centralized data management.
8. Cost of development and maintaining system is lower.
9. Standards can be enforced.
10. Individual requirements of the enterprise can be realized.
11. Since data modeling is required to implement DBMS, it is very useful in the long-run.

First seven points are just the opposites of the disadvantages of ‘file systems’ and can easily be listed.

Q. What are the difference between the DBMS and file-processing systems?
 The following are differences between DBMS an file-processing systems:
DBMS File-processing Systems
1. Redundancies and inconsistencies in data are 1. Redundancies and inconsistencies in data exist
reduced due to single file formats and duplication of due to single file formats and duplication of data.
data is eliminated.
2. Data is easily accessed due to standard query 2. Data cannot be easily accessed due to special
procedures. application programs needed to access data.
3. Isolation/retrieval of required data is possible due 3. Data isolation is difficult due to different file
to common file format, and there are provisions to formats, and also because new application programs
easily retrieve data. have to be written.
4. Integrity constraints, whether new or old, can be 4. Introduction of integrity constraints is tedious and
created or modified as per need. again new application programs have to be written.
5. Atomicity of updates is possible. 5. Atomicity of updates may not be maintained.
6. Several users can access data at the same time 6. Concurrent accesses may cause problems such as
i.e. concurrently without problems. inconsistencies.
7. Security features can be enabled in DBMS very 7. It may be difficult to enforce security features.
easily.

Remember the files seven points of advantages of DBMS and seven points of disadvantages of file-
processing system. Use them as points of difference.

Q. What are the disadvantages of a DBS?


 The following are disadvantages of DBS
1. Setup of the database system requires more knowledge, money, skills, and time.
2. The complexity of the database may result in poor performance.

Data abstraction

Q. What do you mean by ‘data abstraction’?


 It can be summed up as follows.
1. When the DBS hides certain details of how data is stored and maintained, it provides what is called
as the abstract view of data.
2. This is to simplify user-interaction with the system.
3. Complexity (of data and data structure) is hidden from users through several levels of abstraction.

Q. Why is data abstraction used?


Maulik Chandarana DBMS

 Data abstraction is used for following purposes:


1. To provide abstract view of data.
2. To hide complexity from user.
3. To simplify user interaction with DBS.

Q. What are the levels of data abstraction? Mention their features.


 There are three levels of data abstraction.

1. Physical level: It describes how a record (e.g., customer) is stored.


Features:
a) Lowest level of abstraction.
b) It describes how data are actually stored.
c) It describes low-level complex data structures in detail.
d) At his level, efficient algorithms to access data are defined.

2. Logical level: It describes data stored in database, and the relationships among the data.
Features:
a) It is next-higher level of abstraction. Here whole DB is divided into small simple structures.
b) Users at this level need not be aware of the physical-level complexity used to implement the simple
structures.
c) Here the aim is ease of use.
d) Generally, database administrators (DBAs) work at logical level of abstraction.

3. View level: Application programs hide details of data types. Views can also hide information (e.g.,
salary) for security purposes.
Features:
a) It is the highest level of abstraction.
b) It describes only a part of the whole DB for particular group of users.
c) This view hides all complexity.
d) It exists only to simplify user interaction with system.

e) The system may provide many views for the whole system.

If there is question to write a note on data abstraction, mention what is meant by data abstraction and its
types. You may omit one or more features.

Q. What is meant by ‘instances and schemas’? What are the types of schemas?
 Instances and Schemas are similar to types and variables in programming languages.
1. Schema
Definition: The overall design of a database is called database schema. E.g., the database consists of
information about a set of customers and accounts and the relationship between them. It is analogous to
variable along with its type information in a program.
Types of Schemas (partitioned according to levels of abstraction):
a. Physical schema: It is database design at the physical level. It is hidden below logical
schema, and can be changed easily without affecting application programs.
b. Logical schema: It is database design at the logical level. Programmers construct
applications using logical schema. It is by far the most important schema, in terms of its
effect on application programs.
Maulik Chandarana DBMS

c. Subschema: It is schema at view level.

2. Instance
Definition: It is the actual content of the database at a particular point in time. It is analogous to the value
of a variable.

Database languages

Q. Name the types of languages used in DBMS? Define each type.


 We have Data Definition Languages (DDL) to specify database schemas and Data Manipulation
Language (DML) to express database updates and queries. In practice, these are not to separate
languages but are part of a single database language, like SQL.
1. Data Definition Languages (DDL)
Definition: It is the language that is used to specify database schemas by a set of definitions
contained in it.
2. Data Manipulation Language (DML)
Definition: It is a language for accessing and manipulating the data organized by the appropriate
data model. DML is also known as query language.
Two types/classes of DML
a) Procedural DMLs
b) Declarative DMLs (non-procedural DMLs)

Q. List types/classes of DMLs [or query languages] and define them.


 Two types/classes of DML [or query languages] are:
1. Procedural DMLs
Definition: This language requires user to specify what data is required and how to get those data.
2. Declarative DMLs (non-procedural DMLs)
Definition: This language requires user to specify what data is required without specifying how to get
those data.

Q. List features of DDL.


 The following are feature of DDL:
1. Used to specify a database schema as a set of definitions expressed in a DDL
2. DDL statements are compiled, resulting in a set of tables stored in a special file called a data
dictionary or data directory.
3. The data directory contains metadata (data about data).
4. The storage structure and access methods used by the database system are specified by a set of
definitions in a special type of DDL called a data storage and definition language.
5. Basic idea of DDL: To hide implementation details of the database schemes from the users.

Q. What is ‘data manipulation’?


 Data manipulation is handling of information in a DB. It is a process that involves the following:
1. Retrieval of information in DB
2. Insertion of new information in DB
3. Deletion of information from DB
4. Modification of information in DB

Q. List features of DML.


 The following are features of DML:
1. A DML is a language which enables users to access and manipulate data.
2. The goal is to provide efficient human interaction with the system.
3. There are two types of DMLs
a. Procedural: Here user specifies what data is needed and how to get it.
b. Non-procedural: Here user only specifies what data is needed.
- Easier for user
- May not generate code as efficient as that produced by procedural languages
2. A query language is a portion of a DML involving information retrieval only. Even then, DML is often
called as Query Language.
3. SQL is the most widely used query language.

In exam, if a question on DML is asked you may first explain what is ‘data manipulation’ followed by its
features.

Q. Define ‘query’? What is query language?


Maulik Chandarana DBMS

 A query is a statement requesting the retrieval of information. The portion of DML that involves
information retrieval is called query language. Though technically incorrect, the terms ‘query language’
and ‘DML’ are used synonymously. E.g. SQL, QBE, Datalog, etc.

Q. Give a note on SQL.


 SQL: Structured Query Language
1. It is a widely used non-procedural language
E.g. find the name of the customer with customer-id 192-83-7465
select customer.customer-name
from customer
where customer.customer-id = ‘192-83-7465’
E.g. find the balances of all accounts held by the customer with customer-id 192-83-7465
select account.balance
from depositor, account
where depositor.customer-id = ‘192-83-7465’ and
depositor.account-number = account.account-number
The above two examples are called queries.
2. Application programs generally access databases through one of:
a) Language extensions to allow embedded SQL
b) Application program interface (e.g. ODBC/JDBC) which allow SQL queries to be sent to a
database.

Data Models and Data Independence

Q. What is a data model?


 A data model is collection of tools for describing
1. data
2. data relationships
3. data semantics
4. data constraints

Q. What are the types of data models?


 Modern-day data models can be divided into:
a. Entity-Relationship model
b. Relational model
c. Other models:
I. object-oriented data model
II. object-relational data model
III. semi-structured data models
IV. Older models: network model and hierarchical model

In general we can have a broad classification as under with different models in each class:
1. Object-based logical models
a. Entity-Relationship model.
b. Object-oriented model.
c. Binary model.
d. Semantic data model.
e. Infological model.
f. Functional data model.
g. And more… (over 30 models)
2. Record-base logical models
a. Relational model
b. Network model
c. Hierarchical model
3. Physical data models
a. Unifying model
b. Frame memory

Q. Give short notes on types of data models.


 The main two data models are:
Entity-Relationship model
1. The entity-relationship model is based on a perception of the world as consisting of a collection of
basic objects (entities) and relationships among these objects.
2. It is an object-based logical model.
3. It is a high-level data model.
4. An entity is a distinguishable object that exists.
Maulik Chandarana DBMS

5. Each entity has associated with it a set of attributes describing it.


E.g. number and balance for an account entity.
6. A relationship is an association among several entities.
E.g. A cust_acct relationship associates a customer with each account he or she has.
7. The set of all entities or relationships of the same type is called the entity set or relationship set.
8. Another essential element is the E-R diagram in which the mapping cardinalities express the number
of entities to which another entity can be associated via a relationship set.
9. The overall logical structure of a database can be expressed graphically by an E-R diagram:
a. Rectangles: represent entity sets.
b. Ellipses: represent attributes.
c. Diamonds: represent relationships among entity sets.

d. Lines: link attributes to entity sets and entity sets to relationships.


An example of ER model

Relational model
1. In this model, data and relationships are represented by a collection of tables.
2. Each table has a number of columns with unique names e.g. customer, account. It is a record-based
logical model.
3. It is a lower-level model.

A sample Relational database model

Notes on other models:


Object-oriented model
1. The object-oriented model is based on a collection of objects, like the E-R model.
2. An object contains values stored in instance variables within the object.
3. Unlike the record-oriented models, these values are themselves objects.
4. Thus objects contain objects to an arbitrarily deep level of nesting.
5. An object also contains bodies of code that operate on the object.
6. These bodies of code are called methods.
7. Objects that contain the same types of values and the same methods are grouped into classes.
8. A class may be viewed as a type definition for objects.
9. Analogy: the programming language concept of an abstract data type.
10. The only way in which one object can access the data of another object is by invoking the method of
that other object.
11. This is called sending a message to the object.
12. Internal parts of the object, the instance variables and method code, are not visible externally.
13. Result is two levels of data abstraction.
For example, consider an object representing a bank account.
a. The object contains instance variables number and balance.
b. The object contains a method pay-interest which adds interest to the balance.
c. Under most data models, changing the interest rate entails changing code in application
programs.
d. In the object-oriented model, this only entails a change within the pay-interest method.
Maulik Chandarana DBMS

14. Unlike entities in the E-R model, each object has its own unique identity, independent of the values it
contains:
a. Two objects containing the same values are distinct.
b. Distinction is maintained in physical level by assigning distinct object identifiers.

The Network Model


1. Data are represented by collections of records.
2. Relationships among data are represented by links.
3. Organization is that of an arbitrary graph.

A Sample Network Model

The Hierarchical Model


1. Similar to the network model.
2. Organization of the records is as a collection of trees, rather than arbitrary graphs.

A Sample Hierarchical Model

Q. What do you mean by ‘data independence’?


 Data independence is the ability to modify a schema definition in one level without affecting a schema
definition in a higher level is called data independence.

Q. What are the types of data independence?


 There are two types of ‘data independence’:
1. Physical data independence
a. It is the ability to modify the physical scheme without causing application programs to
be rewritten.
b. Modifications at this level are usually to improve performance.

2. Logical data independence


a. It is the ability to modify the conceptual scheme without causing application programs
to be rewritten
b. It is usually done when logical structure of database is altered.

Logical data independence is harder to achieve as the application programs are usually heavily dependent on
the logical structure of the data. An analogy is made to abstract data types in programming languages.

In exam, write both, definition and types of data independence.


Maulik Chandarana DBMS

Components of a DBMS and Overall Structure of DBMS

Q. What is ‘database manager’?


 The database manager is a program module which provides the interface between the low-level data
stored in the database and the application programs and queries submitted to the system.

Q. List the responsibilities/functions of database manager?


 1. Databases typically require lots of storage space (gigabytes). This must be stored on disks. Data is
moved between disk and main memory (MM) as needed.
2. The goal of the database system is to simplify and facilitate access to data. Performance is important.
Views provide simplification.
3. So the database manager is responsible for:
 Interaction with the file manager: Storing raw data on disk using the file system usually
provided by a conventional operating system. The database manager must translate DML
statements into low-level file system commands (for storing, retrieving and updating data in the
database).
 Integrity enforcement: Checking that updates in the database do not violate consistency
constraints (e.g. no bank account balance below $25)
 Security enforcement: Ensuring that users only have access to information they are permitted
to see.
 Backup and recovery: Detecting failures due to power failure, disk crash, software errors, etc.,
and restoring the database to its state before the failure.
 Concurrency control: Preserving data consistency when there are concurrent users.
4. Some small database systems may miss some of these features, resulting in simpler database
managers. (For example, no concurrency is required on a PC running MS-DOS.) These features are
necessary on larger systems.

Q. Who is a ‘Database Administrator (DBA)’?


 The database administrator is a person having central control over data and programs accessing that
data. He coordinates all the activities of the database system; the database administrator has a good
understanding of the enterprise’s information resources and needs.

Q. List the functions of a DBA.


 Database administrator's duties include:
1. Schema definition: the creation of the original database schema. This involves writing a set of
definitions in a DDL (data storage and definition language), compiled by the DDL compiler into a
set of tables stored in the data dictionary.
2. Storage structure and access method definition: writing a set of definitions translated by the
data storage and definition language compiler.
3. Schema and physical organization modification: writing a set of definitions used by the DDL
compiler to generate modifications to appropriate internal system tables (e.g. data dictionary).
This is done rarely, but sometimes the database schema or physical organization must be
modified.
4. Granting user authority to access the database: granting different types of authorization for
data access to various users
5. Specifying integrity constraints: generating integrity constraints. These are consulted by the
database manager module whenever updates occur.
6. Routine Maintenance: It includes the following:
a. Acting as liaison with users.
b. Monitoring performance and responding to changes in requirements.
c. Periodically backing up the database.

Q. Explain the types of Database Users.


 Users are differentiated by the way they expect to interact with the system. They fall into the following
categories:
1. Application programmers: They are computer professionals interacting with the system through
DML calls embedded in a program written in a host language (e.g. C, PL/1, Pascal).
a. These programs are called application programs.
b. The DML precompiler converts DML calls (prefaced by a special character like $, #, etc.) to
normal procedure calls in a host language.
c. The host language compiler then generates the object code.
Maulik Chandarana DBMS

d. Some special types of programming languages combine Pascal-like control structures with
control structures for the manipulation of a database.
e. These are sometimes called fourth-generation languages.
f. They often include features to help generate forms and display data.
2. Sophisticated users: They interact with the system without writing programs.
a. They form requests by writing queries in a database query language.
b. These are submitted to a query processor that breaks a DML statement down into instructions
for the database manager module.
3. Specialized users: They are sophisticated users writing special database application programs.
These may be CADD systems, knowledge-based and expert systems, complex data systems
(audio/video), etc.
4. Naive users: They are unsophisticated users who interact with the system by using permanent
application programs (e.g. automated teller machine).

Q. Explain overall structure of DBMS/System structure and its components.


 We can explain the overall structure of DBMS/System structure and its components by the diagram (on
next page).

1. Database systems are partitioned into modules for different functions. Some functions (e.g. file systems)
may be provided by the operating system.
2. Broadly the functional components of a database system are:
a. Query Processor: It translates statements in a query language into low-level instructions the database
manager understands. It may also attempt to find an equivalent but more efficient form.
b. Storage Manger:
1. Storage manager is a program module that provides the interface between the low-level data stored
in the database and the application programs and queries submitted to the system.
2. The storage manager is responsible to the following tasks:
a. interaction with the file manager
b. efficient storing, retrieving and updating of data
3. The important components include:
a. File manager: It manages allocation of disk space and data structures used to represent
information on disk.
b. Database manager: It is the interface between low-level data and application programs and
queries.
Maulik Chandarana DBMS

System Structure [from Korth; Fig 1.4 on pg. 19]


Maulik Chandarana DBMS

c. Transaction manager: Transaction manager ensures that the database remains in a consistent
(correct) state despite system failures (e.g., power failures and operating system crashes) and
transaction failures.
d. DML precompiler: It converts DML statements embedded in an application program to normal
procedure calls in a host language. The precompiler interacts with the query processor.
e. DDL compiler: It converts DDL statements to a set of tables containing metadata stored in a
data dictionary.
4. In addition, several data structures are required for physical system implementation:
c. Data files: They store the database itself.
d. Data dictionary: It stores information about the structure of the database. It is used heavily.
Great emphasis should be placed on developing a good design and efficient implementation of
the dictionary. In short, it stores metadata.
e. Indices: They provide fast access to data items holding particular values.

The above details are condensed for exam purpose .Refer to diagram in Korth [Fig. 1.4 on pg. 19].

Q. Explain structure of query processor.


 It is one of the functional components of DBS. It translates statements in a query language into low-level
instructions the database manager understands. It may also attempt to find an equivalent but more
efficient form.
It contains following components:
a. DML compiler - It converts DDL statements to a set of tables containing metadata stored in a
data dictionary. It also performs query optimization.
b. DDL interpreter – It interprets DDL statements and records definitions into data dictionary.
c. Query evaluation engine – It executes low-level instructions generated by DML compiler.
They mainly deal with solving all problems related to queries and query processing. It helps database
system simplify and facilitate access to data.

Q. Explain structure of storage manager.


 Storage manager is a program module that provides the interface between the low-level data stored in
the database and the application programs and queries submitted to the system.
It contains following components:
1. Authorization and integrity manger – It conducts integrity checks and user authority to access
data.
2. Transaction manager – It ensures consistency of data
3. File manager - It manages allocation of disk space and data structures used to represent
information on disk.
4. Buffer manger – It is critical part of DB and stores temporary data.

In addition, several data structures are implemented for physical system implementation by storage
manger:
f. Data files: They store the database itself.
g. Data dictionary: It stores information about the structure of the database. It is used heavily.
Great emphasis should be placed on developing a good design and efficient implementation of
the dictionary. In short, it stores metadata.
h. Indices: They provide fast access to data items holding particular values.

If you want, combine the above two answers into one to explain overall structure of DBMS. Draw diagram
from Korth [Fig. 1.4 on pg. 19].

Q. Explain transaction management.


 Transaction management is explained as under:
1. A transaction is a collection of operations that performs a single logical function in a database
application
2. Transaction-management component ensures that the database remains in a consistent (correct)
state despite system failures (e.g., power failures and operating system crashes) and transaction
failures.
3. Concurrency-control manager controls the interaction among the concurrent transactions, to ensure
the consistency of the database.
Maulik Chandarana DBMS
Maulik Chandarana DBMS

Special Supplement Reading 1


This piece will help you understand a DBMS as a software program with fuller
understanding, and provide a more practical view of concepts.

Q. What is a Database?
 A database is an organized collection of data. The primary function of a database
program is to enable the user to put a collection of information into some specific
order: alphabetical, numerical, chronological, or some combination of the three.
There are two key questions that must be answered before constructing a
database:
1. What information do you want to maintain?
2. In what order do you want this information organized?
The answers to these questions determine how you will structure your database.

Q. List the commonly used terms.


 Database Program: The term database is often used to refer to an entire
database management system (DBMS). For example, the software programs
Access, dBase, FileMaker Pro and FoxBASE are often referred to as database
programs. Microsoft Excel is usually considered a spreadsheet application which
contains several database functions.

Database File: Within a given program, the term database, or database file, has a
more specific meaning. It refers to a specific collection of data with a single
focus or topic.

Record: A database file is a group of records that are identical in structure. A


record can contains information about a single item in your database.

Field: Each record is made up of a series of fields, which store individual bits of
information inside a record.

Q. What are the types of databases?


 There are two main types of databases that you need to know about: flat-file and
relational. As the name implies, a flat-file database consists of a single database
file or table which contains all of the information that you want to store about
your topic. This type of database is ideal for a simple database that does not
contain a lot of repeated information. A relational database, on the other hand,
consists of multiple database files or tables linked together by at least one
common field. For instance, a library card catalog might consist of an Author
table, a Title table, and a Subject table. This type of structure eliminates the
endless repetition of author and title information that would occur in a flat-file
database containing the same information. In turn, this structure makes data
entry easier as well as easing storage problems on your hard disk.

Q. What are parts of DBMS or a database program?


 In general, all database management programs have the same overall
organization. Different types of objects perform specific tasks. Most database
programs contain four main object types: tables, queries, forms, and reports.
Maulik Chandarana DBMS

Q. What Are Tables?


 Data are always stored in tables, and understanding the design of the tables in
your Access database can save you hours of work. Each table contains
information about one subject, such as employees, members of the class of
1994, or addresses. One table might store customer names and addresses
while another stores customer orders. Tables are made up of records, which
contain all of the information about a single entry, such as an employee or
address. Each record is then subdivided into fields, which are the smallest
increments of useful data in your database. If you are making a mailing list,
then you might have fields for First Name, Middle Name, and Last Name,
rather than including only one field for a person’s name. Visualize your table
by imagining the fields across the top of your table as column headings and
then thinking of each record as a row in the table. Relational databases, like
Access and FileMaker Pro, use many tables that each store different
information about a related subject.

Q. What Are Queries?


 A query is a way of asking questions about data stored in your tables. A query’s
design tells the database engine exactly which data to retrieve. With queries
you can look at selected data from one or more tables without viewing all of
the fields in each table and without having to save the data over again. The
only parts of a query that most database management programs retain are the
design parameters. Queries are especially useful because they let you
organize your data without tampering with the actual records themselves. For
example, you could use a query to alphabetize a mailing list or to select only
residents of Pune from a state-wide mailing list.

Q. What Are Forms?


 Like a paper form, an Access form or a FileMaker Pro layout collects and
organizes information. In forms you can enter data into your database, display
this data for review, and print it out. Forms are designed to make onscreen
data entry and retrieval easier. In most database programs, you will almost
always use a form to enter and edit data because you can enter information
to be stored in more than one table on a single form. Another advantage of
using forms to enter and edit data is that you look at only one record at a
time. If you enter data using tables, you will have to look at a confusing
number of records at once.

Q. What Are Reports?


 A Report provides a way to retrieve selected stored data and present that
information effectively and meaningfully. Reports are designed to be printed
out rather than viewed on a computer screen, so they need to be carefully
planned. Examples of everyday reports include mailing labels, invoices,
receipts, sales summaries, and phone books. You can combine text, data,
pictures, lines, boxes, graphs, and drawings to produce exactly the report you
want. Fortunately, the latest versions of the big database packages also come
with several preplanned report layouts that you can set up quickly using
Report Wizards.

Please understand the terms ‘tables’ and ‘queries’ very properly as they
are important.
Maulik Chandarana DBMS

Special Reading Supplement 2


The following diagram distinguishes between actual data, database (DB), and
database system (DBS) and database management system (DBMS).

A Database System (DBS)


In the diagram we see the following:
Database and Data: A "database" is basically a (often very complex) data structure.
Often it concerns data, which are stored in a system of mutually dependent files.
Those files contain the following information:
1. The set of data, available to the user, the so called "End-user data". Those are
the real data, which can be read, connected and modified by the user (if he has
the corresponding rights).
2. The so called "metadata" (the data describing the end-user data). In this part,
we describe the properties (e.g. their type) and the relative relations of the end-
user data.

DBMS and End-Users: A database is implemented by a powerful software system,


the so called "Database Management System" (DBMS). This system consists of a
number of programs, controlling the structure of the database as well as the access
to those data. The DBMS is serving as "mediator" between the end-user and the
effective user-data by translating the user-commands into complex sequences of
instructions. With this translation it ensures the access required for those
commands to the user-data. Often the DBMS enables the access to the data by
several, simultaneous independent users. The number of users can be very high
(searching in libraries, payment/account systems in banks etc.). The end-user has
the possibility of writing application-programs in classical programming languages
such as Pascal, COBOL, C, or JAVA (embedded in a query-system to the DMBS) or to
access with utility-programs made available by the DBMS. In any case most DBMS
offer a high level of abstraction of the data, by hiding its complexity behind a
relatively simple standard interface (principal of information-hiding by Parnas).

Thus, data, database, database management system and end-users together form
the DATABASE SYSTEM.

Special Supplement Reading 1 This piece will help you understand a DBMS
as a software program with fuller
Maulik Chandarana DBMS

understanding, and provide a more same information. In turn, this structure


practical view of concepts. makes data entry easier as well as easing
storage problems on your hard disk.
Q. What is a Database?
 A database is an organized collection of Q. What are parts of DBMS or a database
data. The primary function of a database program?
program is to enable the user to put a  In general, all database management
collection of information into some specific programs have the same overall
order: alphabetical, numerical, organization. Different types of objects
chronological, or some combination of the perform specific tasks. Most database
three. There are two key questions that programs contain four main object types:
must be answered before constructing a tables, queries, forms, and reports.
database:
1. What information do you want to maintain? Q. What Are Tables?
2. In what order do you want this information
organized?  Data are always stored in tables, and
The answers to these questions determine understanding the design of the tables in
how you will structure your database. your Access database can save you hours
of work. Each table contains information
Q. List the commonly used terms. about one subject, such as employees,
members of the class of 1994, or
 Database Program: The term database is addresses. One table might store
often used to refer to an entire database customer names and addresses while
management system (DBMS). For another stores customer orders. Tables are
example, the software programs Access, made up of records, which contain all of
dBase, FileMaker Pro and FoxBASE are the information about a single entry, such
often referred to as database programs. as an employee or address. Each record is
Microsoft Excel is usually considered a then subdivided into fields, which are the
spreadsheet application which contains smallest increments of useful data in your
several database functions. database. If you are making a mailing list,
then you might have fields for First Name,
Database File: Within a given program, Middle Name, and Last Name, rather than
the term database, or database file, has a including only one field for a person’s
more specific meaning. It refers to a name. Visualize your table by imagining
specific collection of data with a single the fields across the top of your table as
focus or topic. column headings and then thinking of each
record as a row in the table. Relational
Record: A database file is a group of databases, like Access and FileMaker Pro,
records that are identical in structure. A use many tables that each store different
record can contains information about a information about a related subject.
single item in your database.
Q. What Are Queries?
Field: Each record is made up of a series  A query is a way of asking questions about
of fields, which store individual bits of data stored in your tables. A query’s design
information inside a record. tells the database engine exactly which
data to retrieve. With queries you can look
Q. What are the types of databases? at selected data from one or more tables
 There are two main types of databases without viewing all of the fields in each
that you need to know about: flat-file and table and without having to save the data
relational. As the name implies, a flat-file over again. The only parts of a query that
database consists of a single database file most database management programs
or table which contains all of the retain are the design parameters. Queries
information that you want to store about are especially useful because they let you
your topic. This type of database is ideal organize your data without tampering with
for a simple database that does not the actual records themselves. For
contain a lot of repeated information. A example, you could use a query to
relational database, on the other hand, alphabetize a mailing list or to select only
consists of multiple database files or tables residents of Pune from a state-wide
linked together by at least one common mailing list.
field. For instance, a library card catalog
might consist of an Author table, a Title Q. What Are Forms?
table, and a Subject table. This type of  Like a paper form, an Access form or a
structure eliminates the endless repetition FileMaker Pro layout collects and
of author and title information that would organizes information. In forms you can
occur in a flat-file database containing the enter data into your database, display this
Maulik Chandarana DBMS

data for review, and print it out. Forms are mutually dependent files. Those files contain
designed to make onscreen data entry and the following information:
retrieval easier. In most database 1. The set of data, available to the user, the so
programs, you will almost always use a called "End-user data". Those are the real data,
form to enter and edit data because you which can be read, connected and modified by
can enter information to be stored in more the user (if he has the corresponding rights).
than one table on a single form. Another 2. The so called "metadata" (the data
advantage of using forms to enter and edit describing the end-user data). In this part, we
data is that you look at only one record at describe the properties (e.g. their type) and the
a time. If you enter data using tables, you relative relations of the end-user data.
will have to look at a confusing number of
records at once. DBMS and End-Users: A database is
implemented by a powerful software system,
Q. What Are Reports? the so called "Database Management System"
 A Report provides a way to retrieve (DBMS). This system consists of a number of
selected stored data and present that programs, controlling the structure of the
information effectively and meaningfully. database as well as the access to those data.
Reports are designed to be printed out The DBMS is serving as "mediator" between
rather than viewed on a computer screen, the end-user and the effective user-data by
so they need to be carefully planned. translating the user-commands into complex
Examples of everyday reports include sequences of instructions. With this translation
mailing labels, invoices, receipts, sales it ensures the access required for those
summaries, and phone books. You can commands to the user-data. Often the DBMS
combine text, data, pictures, lines, boxes, enables the access to the data by several,
graphs, and drawings to produce exactly simultaneous independent users. The number
the report you want. Fortunately, the latest of users can be very high (searching in
versions of the big database packages libraries, payment/account systems in banks
also come with several preplanned report etc.). The end-user has the possibility of writing
layouts that you can set up quickly using application-programs in classical programming
Report Wizards. languages such as Pascal, COBOL, C, or JAVA
(embedded in a query-system to the DMBS) or
Please understand the terms ‘tables’ and to access with utility-programs made available
‘queries’ very properly as they are important. by the DBMS. In any case most DBMS offer a
high level of abstraction of the data, by hiding
---***--- its complexity behind a relatively simple
standard interface (principal of information-
Special Reading Supplement 2 hiding by Parnas).
The following diagram distinguishes
between actual data, database (DB), and Thus, data, database, database management
database system (DBS) and database system and end-users together form the
management system (DBMS). DATABASE SYSTEM.

---***---

In the diagram we see the following:


Database and Data: A "database" is basically
a (often very complex) data structure. Often it
concerns data, which are stored in a system of

You might also like