database management system ccps1533 dr. abdulsamad ebrahim

28
Database Management System CCPS1533 Dr. Abdulsamad Ebrahim

Upload: reynold-ramsey

Post on 01-Jan-2016

226 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Database Management System CCPS1533 Dr. Abdulsamad Ebrahim

Database Management System

CCPS1533

Dr. Abdulsamad Ebrahim

Page 2: Database Management System CCPS1533 Dr. Abdulsamad Ebrahim

Lecture 1

Introduction to Database Management

Page 3: Database Management System CCPS1533 Dr. Abdulsamad Ebrahim

Learning Outcomes• Grasp the definition of a database.• Get introduced to the main building blocks for a database.• Understand the requirements of database applications• Understand and explain basic database characteristics. • Appreciate how databases can be categorized based on size.

Page 4: Database Management System CCPS1533 Dr. Abdulsamad Ebrahim

Terminology

• Data Information to be manipulated,

stored, combined, analysed etc.

• Database A collection of related information

stored in a structured format

• DBMS Database management system. A programs which lets you manage information in databases

Page 5: Database Management System CCPS1533 Dr. Abdulsamad Ebrahim

• Table A single store of related information.

• A table consists of records, and each record is made up of a number of fields

- Field Elementary piece of data

- Record Set of fields

Page 6: Database Management System CCPS1533 Dr. Abdulsamad Ebrahim

Database DefinitionA database is an environment for:

• Storing a large amount of information in a structured way

• And allowing the rapid retrieval and update of information and the combination of data in complex ways

This environment must be coherent, reliable and secure

Page 7: Database Management System CCPS1533 Dr. Abdulsamad Ebrahim

Examples of database applications

• Booking systems • Bank clients management,• Backend storage for an e-commerce web site, • Books and readers management in a library

Page 8: Database Management System CCPS1533 Dr. Abdulsamad Ebrahim

Main building blocks for a traditional database

• A field is the smallest granularity of information,

• A record is set of fields combining a number of data items possibly of different types ,

• A file is a collection of records.

Page 9: Database Management System CCPS1533 Dr. Abdulsamad Ebrahim

Database example • A library in the real physical world contains books borrowed

by readers.

• A database supporting a library could logically maintain the data related to a library as follows:

Page 10: Database Management System CCPS1533 Dr. Abdulsamad Ebrahim

• A library file which is composed of a collection of:

- book

- reader and

- borrowing records

Page 11: Database Management System CCPS1533 Dr. Abdulsamad Ebrahim

• Each book in the library can be represented in the database as a:

book record

• which could be composed of the following fields:

title

authors

publisher and

publication date.

Page 12: Database Management System CCPS1533 Dr. Abdulsamad Ebrahim

Book records in a library database

Book identifier Title Authors Publisher Publication date

1 A Tale of Two Cities

Charles Dickens London: Chapman & Hall

1859

2 For Whom the Bell Tolls

Ernest Hemingway

Charles Scribner's Sons

1940

Page 13: Database Management System CCPS1533 Dr. Abdulsamad Ebrahim

Reader record• Each reader who is a member of the library can be represented

by a: reader record

which contains the following fields:

first name

last name

address

subscription date.

Page 14: Database Management System CCPS1533 Dr. Abdulsamad Ebrahim

Reader records in a library database

Reader identifier

Firs tname Last name Address subscription date

1 John Seaman 50 Dover Street, London

11/11/03

2 Barbara James 22 Northbourne Road, London

06/07/99

Page 15: Database Management System CCPS1533 Dr. Abdulsamad Ebrahim

Borrowing records

• Library borrowing can be represented by:

borrowing records

each of which can be composed of book :

identifier,

reader identifier,

start date and

end date.

Page 16: Database Management System CCPS1533 Dr. Abdulsamad Ebrahim

Borrowing records in a library database

Borrowing identifier

Book identifier Reader identifier Start date End date

1 2 2 07/09/10 11/12/10

2 1 1 01/06/10 07/08/10

Page 17: Database Management System CCPS1533 Dr. Abdulsamad Ebrahim

Database Application Requirements

1- Presentation Requirement

• A graphical standard should be used to visualize the database irrespective of the underlying computing technology used to support the database.

 

Page 18: Database Management System CCPS1533 Dr. Abdulsamad Ebrahim

• Example: consider a Library database which has book, author and reader entities.

• It includes borrow and write actions.

• Such database can be graphically modeled as shown in flowing Figure

Page 19: Database Management System CCPS1533 Dr. Abdulsamad Ebrahim

2- Data Creation/Modification Requirements

• Inserting new data to the database (e.g. inserting new books, new readers, registering borrowing, etc.)

• To be able to modify and eventually deleting a set of data (e.g. modifying the address of a reader, deleting a reader or a book)

Page 20: Database Management System CCPS1533 Dr. Abdulsamad Ebrahim

3- Interrogation Requirements

• An application should be able to query a database to:

- Retrieve data that meets certain conditions.

Page 21: Database Management System CCPS1533 Dr. Abdulsamad Ebrahim

Examples of an application queries to a library database could be:

• Information on every book in the database which has been borrowed only by one reader.

• Information on readers with subscription date before

01/01/2000

• Information on a book written by Osama Ahmad and borrowed by Khalid Jamal.

Page 22: Database Management System CCPS1533 Dr. Abdulsamad Ebrahim

4. Accuracy / Consistency Requirements

• A database system must guarantee that data inserted and manipulated by an application are kept accurate and consistent without errors. For example:

• A book copy can never be borrowed by two readers at the same time.

• The start date of borrowing must be before the end date

Page 23: Database Management System CCPS1533 Dr. Abdulsamad Ebrahim

Database Characteristics

A number of main characteristics must be commonly found in any database which include:

• A database is an integrated structure with semantic links between its entities. Integrity constraints must be met while data is manipulated to ensure data accuracy and consistency. Security constraints must exist to manage database access.

.

Page 24: Database Management System CCPS1533 Dr. Abdulsamad Ebrahim

• Supporting data manipulation operations including data insertion, deletion, updating and searching. Data insertion and update must be coherent, shared, reliable and secure

Page 25: Database Management System CCPS1533 Dr. Abdulsamad Ebrahim

Database Sizes• Databases can be classified according to their size:

• Personal Database: this type of database is small in size and usually used by a single user. It is usually installed on a PC. The size of such database is 100KB- 100MB.

• Typical Professional Database: generally used by SMEs (Small

to Medium Enterprises). Their size varies between 100MB and 1TB.

• Very Large Database (VLDB): The size of such database usually exceeds 1 TB.

Page 26: Database Management System CCPS1533 Dr. Abdulsamad Ebrahim

Summary

• The definition of database notion.• The requirements of database applications. • The basic characteristics of a database.• Database types based on size.

 

Page 27: Database Management System CCPS1533 Dr. Abdulsamad Ebrahim

Exercises

• What are the requirements of database applications

• Explain how fields, records and files are building blocks of a database system.

• What is the size of a typical VLDB database

Page 28: Database Management System CCPS1533 Dr. Abdulsamad Ebrahim

Thank You