Introduction HNDIT 11052 DBMS 1. Database Management Systems Module code HNDIT 11052 Module title...

31
Introduction HNDIT 11052 DBMS 1

Transcript of Introduction HNDIT 11052 DBMS 1. Database Management Systems Module code HNDIT 11052 Module title...

Page 1: Introduction HNDIT 11052 DBMS 1. Database Management Systems Module code HNDIT 11052 Module title Database Management Systems Credits2HoursLectures15.

1

Introduction

HNDIT 11052 DBMS

Page 2: Introduction HNDIT 11052 DBMS 1. Database Management Systems Module code HNDIT 11052 Module title Database Management Systems Credits2HoursLectures15.

2

Database Management Systems

Database Management Systems

Module code

HNDIT 11052

Module title

Database Management Systems

Credits 2 Hours Lectures 15GPA Practical 45Semester 1 Module

type Common module

Page 3: Introduction HNDIT 11052 DBMS 1. Database Management Systems Module code HNDIT 11052 Module title Database Management Systems Credits2HoursLectures15.

3

Aim & objective

• Build up essential skills required in planning, organizing, storage, retrieval of information in computer systems and skills required for managing / administrating small and mid range database systems.

Page 4: Introduction HNDIT 11052 DBMS 1. Database Management Systems Module code HNDIT 11052 Module title Database Management Systems Credits2HoursLectures15.

4

Learning Outcomes

At the end of the module the student will be able to: • Describe the fundamental concepts in databases and

data processing• Analyze and systematically represent relationships in

data records and perform data modeling• Create, populate and manage relational databases in

system• Use query languages to populate, update and retrieve

data from databases• Implement basic security in database systems

Page 5: Introduction HNDIT 11052 DBMS 1. Database Management Systems Module code HNDIT 11052 Module title Database Management Systems Credits2HoursLectures15.

5

Outline Syllabus

• An introduction to data processing and databases • Database management systems• Data analysis and Data modeling (ER diagrams and

conceptual modeling)• Relational models and normalizations• Creating databases using GUI tools• Query Languages (Standard Query language)• Introduction to database security simple report

creations.

Page 6: Introduction HNDIT 11052 DBMS 1. Database Management Systems Module code HNDIT 11052 Module title Database Management Systems Credits2HoursLectures15.

6

Assessment & Weighting

• In class assignments and tutorials 25% • Simple database design 25% • End of semester examination Structured

examination paper 50%

Page 7: Introduction HNDIT 11052 DBMS 1. Database Management Systems Module code HNDIT 11052 Module title Database Management Systems Credits2HoursLectures15.

7

Why DBMS?• Suppose we need to develop a Information

system.• How do we

- store the data? (use file structures…)- query the data? (write programs…)- Update data safely? (write more programs…)- provide different views on the same data?

(staff & students diffrent) ( prog…)- deal with crashes? (prog…)

• DBMS helps to above activities.

Page 8: Introduction HNDIT 11052 DBMS 1. Database Management Systems Module code HNDIT 11052 Module title Database Management Systems Credits2HoursLectures15.

8

File based system

• Manual file Processing (paper based)– Time Consuming– Does not support large volumes of data

• File based Processing

• Database Management system

Page 9: Introduction HNDIT 11052 DBMS 1. Database Management Systems Module code HNDIT 11052 Module title Database Management Systems Credits2HoursLectures15.

9

Library System Files

File Based Processing

Data Entry

File Processing

Data Entry

File Processing

ID 001Name meryAddress colomboTelNo 747374

Marks34

ID 001Name meryAddress colomboTelNo 747374Books-bor 6

Student System Files

Data Duplication

Page 10: Introduction HNDIT 11052 DBMS 1. Database Management Systems Module code HNDIT 11052 Module title Database Management Systems Credits2HoursLectures15.

10

Library System Files

File Based Processing

Data Entry

File Processing

Data Entry

File Processing

ID 001Name meryAddress colomboTelNo 747374

Marks34

ID 001Name meryAddress colomboTelNo 747374Books-bor 6

Student System Files

Change request

