You are on page 1of 26

RELATIONAL DATABASE MANAGEMENT SYSTEM

INTRODUCTION TO DATABASE CONCEPTS


1. INTRODUCTION
 Data is a Basic building block of any DBMS.  

 Data is a collection of facts, such as numbers, words,


measurements, observations or even just descriptions of things.
 
 Having no particular meaning - e.g. 1, ABC, 19 etc.

2
1.1. QUALITATIVE VS QUANTITATIVE

•Qualitative data is descriptive information (it describes something)

•Quantitative data is numerical information (numbers).

3
1.2. EXAMPLE:

What do we know about the Dog?

Quantitative:
Discrete:
Qualitative:
He has 4 legs
He is brown and black He has 2 brothers
Continuous:
He has long hair
He weighs 25.5 kg 4
He has lots of energy
He is 565 mm tall
CLASS WORK
 Read the following examples and then decide if the example is qualitative (1) or quantitative
(2).
 
1- The bird has 2 wings.

2- Ms. J has Blue eyes.

3- The flower has 7 petals.

4- The fish feels slimy.

5- The sloth weighs 217lbs.

6- The red flower has 2 green leaves on its stem.

7- The egg smells.


5
8- The road is long.
CLASS WORK - SOLUTIONS
1. Quantitative

2. Qualitative

3. Quantitative

4. Qualitative

5. Quantitative

6. Both~ Red flower (qualitative, 2 leaves~ quantitative)

7. Qualitative

8. Qualitative (How long?) 6


 
2. DATABASE
 Database is a collection of interrelated data.

 A Database is a collection of related data organized in a


way that data can be easily accessed, managed and
updated.

 Collection of tables will also known as database.

7
3. DATABASE MANAGEMENT SYSTEM (DBMS)

 It is system that provides an environment to handle the


database, which must be efficient and convenient to use.

 Tasks of a DBMS over a DataBase


1. Store the Data
2. Visualize the Data
3. Access the Data
4. Manipulate the Data

8
3.1 PURPOSE OF DATABASE SYSTEMS

 Database systems arose in response to early methods of


computerized management of commercial data.

 To allow users to manipulate the information, the system has a


number of application programs that manipulate the files

 Add new students, instructors, and courses


 Register students for courses and generate class rosters

 Assign grades to students, compute grade point averages (GPA),


and generate transcripts
9
4. DATABASE APPLICATIONS

Enterprise Information

 Sales
 Accounting

 Human resources

 Manufacturing

 Online retailers

10
Banking and Finance

 Banking
 Credit card transactions

 Finance

 Universities

 Airlines

 Telecommunication

11
4.1 CHARACTERISTIC OF A GOOD DATABASE

 Database should be strong enough to store all kinds of data

 Should be able to relate the entities / tables in the database by


means of a relation

 Data and application should be isolated

 Data should be stored in such a way that it should not be


repeated in multiple tables

12
CONT…

 Easy retrieve and manipulate the data

 Multiple users should be able to access the same


database

 Single database provides different views to different


users.

 Database should also provide security

13
 Database should also support ACID property
5. FILE PROCESSING SYSTEM

14
15
6. ADVANTAGES OF FILE PROCESSING SYSTEM

1. Data Redundancy and Inconsistency:

Ex:
Data Redundancy:
If a student register for a double major (Computer Science,
Maths), the address and the phone number of that student may
appear in both department files. This may lead to higher
storage and access cost.

Inconsistency:
The student may require an address change; it may not be 16
updated in all the departments.
2. DIFFICULTY IN ACCESS THE DATA

Conventional file processing environments do not allow


needed data to be retrieved in a convenient and efficient
manner.

 Ex:

 If university clerk needs to find out the student names


who live in a particular postal code area.

17
3. DATA ISOLATION
Data are scattered in various files, and files may in
different format, writing new application programs to
retrieve the data is difficult.

 Ex:
Imagine we have to generate a single report of student,
who is studying in particular class, his study report, his
library book details, and hostel information. All these
information are stored in different files.

18
4. INTEGRITY PROBLEMS

 The data values stored in the database must satisfy


certain consistency constraints.

Ex:

 The University has a rule that each student is able to


apply only 3 papers for their arrear exams.

19
5. ATOMICITY PROBLEMS
 In many applications, it is crucial that, is a failure occurs,
the data be restored to the consistent state that existed to
the prior the failure. It is difficult to ensure the atomicity
in file processing system.

 Ex:

 Consider a program to transfer Rs. 10000 from CS


department to Maths department. A system failure occurs
during the execution of the program; Rs. 10000 was
removed from CS account but amount not credited maths
department account.
20
ANOMALIES
 Accessing the same data by more than one user is called
concurrent access. In the file system, concurrent access leads to
incorrect data.

 Ex:

For example, a student wants to borrow a book from the library.


He searches for the book in the library file and finds that only one
copy is available. At the same time another student also, wants to
borrow the same book and checks that one copy available. First
student opt for borrow and gets the book. But it is still not
updated to zero copy in the file and the second student also opt
for borrow! But the book is not available.
21
7. SECURITY PROBLEMS
 Not the every user of the database system should able to
access all the data.

 Ex:

 Students are restricted to view the financial details of the


university.

22
7. DATA ABSTRACTION

 Physical level: The lowest level of abstraction


describes how a data is stored.

 Logical level: The next higher level describes what


data are stored in database, and the relationships among
the data.

 View level: application programs hide details of data


types. Views can also hide information (such as an
employee’s salary) for security purposes.
23
7.1 VIEW OF DATA

24
7.2 UNIVERSITY DATABASE EXAMPLE

 Department, with fields dept_name, building

 Course, with fields course_id, dept_name,

 Student, with fields id, name, dept_name

25
 At the physical level, department, course or student
records can be stored as a block of consecutive storage
locations, compiler hides this level to the programmers.
 Database administrators may be aware of certain details of
physical organization.
 At the logical level, records described as type definitions

Type:student=record
id:char(7);
name:char(20);
dept_name: char(10);
end;
 At the View Level, all the required data can be retrieved
with restriction also.
26

You might also like