0% found this document useful (0 votes)
46 views

Database Management Systems

This document discusses database management systems and different types of databases. It explains that databases are used to store electronic information and discusses how data is organized into fields, records, tables, and files. It then covers different methods for processing and organizing data, including sequential, direct, and index sequential file storage. Finally, it summarizes the main types of database models - hierarchical, network, relational, and object-oriented - and compares their advantages and disadvantages.

Uploaded by

Joey Jean Lim
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views

Database Management Systems

This document discusses database management systems and different types of databases. It explains that databases are used to store electronic information and discusses how data is organized into fields, records, tables, and files. It then covers different methods for processing and organizing data, including sequential, direct, and index sequential file storage. Finally, it summarizes the main types of database models - hierarchical, network, relational, and object-oriented - and compares their advantages and disadvantages.

Uploaded by

Joey Jean Lim
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

Database Management Systems

Databases

l  Used to store electronic information


l  Referred to as secondary storage

l  We will discuss
l  Uses for databases
l  How information may be organized in
databases
l  How it may be processed

2
Data Organization
l  Character – a single letter, number, or
character (ex: A)
l  Field – a set of related characters (ex: Last
Name)
l  Record – a set of related fields (ex: all
information on a specific drivers license)
l  Table – a collection of related records (ex: all
drivers licenses for Mobile County)
l  Database – a collection of related files (ex: all
drivers license files for the state of Alabama)
3
Key Fields

l  Key fields are used within each record


to specifically identify an individual
record
l  Should be unique
l  Example: driver’s license number

4
Processing of Data

l  Batch processing - data is collected


over a period of time (hours, days, or
weeks, etc.) and is processed all at
once
l  Real-time processing - data is
processed at the same time the
transaction occurs; more widely used
now due to direct access storage
(disks)
5
File Organization

l  3 main methods of file organization:


l  Sequential
l  Direct file storage
l  Index Sequential

6
Sequential File Storage

l  Sequentially - records are stored physically


one after another in a predetermined order,
determined by the key field; can be stored on
tapes.
l  Advantage - can be very efficient when all or large
portions of the records need to be accessed at the
same time
l  Disadvantage - can be much slower when looking
for a particular record since we must begin with the
1st record and check through every one in order
until we find it

7
Direct file storage
l  Directfile storage - records are stored on
a disk in a particular address that can be
determined by their key field; can be
stored on disk.
l  Adv - very efficient when finding a specific
record and does not require looking through
each one in order to access it
l  Disadv - more storage space is required on
the disk, which may not be as good when
accessing large portions of the record.
8
Index sequential

l  Index sequential access - a compromise


between sequential and direct file
access;
l  Records are stored in a file, in sequential
order; however, an index also exists.
The index lists the key to groups of
records and the corresponding disk
address for those records.
l  Requires disks as storage devices.

9
Index sequential (cont)

l  Adv - faster than sequential, but not as


fast as direct file access for specific
records; when updating a large number
of records, it is faster than direct access
but slower than sequential access.
l  Best used when large amounts of
records must be updated only
occasionally, but the user also desires
quick access to specific records.

10
Benefits of Databases
l  Data Sharing – information in one department can
be readily shared with other departments.
l  Security – users can be given passwords and/or
access only to the kind of information they need to
know while containing all of the information only
once in the database.
l  Data Redundancy – fewer files are necessary; the
data is stored only once and in one location. This
reduces the storage space needed.
l  Data Integrity – Changes made in the file will
update all occurrences of the information.

11
Database Management Systems

l  DBMS - special software that allows you to


create, modify, and gain access to a database.
l  data dictionary - contains a description of the
structure of the data used in the database;
defines the field names, what type of data can
go into the field, the size of the field, and also
defines which field is the key field.
l  query language - allows access to the
information in the database; most widely used
query language is SQL (structured query
language).
12
Database Organization

l  Most common types of database formats


are:
l  HierarchicalDatabase
l  Network Database

l  Relational Database

l  Object Oriented Database

13
Hierarchical Databases

l  Structured in nodes (tree like structure)


l  Each child node has one and only one parent
node (a parent may have more than one child
node). We refer to this as a 1-to-many
relationship.
l  Progress top down to traverse fields. To find
information, you must start at the top with a
parent node and trace down the tree.
l  Use pointers to connect parent node to child
nodes.
14
Hierarchical Databases
l  Advantages of Hierarchical Databases:
l  Efficient and easy to create

l  Disadvantages of Hierarchical Databases:


l  If a parent node is deleted, so are all child nodes

l  Cannot add a child node without adding all parent


nodes first
l  Low flexibility – paths and directories to information
must be specified in advance; very difficult to
change
l  Difficult to maintain

15
Network Databases

l  Variationon the hierarchical database to


reduce data redundancy
l  Child nodes can have more than one
parent (many-to-many relationship)
l  Nodes are reached through pointers;
may provide more than one path to
same information

16
Network Databases

l  Advantages of Network Databases:


l  Efficient

l  Fasterthan hierarchical
l  Less data redundancy

l  Disadvantages of Network Databases:


l  Low flexibility
l  More pointers; the number of pointers
increases rapidly, which makes it much
more complicated to maintain and operate.
17
Relational Databases
l  The most flexible – it is not hierarchical
in nature
l  Uses tables made up of columns and
rows
l  Columns correspond to Fields
l  Rows correspond to Records

l  Related tables can be linked together


through Common Data Elements (keys,
foreign keys)
18
Relational Databases
l  Advantages of Relational Databases:
l  Simple to add, delete, and edit; there are no
pointers
l  It can relate data in one field in one table to another
field in another table
l  Flexible – ad hoc queries can combine data from
different sources
l  Disadvantages of Relational Databases:
l  Slower – may require multiple access to the data
l  Requires some data redundancy in order to be
more efficient - the same data must appear in
multiple tables to link the tables
l  Must remember to change/update all tables
19
Object Oriented Databases

•  Handles unstructured data such as


photographs, graphics, audio, video, etc.
•  Keep track of objects – both data and
the action that can be taken on the
object.

20
Types of Databases

l  Individual – collection of files primarily used by just


one person
l  Company/Shared – databases that can be used
by multiple users, shared through local area
networks
l  Distributed – data for the database is stored in
multiple locations with access through
communication networks
l  Proprietary – an enormous database developed to
cover particular subject areas; usually offers
access to people for a fee – databanks.
21

You might also like