UNISO RDBMS Week 1 2

22
Relational Database Management System Course ENG. MOHAMED ADAM ISAK M.SC. AND B.SC. OF INFORMATION TECHNOLOGY ENGINEERING LECTURER IN MOGADISHU UNIVERSITY AND UNIVERSITY OF SOMALIA [email protected] WWW.ENGMAISAK.BLOGSPOT.COM TELL:0699370711

Transcript of UNISO RDBMS Week 1 2

Relational Database Management System Course

ENG. MOHAMED ADAM ISAK

M.SC. AND B.SC. OF INFORMATION TECHNOLOGY ENGINEERING

LECTURER IN MOGADISHU UNIVERSITY AND UNIVERSITY OF SOMALIA

[email protected]

TELL:0699370711

SEPT 2014 –FEB 2015

Week 1&2.

Introduction to the course Basic concepts of Database systems

Objectives

•     To understand Objectives of Database System

•     Features of relational database model

•     Advantages and dis advantages of Database System

•     Disadvantages of file System

•     Types of Database

3

DATA and Information

DATA: Raw fact about object, people and events

Information: data have been processed

4

Database Concept

A database is a collection of some logically related files.

A file is a collection of some logically related records.

A record is a collection of some logically related data fields.

5

FILES DATABASE

record 1record 2record 3record 4: : : : : : :

DATA

Objectives of Database System

A database must be shared by a community of users.

The integrity of the database must be preserved.

The database should be capable of evolving, both in the short term and in the longer term.

6

File Processing Approach and its dis-advantages

File Processing Approach is the traditional approach to information system design.

It focuses on the data processing needs of individual departments in the organization.

Disadvantages of “File Processing Approach”Uncontrolled RedundancyInconsistent DataInflexibilityLimited Data SharingPoor Enforcement of StandardsProblem of Maintenance

7

Advantages of Database System

Avoidance of unnecessary duplication of data. Multiple use of data: it follows that although data is input once, it can be used for several purposes.

A database provides data for the organization as a whole, not just for individual departments.

The organization of data into a database encourages the integration of data.

Because data is only held once, it is easier to ensure that it is up-to-date.

Developing new application programs with a DBMS is easier.

8

Disadvantages of Database System

There are problems of data security and data privacy.

Since there is only one set of data, it is essential that the data should be accurate and free from corruption.

Since data is held once, but its use is widespread, there are potential problems of recovery of data in the event of a system failure.

A database implies a central file, but access might be required from a wide geographical area.

9

Database modeling methodologies

1.Hierarchical (tree) database model. 2.Network database model. 3.Relational database model.

10

Hierarchical Database 11

1) Hierarchical Database Model (1/2)

The Hierarchical model is the oldest of the database models.

It is derived from the Information Management Systems of the 1950's and 60's.

It was adopted by many banks and insurance companies who are still running it as a legacy systems to this day.

It stores its data in a series of records, which have a set of field values attached to it.

These record types are the equivalent of tables in the relational model, and with the individual records being the equivalent of rows.

12

1) Hierarchical Database Model (2/2)

To create links between these record types, the hierarchical model uses Parent Child Relationships.

These are a 1:N mapping between record types. The hierarchical model is more structured that the network model, since it only allows a single tree, with no links between layers in different branches of the tree.

13

142) Network Database Model (1/2)

2) Network Database Model (2/2)

The Network Database model was designed to solve some of the more serious problems with the Hierarchical Database Model.

The Network model solves the problem of data redundancy by representing relationships in terms of sets rather than hierarchy.

The model had its origins in the Conference on Data Systems Languages (CODASYL) which had created the Data Base Task Group to explore and design a method to replace the hierarchical model.

15

2) Network databases

The network model is very similar to the hierarchical model actually. In fact, the hierarchical model is a subset of the network model.

Instead of using a single-parent tree hierarchy, the network 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.

16

173) Relational databases (1/2)

3) Relational databases (2/2)

In relational database the data and relations between them are organized in tables.

A table is a collection of records and each record in a table contains the same fields.

18

Why are RDBMS useful?

Data independence – provides abstract view of the data, without details of storage

Efficient data access – uses techniques to store and retrieve data efficiently

Reduced application development time – many important functions already supported

Centralized data administrationData Integrity and SecurityConcurrency control and recovery

19

Features of relational database model A relation is viewed as a two dimensional array, that is, a matrix of 'n' rows and 'm' columns.

A row of a relation represents a record.A column of a relation describes the attribute of a record.An attribute draws its value from a value set described as a domain.

Each record or tuple has a unique identifier or primary key. A tuple may have one or more candidate key which may form an alternate primary key.

A tuple may have secondary keys For example, 'department' and 'school' may serve as the secondary keys in a university student database.

20

Properties of Relational Tables

Values Are Atomic Each Row is Unique Column Values are of the same kind The Sequence of Columns is Insignificant The Sequence of Rows is Insignificant Each Column Has a Unique Name

21

Q & A22