Download lection4-relational_database_development

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Open Database Connectivity wikipedia , lookup

SQL wikipedia , lookup

Concurrency control wikipedia , lookup

Microsoft Jet Database Engine wikipedia , lookup

Relational algebra wikipedia , lookup

Ingres (database) wikipedia , lookup

Clusterpoint wikipedia , lookup

Database wikipedia , lookup

Entity–attribute–value model wikipedia , lookup

Healthcare Cost and Utilization Project wikipedia , lookup

Extensible Storage Engine wikipedia , lookup

Relational model wikipedia , lookup

Database model wikipedia , lookup

Transcript
Development of the
Relational Databases
Lection №4
Main Questions
 Database
introduction.
 Development of the Relational
Databases.
1.Database introduction
Definition of the database
 Types of Databases
 Database Models

1.0.Repeat - IS
An Information System (IS) is the system of
persons, data records and activities that
process the data and information in a given
organization, including manual processes or
automated processes;
 The computer-based information systems is
only the Information technologies
component of an Information System;
 The computer-based information systems are
the field of study for Information
technologies (IT)
1.0.Repeat - HIS
The aim of an HIS is to achieve the best
possible support of patient care and
administration by electronic data
processing:
 more efficient use of the restricted resources
available for patient care;
 qualitative improvement of the service to the
patient;
 support of research;
 support of teaching;
1.0.Repeat - HIS
Databases
1.0.Repeat - HIS
Databases
1.1.Definition of the database

Brief. Database is a computerized record
keeping system.

Full. Database is a system involving data,
the hardware that physically stores that
data, the software that utilizes the
hardware's file system in order to 1) store
the data and 2) provide a standardized
method for retrieving or changing the data,
and finally, the users who turn the data
into information
1.2.Types of Databases
Analytic databases (OLAP- On Line
Analytical Processing) are primarily
static, read-only databases which store
archived, historical data used for analysis.
 Operational databases (OLTP On Line
Transaction Processing), are used to
manage more dynamic bits of data. This
databases allow you to modify that data
(add, change or delete data). These types
of databases are usually used to track realtime information.

1.3. Database Models
Hierarchical Databases - defines
hierarchically-arranged data.
 Network Databases - use set theory to
provide a tree-like hierarchy with the
exception that child tables were allowed to
have more than one parent .
 Relational Databases - represents data in
the form of two-dimension tables.

1.3.1.Hierarchical Databases



This type of relationship can be visualized as
upside down tree of data. In this tree, a single
table acts as the "root" of the database from
which other tables "branch" out.
Problem 1. User cannot add a record to a child
table until it has already been incorporated into
the parent table .
Problem 2. Redundancy would occur because
hierarchical databases handle one-to-many
relationships well but do not handle many-tomany relationships well
Hierarchical Databases Structure
Redundancy in
the hierarchical
database
1.3.2.Network Databases ІМ


Is very similar to the hierarchical model
actually. In fact, the hierarchical model is a
subset of the network model. However,
instead of using a single-parent tree
hierarchy, this model uses set theory to
provide a tree-like hierarchy with the
exception that child tables were allowed to
have more than one parent. This allowed the
network model to support many-to-many
relationships.
Problem. This model was difficult to
implement and maintain
Network Databases Structure
1.3.3.Relational Databases
Was formally introduced by Dr. E. F. Codd in
1970 and has evolved since then:
 Represents data in the form of twodimension tables.
 Each table represents some real-world
person, place, thing, or event about which
information is collected.
 Two or more tables can be linked by
relationship.
2. Development of the
Relational Databases







Overview of the Relational Model
Data Structure and Terminology
Properties of Relational Tables
Relationships and Keys
Data Integrity
Normalization
DBMS
2.1.Relational Model Overview



The relational model represents data in the
form of two-dimension tables.
The organization of data into relational tables is
known as the logical view of the database. That
is, the form in which a relational database
presents data to the user and the programmer. .
The way the database software physically stores
the data on a computer disk system is called the
internal view. The internal view differs from
product to product.
2.2.Data Structure and Terminology

A database is a collection of relational tables.

A relational table is a flat file composed of a set
of named columns and an arbitrary number of
unnamed rows.

