[go: up one dir, main page]

0% found this document useful (0 votes)
121 views13 pages

Chapter 1 - Introduction To Databases: 2-What Is A Database

Download as docx, pdf, or txt
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 13

Chapter 1 .

INTRODUCTION TO DATABASES

1- Presentation of basic concepts


Data are raw facts concerning things such as people, objects or events (Raw indicates that
facts and figures have not yet been processed to reveal their meaning)
Examples: Employee Number, Sales Amount.
Field is a character or group of characters that as a specific meaning . A field might be
defined as telephone number, name, date and so on .
Record is a logically connected set of one or more fields that describe a person, place or
thing .
File is a collection of related records. Examples: Students records, vendor records.
Information is data have been processed and presented in a form suitable for human
interpretation.
Examples: Sales per quarter, Sales by employee

Data management is a discipline that focuses on storage and retrieval of data.

2- What is a database
Database is a structured set of data held in a computer, especially one that is accessible in
various way.
Database is a collection of information is organized so that it can be easily accessed,
managed and updated.
Database is an organized collection of data, generally stored and accessed electronically
from a computer system.
Database is any collection of data, or information that is specially organized for rapid
search and retrieval by a computer .

3- Where are databases used in everyday life ?

1
Databases are obviously used in business applications and financial transactions; however,
databases are not just used for business applications. Your grocery store, bank, video rental
store and favourite clothing store all use databases to keep track of
customer,inventory,employee and accounting information. Databases allow for data to be
stored quickly and easily and are used in many aspects of our daily life .

4- Database Applications:
-Banking: all transactions
-Airlines: reservations, schedules
-Universities: registration, grades
-Sales: customers, products, purchases
- Online retailers: order tracking, customized recommendations
-Manufacturing: production, inventory, orders, supply chain
-Human resources: employee records, salaries, tax deductions
-Databases touch all aspects of our lives

5- What are the differents types of databases


Depending upon the usage requirements there are following types of databases available in
the market : centralised database, distributed database, Personal database, NoSQL
database, Relationnal database, Oriented object database
Database system is an organization of components that define and regulate the collection,
storage, management and use of data within a database environment
An database system has five key components: hardware, software, data, processes, and
people.

2
Hardware identifies all the system’s physical devices. This can be anything from a single PC a
full network of computers supported by one or more servers.
Software refers to the collection of programs used within the database system. It takes
three types of software to make the database system function fully: Operating system,
Database Management systems(DBMS), Applications programs and utilities.
People, this component includes all users of the database system :
systems administrators oversee the database system’s general operations
database administrators also known as DBA, and manage the DBMS’s use functionality
Database Designers design the database structure
Systems Analyst and programmers design and Implement the application programs
End Users are the people who use the application program
Procedures the instructions and rules that govern the design and use the database system.
These could include: how to log on, how to use a particular feature of the database, how to
backup data and what to do in the event of a failure , either of hardware or softwares

6-Characteristics of Database
The database approach has some very characteristic features which are discussed in detail
below:
1 Concurrent Use

A database system allows several users to access the database concurrently. Answering

different questions from different users with the same (base) data is a central aspect of an

3
information system. Such concurrent use of data increases the economy of a system.

An example for concurrent use is the travel database of a bigger travel agency. The

employees of different branches can access the database concurrently and book journeys

for their clients. Each travel agent sees on his interface if there are still seats available for

a specific journey or if it is already fully booked.

2 Structured and Described Data

A fundamental feature of the database approach is that the database systems does not

only contain the data but also the complete definition and description of these data. These

descriptions are basically details about the extent, the structure, the type and the format of

all data and, additionally, the relationship between the data. This kind of stored data is

called metadata ("data about data").

3 Separation of Data and Applications

As described in the feature structured data the structure of a database is described through

metadata which is also stored in the database. Anapplication software does not need any

knowledge about the physical data storage like encoding, format, storage place, etc. It

only communicates with the management systemf a database (DBMS) via a standardised

interface with the help of a standardised language like SQL. The access to the data and

the metadata is entirely done by the DBMS. In this way all the applications can be totally

seperated from the data. Therefore database internal reorganisations or improvement of

efficiency do not have any influence on the application software.

4 Data Integrity

Data integrity is a byword for the quality and the reliability of the data of a database

system. In a broader sense data integrity includes also the protection of the database from

unauthorised access (confidentiality) and unauthorised changes. Data reflect facts of the

real world. database.

5 Transactions

A transaction is a bundle of actions which are done within a database to bring it from one

consistent state to a new consistent state. In between the data are inevitable inconsistent.

A transaction is atomic what means that it cannot be divided up any further. Within a

4
transaction all or none of the actions need to be carried out.