Page 11: Introduction HNDIT 11052 DBMS 1. Database Management Systems Module code HNDIT 11052 Module title Database Management Systems Credits2HoursLectures15.

11

Library System Files

File Based Processing

Data Entry

File Processing

Data Entry

File Processing

ID 001Name mery

Address KandyTelNo 747374

Marks34

ID 001Name meryAddress colomboTelNo 747374Books-bor 6

Student System Files

Inconsistent Data

Address Change request

Page 12: Introduction HNDIT 11052 DBMS 1. Database Management Systems Module code HNDIT 11052 Module title Database Management Systems Credits2HoursLectures15.

12

Problem in file based system

• Inconsistent data• Data duplication• Security• Inflexibility• Limited data sharing• Excessive program maintenance

• How do we resolve these problems?

Page 13: Introduction HNDIT 11052 DBMS 1. Database Management Systems Module code HNDIT 11052 Module title Database Management Systems Credits2HoursLectures15.

13

Solution is DBMS

• DBMS is solution to rectify file based processing problems

Page 14: Introduction HNDIT 11052 DBMS 1. Database Management Systems Module code HNDIT 11052 Module title Database Management Systems Credits2HoursLectures15.

Data Entry & Reports

Data Entry & Reports

DBMSStudents

Library

ApplicationPrograms

App. Programs

Database

Database Processing

stno Name address001 mery colombo …………….

Change Request

Page 15: Introduction HNDIT 11052 DBMS 1. Database Management Systems Module code HNDIT 11052 Module title Database Management Systems Credits2HoursLectures15.

Data Entry & Reports

Data Entry & Reports

DBMSStudents

Library

ApplicationPrograms

App. Programs

Database

Database Processing

stno Name address001 mery Kandy

…………….

Change Request

Page 16: Introduction HNDIT 11052 DBMS 1. Database Management Systems Module code HNDIT 11052 Module title Database Management Systems Credits2HoursLectures15.

16

DATABASE

DEFINITION• A shared collection of logically related data

designed to meet the information requirements of an organisation.

Page 17: Introduction HNDIT 11052 DBMS 1. Database Management Systems Module code HNDIT 11052 Module title Database Management Systems Credits2HoursLectures15.

17

Database Management System (DBMS)

• A software system that enables users to define, create and maintain the database and which provides controlled access to the database.

Page 18: Introduction HNDIT 11052 DBMS 1. Database Management Systems Module code HNDIT 11052 Module title Database Management Systems Credits2HoursLectures15.

18

History of Database Systems• 1950s and early 1960s:

– Data processing using magnetic tapes for storage• Tapes provide only sequential access

– Punched cards for input• Late 1960s and 1970s:

– Hard disks allow direct access to data– Network and hierarchical data models in widespread use– Ted Codd defines the relational data model

• Would win the ACM Turing Award for this work• IBM Research begins System R prototype• UC Berkeley begins Ingres prototype

– High-performance (for the era) transaction processing

Page 19: Introduction HNDIT 11052 DBMS 1. Database Management Systems Module code HNDIT 11052 Module title Database Management Systems Credits2HoursLectures15.

19

History (cont.)• 1980s:

– Research relational prototypes evolve into commercial systems• SQL becomes industry standard

– Parallel and distributed database systems– Object-oriented database systems

• 1990s:– Large decision support and data-mining applications– Large multi-terabyte data warehouses– Emergence of Web commerce

• 2000s:– XML and XQuery standards– Automated database administration– Increasing use of highly parallel database systems– Web-scale distributed data storage systems

Page 20: Introduction HNDIT 11052 DBMS 1. Database Management Systems Module code HNDIT 11052 Module title Database Management Systems Credits2HoursLectures15.

20

Database modelsEarly Types of DBMS

– Hierarchical– Network

Current Generation– Relational

Advanced Systems- Object Based

Page 21: Introduction HNDIT 11052 DBMS 1. Database Management Systems Module code HNDIT 11052 Module title Database Management Systems Credits2HoursLectures15.

21

What is a Database System?

Database System = Database + DBMS• A Database is