A data value is stored in the intersection of a
row and column.

The columns of the tables contain information
about the table. The rows of the table represent
occurrences of the "thing" represented by the
table.
2.2.1. Terminology
In This
Document
Formal Terms
Many Database
Manuals
Relational Table
Relation
Table
Column
Attribute
Field
Row
Tuple
Record
2.3. Properties of Relational
Tables






Values are atomic.
Column values are of the same kind.
Each row is unique.
The sequence of columns is
insignificant.
The sequence of rows is insignificant.
Each column must have a unique name.
2.3.1. Properties of Relational
Tables


Values are atomic - columns in a
relational table are not repeating group
or arrays. Such tables are referred to as
being in the "first normal form" (1NF) .
Column values are of the same kind.
In relational terms this means that all
values in a column come from the same
domain. A domain is a set of values
which a column may have.
2.3.2. Properties of Relational
Tables

Each row is unique. This property ensures
that no two rows in a relational table are
identical; there is at least one column, or set
of columns, the values of which uniquely
identify each row in the table.

The sequence of columns is insignificant.
This property states that the ordering of the
columns in the relational table has no
meaning. Columns can be retrieved in any
order and in various sequences.
2.3.3. Properties of Relational
Tables

The Sequence of Rows is
Insignificant. The rows of a relational
table can be retrieved in different order
and sequences.

Each Column Has a Unique Name.
Because the sequence of columns is
insignificant, columns must be referenced by
name and not by position.
2.4. Relationships and Keys




A relationship is an association between two or
more tables. Relationships are expressed in the
data values of the primary and foreign keys .
A primary key is a column or columns in a table
whose values uniquely identify each row in a table
Визначити ключові атрибути.
A foreign key is a column or columns whose values
are the same as the primary key of another table.
The relationship is made between two relational
tables by matching the values of the foreign key in
one table with the values of the primary key in
another.
2.4.1. Relationships Type

A one-to-one (1:1) relationship is when at most one
instance of a entity A is associated with one instance
of entity B.
2.4.2. Relationships Type

A one-to-many (1:N) relationships is when for one
instance of entity A, there are zero, one, or many
instances of entity B, but for one instance of entity
B, there is only one instance of entity A.
2.4.3. Relationships Type

A many-to-many (M:N) relationship (non-specific) is
when for one instance of entity A, there are zero,
one, or many instances of entity B and for one
instance of entity B there are zero, one, or many
instances of entity A .
2.5. Data Integrity



Data integrity means, in part, that you can correctly
and consistently navigate and manipulate the
tables in the database.
The entity integrity rule states that the value of
the primary key can never be a null value (and
should never be unknown).
The referential integrity rule states that if a
relational table has a foreign key, then every value
of the foreign key must either be null or match the
values in the relational table in which that foreign
key is a primary key
2.6. Normalization Basics.
The goal of normalization is to create a set
of relational tables that are free of redundant
data and that can be consistently and
correctly modified. .
 Normalization theory is based on the
concepts of normal forms. There are
currently five normal forms that have been
defined.
 Normalization is essentially a two step
process that puts data into tabular form by
removing repeating groups and then removes
duplicated data from the relational tables.

2.6. Normalization. 1NF

A relational table, by definition, is in first normal
form (1NF). All values of the columns are atomic.
That is, they contain no repeating values. Table in
1NF it contains redundant data
2.6. Normalization. 2NF

A relational table is in second normal form
(2NF) if it is in 1NF and every non-key column
is fully dependent upon the primary key.
2.6. Normalization. 3NF

A relational table is in third normal form (3NF) if it is
already in 2NF and every non-key column is non
transitively dependent upon its primary key. In other
words, all nonkey attributes are functionally
dependent only upon the primary key.
2.7. DBMS.
 A database
management system
(DBMS) is a software package with
computer programs that control the
creation, maintenance, and use of a
database.
 It allows organizations to
conveniently develop databases for
various applications by database
administrators (DBAs) and other
specialists.
Conclusion
In this lecture was described next
questions:
 Database introduction.
 Development of the Relational
Databases.
Literature

Electronic documentation into the
intranet section of the TDMU webserver:
http://www.tdmu.edu.te.ua