A transactions is a very small unit of a program and it may contain several low-level tasks. A
transaction in a database system must maintain Atomicity,Consistency,Isolation, and Durability
commonly known as ACID properties, in order to ensure data integrity.

The ACID properties refers to the properties of a database

Atomicity in database ensures that the transactions are indivisible and irreducible where
transactions either commit or abort. If a part of transaction fails, then the entire transaction fails

Consistency any change in the value of a database at particular instance are consistent with changes
to other values.

Isolation transaction in database ensures that the working transaction will not be changed or
affected by any other transaction

Durability of the databases states that once transaction has been committed, should remain in the
same status even in the case of failures such as Power loss, Database crash.

6 Data Persistence

Data persistence means that in a DBMS all data is maintained as long as it is not deleted

explicitly. The life span of data needs to be determined directly or indirectly be the user

and must not be dependent on system features. Additionally data once stored in a

database must not be lost. Changes of a database which are done by a transaction are

persistent. When a transaction is finished even a system crash cannot put the data in

danger.

7- Database Management system (DBMS)

A database-management system (DBMS) is a collection of interrelated data and a set of


programs to access those data.
A database-management system (DBMS) is a set of programs to access the data
A database-management system (DBMS) is an environment that is both convenient and
efficient to use
A database-management system (DBMS) is a software package designed to define,
manipulate, retrieve and manage data in a database .
« A DBMS is a complex set of software programs that controls the organization,
storage, management, and retrieval of data in a database. DBMS are categorized

5
according to their data structures or types. It is a set of prewritten programs that are
used to store, update and retrieve a Database »

A DBMS generally manipulates the data itself, the data format, field names, record structure
and file structure.
It organizes your files to give you more control over your data. A DBMS makes it possible for
users to create,edit and update data in database files. Once created, the DBMS makes it
possible to store and retrieve data from those database files.
Examples of DBMS
Microsoft Access, Microsoft SQL Server, PostgreSQL, Oracle, Sysbase, MySql,
MongoDB,DB2,IBM DB2, ….

The collection of data, usually referred to as the database, contains information relevant to
an enterprise. The primary goal of a DBMS is to provide a way to store and retrieve database
information that is both convenient and efficient. By data, we mean known facts that can be
recorded and that have implicit meaning.
For example, consider the names, telephone numbers, and addresses of the people you
know. You may have recorded this data in an indexed address book, or you may have stored
it on a CD , using a personal computer and software such as DBASE IV or V, Microsoft
ACCESS, or EXCEL

Database systems are designed to manage large bodies of information. Management of data
involves both defining structures for storage of information and providing mechanisms for
the manipulation of information. In addition, the database system must ensure the safety of
the information stored, despite system crashes or attempts at unauthorized access. If data
are to be shared among several users, the system must avoid possible anomalous results.

8-Characteristics of DBMS
-Stores any kind of data. A database management system should be able to store any kind of
data
-Support ACID properties
-Represents complex relationship between data
-Backup and recovery
-Data integrity
-Concurent use of database

6
Advantages and Disadvantages of a DBMS
Advantages
Using a DBMS to manage data has many advantages:
Data independence: Application programs should be as independent as possible from
details of data representation and storage. The DBMS can provide an abstract view of the
data to insulate application code from such details.
Efficient data access: A DBMS utilizes a variety of sophisticated techniques to store and
retrieve data efficiently. This feature is especially important if the data is stored on
external storage devices.
Data integrity and security: If data is always accessed through the DBMS, the DBMS
can enforce integrity constraints on the data. For example, before inserting salary
information for an employee, the DBMS can check that the department budget is not
exceeded. Also, the DBMS can enforce access controls that govern what data is visible to
different classes of users.
Data administration: When several users share the data, centralizing the administration
of data can offer significant improvements. Experienced professionals who understand
the nature of the data being managed, and how different groups of users use it, can be
responsible for organizing the data representation to minimize redundancy and fine tuning
the storage of the data to make retrieval efficient.
Concurrent access and crash recovery: A DBMS schedules concurrent accesses to the
data in such a manner that users can think of the data as being accessed by only one user
at a time. Further, the DBMS protects users from the effects of system failures.
Reduced application development time: Clearly, the DBMS supports many important
functions that are common to many applications accessing data stored in the DBMS.

7
8-Disadvantages of a DBMS

Danger of a Overkill: For small and simple applications for single users a database
system is often not advisable.
Complexity: A database system creates additional complexity and requirements. The
supply and operation of a database management system with several users and databases
is quite costly and demanding.
Qualified Personnel: The professional operation of a database system requires
appropriately trained staff. Without a qualified database administrator nothing will work
for long.
Costs: Through the use of a database system new costs are generated for the system
itselfs but also for additional hardware and the more complex handling of the system.
Lower Efficiency: A database system is a multi-use software which is often less efficient
than specialised software which is produced and optimised exactly for one problem.

