CIS 321 Data Communications & Networking
Download
Report
Transcript CIS 321 Data Communications & Networking
Introduction to Databases
Angela Clark
University of South Alabama
Databases
Used to store electronic information
Referred to as secondary storage
We will discuss
Benefits for using databases
Database Management Systems
Different database structural formats
University of South Alabama - CIS 250
2
Benefits of Databases
Data Sharing – information in one department
can be readily shared with other departments
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 in the same database file
Data Redundancy – fewer files are necessary;
data is stored only once and in one location.
This reduces the storage space needed.
Data Integrity – Changes made in the
database will update all occurrences
University of South Alabama - CIS 250
3
Database Management
Systems
DBMS - special software that allows you to create,
modify, and gain access to a database
data dictionary - contains a description of the
structure of the data used in the database; defines
field names, type of data that can go into the field,
the size of the field, and defines which field is the
key field
query language - allows access to information in
the database; most widely used query language is
SQL (structured query language)
University of South Alabama - CIS 250
4
Database Organization
Most common types of database formats are:
Hierarchical Database
Network Database
Relational Database
Object Oriented Database
University of South Alabama - CIS 250
5
Hierarchical Databases
Structured in nodes (tree like structure)
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.
Progress top down to traverse fields. To find
information, you must start at the top with a parent
node and trace down the tree.
Use pointers to connect parent node to child nodes.
University of South Alabama - CIS 250
6
Hierarchical Databases
Advantages of Hierarchical Databases:
Efficient and easy to create
Disadvantages of Hierarchical Databases:
If a parent node is deleted, so are all child nodes
Cannot add a child node without adding all parent nodes
first
Low flexibility – paths and directories to information must
be specified in advance; very difficult to change
Difficult to maintain
University of South Alabama - CIS 250
7
Network Databases
Variation on the hierarchical database to
reduce data redundancy
Child nodes can have more than one parent
(many-to-many relationship)
Nodes are reached through pointers; may
provide more than one path to same
information
University of South Alabama - CIS 250
8
Network Databases
Advantages of Network Databases:
Efficient
Faster than hierarchical
Less data redundancy
Disadvantages of Network Databases:
Low flexibility
More pointers; the number of pointers increases
rapidly, which makes it much more complicated to
maintain and operate.
University of South Alabama - CIS 250
9
Relational Databases
The most flexible – it is not hierarchical in
nature
Uses tables made up of columns and rows
Columns correspond to Fields
Rows correspond to Records
Related tables can be linked together
through Common Data Elements (keys,
foreign keys)
University of South Alabama - CIS 250
10
Relational Databases
Advantages of Relational Databases:
Simple to add, delete, and edit; there are no pointers
It can relate data in one field in one table to another field
in another table
Flexible – ad hoc queries can combine data from
different sources
Disadvantages of Relational Databases:
Slower – may require multiple access to the data
Requires some data redundancy in order to be more
efficient - the same data must appear in multiple tables
to link the tables
Must remember to change/update all tables
University of South Alabama - CIS 250
11
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.
University of South Alabama - CIS 250
12
Types of Databases
Individual – collection of files primarily used by just one
person
Company/Shared – databases that can be used by multiple
users, shared through local area networks
Distributed – data for the database is stored in multiple
locations with access through communication networks
Proprietary – an enormous database developed to cover
particular subject areas; usually offers access to people for
a fee – databanks.
University of South Alabama - CIS 250
13
Questions
University of South Alabama - CIS 250
14