Chapter7
Database
management
Foundations of Computer Science ã Cengage Learning 1
database
A database is an organized collection of data,
generally stored and accessed electronically from a
computer system. Where databases are more complex
they are often developed using formal design and
modeling techniques.
types of databases:-
1. Distributed database.
2. Centralized database.
2
why is database used?
Computer databases were used as a way to store and manage
large amounts of information digitally. Companies began to
use databases for a means of inventory tracking, customer
management and accounting purposes.
Various types of Database Management Systems based
in data models are as follows:
1. Relational Database Management Systems.
2. Hierarchical Database Management Systems.
3. Network Database Management Systems.
4. Object-oriented Database Management Systems.
3
Data
The smallest unit of storage is the byte, which consists of 8 bits. This
byte can represent numbers, characters, or parts of an image. The unit
of interest in processing business data is the character, for example, the
number 9 or the letter A.
Direct Access Files :-
There are two major types of files
1- sequential access
Sequential files were the first type of secondary storage. All records
are kept in some sequence such as numerical order by Social
Security numbers. Most of us will encounter sequential
access files only in special circumstances. Records in this type of
file are located one after another according to a given sequence.
4
2-A direct-access
A direct-access file uses a physical medium and programming,
which facilitate the storage and retrieval of specific records. These
files are at the heart of database management systems and most of
today's file storage technology.
Storage Media:
The most common device for storing direct-access files is the
magnetic disk One type of disk consists of a series of platters
mounted on a spindle. The top and bottom of each platter (except
for the very top and bottom ones) are coated with a magnetic
material like that on a music cassette tape. Read and write heads
are fitted between the platters.
5
6
Relational Database: Definitions
Relational database: a set of relations
Relation: made up of 2 parts:
Instance: a table, with rows (records) and columns (fields).
#Rows = cardinality, #fields = degree / arity.
Schema : specifies name of relation, plus name and type of each
column.
E.G. Students(sid: string, name: string, login: string, age: integer, gpa:
real).
The relation is a set of rows (tuples)
i.e. all rows must be distinct.
Example Instance of Students Relation
Schema:
Students(sid:string, name:string, login:string,
age:integer, gpa:real)
sid name login age gpa
53666 Jones jones@cs 18 3.4
53688 Smith smith@eecs 18 3.2
53650 Smith smith@math 19 3.8
ENTER DATABASE MANAGEMENT SOFTWARE
A DBMS has to provide:
• A method for defining the contents of the database.
• A way to describe relationships among data elements and records
• A mechanism to set up the database in the first place.
• Ways to manipulate the data including:
Updating (adding, modifying, and/or deleting information).
9
DATABASES IN SYSTEMS DESIGN
It should be apparent at this point that one of the
major design tasks in building an
information system is determining the contents and
structure of a database. The
type of retrieval and reporting required by users and
the availability of input determine
what data to store. However, it is a very complex task
to specify these data,
group them into records, and establish data structures
for a system.
10
Oracle: An Enterprise DBMS
The Oracle Corporation is the leading vendor of
databases at the enterprise or entire firm level,
claiming to have a 50 percent market share for server
database systems.
Today the company positions its primary database
system called Oracle n,
11
Distributed Databases
Organizations are building more distributed databases
in which different parts of the database are located on
different computers in a network.
The movement toward client-server computing and
the implementation of groupware will accentuate
this trend. This type of database raises a number of
issues for the organization,
Will data be replicated across computers, or will there
be only one copy?
12
The Data Warehouse
A data warehouse is a collection of databases that
work together. ...
Data mining is the process of analyzing data and
summarizing it to produce useful information. Data
mining uses sophisticated data analysis tools to
discover patterns and relationships in large datasets..
13