– A large, integrated collection of data– Models (represents) a real-world enterprise.

Entities (e.g., students, courses)Relationships (e.g., Mary takes CS123)

• A Database Management System (DBMS) is– A software package designed to store and– Manages databases easily and efficiently.

Page 22: Introduction HNDIT 11052 DBMS 1. Database Management Systems Module code HNDIT 11052 Module title Database Management Systems Credits2HoursLectures15.

22

Common Uses of Databases

• Try to think why each of these need to use a database:– Supermarkets– Insurance– Credit Cards/Banking– Libraries– Travel Agents– Universities

Page 23: Introduction HNDIT 11052 DBMS 1. Database Management Systems Module code HNDIT 11052 Module title Database Management Systems Credits2HoursLectures15.

23

Examples: DBMS • MSAccess • MySQL – freeware (Windows & Unix) • McKoi – freeware, Java based. • Oracle • SQL Server – Microsoft product – we use in this course• Any other ?

• Common features:– Relational model– SQL as query language– Server-client architecture

Page 24: Introduction HNDIT 11052 DBMS 1. Database Management Systems Module code HNDIT 11052 Module title Database Management Systems Credits2HoursLectures15.

24

Advantages of using a DBMS

Minimal data redundancy Efficient data access Data integrity and security Data administration Concurrent access, recovery from crashes Reduced application development time

Page 25: Introduction HNDIT 11052 DBMS 1. Database Management Systems Module code HNDIT 11052 Module title Database Management Systems Credits2HoursLectures15.

25

Disadvantages

Complexity Additional Hardware costs Experts – Specialised personnel Higher impact of failure• Simple applications may not need DBMS at all

Page 26: Introduction HNDIT 11052 DBMS 1. Database Management Systems Module code HNDIT 11052 Module title Database Management Systems Credits2HoursLectures15.

26

Main Characteristics of the Database Approach

• Self-describing nature of a database system: • A DBMS catalog stores the description of the database.

– called meta-data). – allows the DBMS software to work with different databases.

Database

Raw data Meta data

Systems Catalog

Page 27: Introduction HNDIT 11052 DBMS 1. Database Management Systems Module code HNDIT 11052 Module title Database Management Systems Credits2HoursLectures15.

27

Main Characteristics of the Database Approach

• Insulation between programs and data: Called program-data independence.

• Allows changing data storage structures and operations without having to change the DBMS access programs.

Page 28: Introduction HNDIT 11052 DBMS 1. Database Management Systems Module code HNDIT 11052 Module title Database Management Systems Credits2HoursLectures15.

28

Data independence Application programs are independent of data

representation and storage details. The structure of data files is stored in the DBMS catalog

separately from the access programs.

E.g. a file access program may be written in such a way that it can access only STUDENT records of the structure.

First Year SLIIT-2006 28

Page 29: Introduction HNDIT 11052 DBMS 1. Database Management Systems Module code HNDIT 11052 Module title Database Management Systems Credits2HoursLectures15.

29

Main Characteristics of the Database Approach

• Data Abstraction: A data model is used to hide storage details and present the users with a conceptual view of the database.

Page 30: Introduction HNDIT 11052 DBMS 1. Database Management Systems Module code HNDIT 11052 Module title Database Management Systems Credits2HoursLectures15.

Main Characteristics of the Database Approach

• Support of multiple views of the data: Each user may see a different view of the database, which describes only the data of interest to that user.

stno name gpa program regDate payment

100 Mira 3.8 BSc. IT 2005 - JAN Full

200 Janet 2.5 BSc IS 2004- JAN Half

300 Ravi 2.7 M.Sc IT 2006- JAN Full

stno name gpa

100 Mira 3.8

200 Janet 2.5

300 Ravi 2.7

stno regDate pay

100 2005 - JAN Full

200 2004- JAN Half

300 2006- JAN FullLecturer view

Administrative staff view

Page 31: Introduction HNDIT 11052 DBMS 1. Database Management Systems Module code HNDIT 11052 Module title Database Management Systems Credits2HoursLectures15.

31

Questions?