9- Levels of Abstraction or the three levels architecture

8
The objective of three-level architecture is to separate a user’s view of the database from
the way that the data is physically represented. In this architecture, schemas can be defined
at the following three levels:
-The internal Level
- The Conceptual Level
- The External or view level

External Level
This is concerned with Views of individual users or groups of users . There can be many
distinct external views . This enables the DBA to limit access and ensure security .

Conceptual Level
This describes the Logical structure of the entire database. It hides the physical storage
structures and concentrates on describing the data concepts. It includes all data and their
relationships .

9
Internal Level
This is the physical storage structure of the database . It describes how the data is held and
manipulated. It is describes by an internal schema which includes such details as data types,
addressing modes, compression and encryption techniques.

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


- Logical level: describes data stored in database, and the relationships among the data.
type customer = record
customer_id : string;
customer_name : string;
customer_street : string;
customer_zip : integer;
end;
-View level:
application programs hide details of data types. Views can also hide information (such as an
employee’s salary ) for security and confidentiality purposes.

10
10- Instances and Schemas
Databases change over time as information is inserted and deleted. The collection of
information stored in the database at a particular moment is called an instance of the
database. The overall design of the database is called the database schema. Schemas are
changed infrequently, if at all.
The concept of database schemas and instances can be understood by analogy to a
program written in a programming language. A database schema corresponds to the
variable declarations (along with associated type definitions) in a program. Each variable
has a particular value at a given instant. The values of the variables in a program at a
point in time correspond to an instance of a database schema.
Database systems have several schemas, partitioned according to the levels of
abstraction.
The physical schema describes the database design at the physical level, while the
logical schema describes the database design at the logical level. A database may also
have several schemas at the view level, sometimes called subschemas, that describe
different views of the database
-schema – the logical structure of the database
Example: The database consists of information about a set of customers
and accounts and the relationship between them
-Analogous to type information of a variable in a program
-Sub-Schema : is a highest level; ie at view level
- Physical schema: database design at the physical level
- Logical schema: database design at the logical level
- Instance – the actual content of the database at a particular point in time
-Analogous to the value of a variable
-Physical Data Independence – the ability to modify the physical schema without changing
the logical schema
-Applications depend on the logical schema
-In general, the interfaces between the various levels and components
should be well defined so that changes in some parts do not seriously
11
influence others.

Exercises
MCQ
1-Database is collection of ……
a) Module b) Programs c) None of these d) Data
2- --------------------------Is a collection of interrelated data and set of program to access them
a) Data structure b) Database c) Database Management System d) Programming
language
3) DBMS should provide following feature(s)---------------
a) Authorized access b) Safety of the information stored c) protect data from
system crash d)All of these
4) Which of the following is considered as DBMS
a) Foxpro b) all of these c) oracle d) access
5) Before use of DBMS information was stored using---------------
a) File management system b) Data system c) none of these d) cloud storage
6) Duplication of data at several places is called as
a)data isolation b)atomicity problem c) data inconsistency d) data redundancy
7) Data redundancy increases the cost of storing and retrieving data
a) true b) false
8) which of the information is not redundant
a) account-no b)mobile c) address d) name
9) if in redundant file common fields are not matching then it results in ---------
a) Data integrity problem b)Data Redundancy c) Data inconsistency d)Data isolation
10) it is difficult to access conventional file system than database system
a) true b) false
11) A main purpose of DBMS is to provide -----------------view of data to user .
a) abstract b) none of these c) partial d) complete
AbSTRACT because complexity of Database and its implementation details are
hidden from the user.
12) -------------- means to hide certains details of how data is stored and maintain
a) Data abstraction b) Data isolation c) none of these d) data integrity

12
13) there are ------------------------levels of data abstraction
a) 4 b)1 c)2 d)3
15) in Data abstraction which is lowest level of abstraction
a) physical b) conceptual c) view level d) none of these
16) --------------------of abstraction explains how data is actually stored and describes the
data structure and Access method used by database
a) physical level b) conceptual level d) view level
17) Collection of information stored in database at particular instance of the time is called as
-------------------------
a) Objects in database b)Database schema c)Instance of database d)Data structure
18) Overall design of the database is called as
a) none of these b)Database Schema c)Database schema c) Database abstraction
d)Database instance
19)which of the following are valid types of Database Schema’s
a) Physical and practical schema b) physical and logical schema c)practical schema d) logical

20) which of the following schema is present at highest level


a) none of these b) logical schema c) sub-schema d)physical schema

13

You might also like