l1_wk1

31
Database Management Systems (DBMS) Abdallah Seleman Siphy Dept of Computer Science FCISM The Institute of Finance Management •11 April 2011 •ASS(CS, IFM) DBMS •1

Upload: eenocklwega

Post on 25-Aug-2014

157 views

Category:

Documents


0 download

TRANSCRIPT

Database Management Systems (DBMS)Abdallah Seleman Siphy

Dept of Computer Science FCISMThe Institute of Finance Management

11 April 2011

ASS(CS, IFM)

DBMS

1

Course Co-ordinatorAbdallah S. Siphy [email protected] Block D,023 Consultation Hour Mondays 10 am Or By appointment11 April 2011 ASS(CS, IFM) DBMS 2

An Integrated of : Introduction Fundamentals of database File/Data Processing

Database Management Systems (DBMS) Goals and advantages Database system architecture Relational Database Management Systems (RDBMS) Introduction to ERM

Relational Modelin year 2) Conceptual Database Design Implementation of a Relational Database using a RDBMS ( you will gain a good experience on Ms Access database or any 11 April 2011) ASS(CS, IFM) DBMS Relational Algebra (may not be taught, you will be taught

3

An Integrated of :- ..File systems Sequential and indexed sequential Organization Hashing static and dynamic hashing B+ -trees External Merge Sorting

Advanced Concepts New Database Models Deductive Databases, Object-Oriented Databases, etc,

(subject to availability of time)

11 April 2011

ASS(CS, IFM)

DBMS

4

Recommended ReadingsLeon, A. and Leon,M (2002) Database

Management Systems,Dar es Salaam University Press Narang, Rajesh (2004) Database Management Systems, New Delhi David Kroenke (2002), Database Processing: Fundamentals, Design and Implementation, 8th Edition, Prentice Hall, Upper Saddle River NJ Thomas M. Connolly and Carolyn E. Begg (2002), Database Systems: A Practical Approach to Design, Implementation, and Management, 3rd Edition, Addison-Wesley, Harlow England. Note, Additional Readings shall be provided if necessary.11 April 2011 ASS(CS, IFM) DBMS 5

Fundamentals of Database

File/ data Processing

11 April 2011

ASS(CS, IFM)

DBMS

6

AssessmentYou will be assessed

through continuous assessments (Coursework) that comprise of two compulsory Tests, Lab test/s and assignments

CourseWork carries

40% Final Examination carries 60%

11 April 2011

ASS(CS, IFM)

DBMS

7

Fundamentals of DatabaseComputer uses databases by using a set of well

defined rules. Example, Assume that each card in the mailbox has five lines of data items, namely as: Name, Locality, City, State and Pin_Code These fields combined to form a record. Generally, A database contains the following.

Field Record File Database Key Field

11 April 2011

ASS(CS, IFM)

DBMS

8

Fundamentals of Database.Fields Or Data ItemsName Locality City State Pin_Code

RecordAbdallah 9Beveridge Street Manchester UK 999 999

Field Name

Record # 9 . 9 . 9 . 9 .

Name Abdallah Gauravaz Deepak Fazal

Locality 9 Beveridge Street 9 /B Mohan Garden 9 WZ- 9 Palam Vihar 9 999 . Pankha Rd

City Manchester Mombai Leeds New Delhi

State UK MH UK ND

Pin_Code 999 999 999999 999999 999999 Record (9 th) Record (9 st)

Figure 1 Illustrates the concepts of Fields, Records, and FilesField |Contents

11 April 2011

ASS(CS, IFM)

DBMS

9

Fundamentals of Database.FieldThe smallest piece of meaningful information in

a file is called a data item or Field. A data item is generally used for a group of alphanumeric characters. Example, Name, Locality, City, State, Pin_Code are all known as Data Items or Fields as shown in figure 1

11 April 2011

ASS(CS, IFM)

DBMS

10

Fundamentals of Database.RecordCollection of related fields Example, Figure 1 contains four records and

each record has five related fields namely as

Name, Locality, City, State and Pin_Code

FileIs the Collection of all related records. Example, in figure 1, the file contains the list of

addresses of four records.

11 April 2011

ASS(CS, IFM)

DBMS

11

Fundamentals of Database.Field 9 Fields Emp_Code Field 9 Address Field 9 Emp_Code Field 9 Salary Field 9 Emp_Code Field 9 Name

Relating Key Fields

Records Contain Related Fields

Records of 9 9 9 Employees ------

Records of 9 9 9 Employees ------

Records of 9 9 9 Employees ------

Files Contain Related Records

File 9 Contains 1 1Records of Empl. 1

File 9 Contains 9 9Records of Empl. 9

File 9 Contains 9 9Records of Empl. 9

File 9 File 9 File 9 Figure 2 illustrates the concepts of Fields, Records, Files and Database

Database Contain Related Files

11 April 2011

ASS(CS, IFM)

DBMS

12

Fundamentals of Database.DatabaseDatabase is a collection of related files. A database is an organised collection of facts Is a Collection of information arranged and

presented to serve an assigned purpose ExamplesA dictionary, where words are arranged alphabetically Telephone directory where subscriber names are listed in alphabetic order. Figure 2 shows Employees Database having related files containing records of employees11 April 2011 ASS(CS, IFM) DBMS 13

Fundamentals of Database.Key Field The Keyfield in a record is a unique data item

which is used to identify the record for the purpose of accessing and manipulating database In figure 2,File 1 contains employee records with fields Emp_Code and Address, File 2 contains employee records with fields Emp_Code and Salary File 3 contains employee records with fields Emp_Code and Name All the three files have one common field, namely Emp_Code, this field is called the Keyfield Is used for identifying and relating records11 April 2011 ASS(CS, IFM) DBMS 14

File ProcessingData, Information, KnowledgeDATA

INFORMATION

KNOWLEDGE

INFERENCES FORECASTS DECISIONS

11 April 2011

ASS(CS, IFM)

DBMS

15

File Processing.Data Are raw facts which can be manipulated Data is required in the operation of any organisation and

the same or similar data may be required for various purposes

Informationsummarization of data in presentable form Data consists of facts which become information when they are processed and convey meaning to people. Information is the backbone of any organisation Information is the critical factor that enables managers and organisations to gain a competitive advantage. It can be considered as the most critical resource of an organisation. 11 April 2011 ASS(CS, IFM) 16 DBMS The manipulation of data, simply information is

File Processing.Information..It is the indispensable link that ties together all

the components of an organisation for better operation and coordination and for survival in todays brutally competitive environment.

Definition,Information is data that have been put into a meaningful and useful context and communicated to a recipient who uses it to make decision (Burch & Grudnitski,1989)

11 April 2011

ASS(CS, IFM)

DBMS

17

File Processing.Information.It involves the communication and recipient of

intelligence or knowledge It should predict the future with reasonable level of accuracy It should help the managers make the best decision and a prevent them from taking wrong decision It consists of data , images , text , documents and voice often inextricably intertwined but always organised in a meaningful context.11 April 2011 ASS(CS, IFM) DBMS 18

File Processing.Information..Notice that the data that is being processed or

refined can be input, stored or both and this formulates the cycle of information, refer figure 3. Example, If orders and payments are data, then balance_due and quantity_in_hand would be the information

Knowledgerules used by a computer program in order to operate intelligently. It refers to a persons capability and wisdom as how much that person knows about one 11 April 2011 particular ASS(CS, IFM) subject DBMSRefers to as the facts , events and inference

19

File Processing.Input (Data) Process (Models) Output (Information)

Data Captured

Database

Results

Action

Decision

Figure 3, Information Cycle11 April 2011 ASS(CS, IFM) DBMS 20

File Processing.Information Processing Information processing is the acquisition, storage, organisation retrieval, display and dissemination of information Quality information means that the information that is Accurate Timely Relevant

11 April 2011

ASS(CS, IFM)

DBMS

21

File Processing.Files, File organisation and Management File A file is a collection of bytes stored as an individual entity All data on disk is stored as a file with an assigned file name that is unique within the directory it resides it. To the computer, a file is the series of bytes The structure of a file is known to the software that manipulate it.

11 April 2011

ASS(CS, IFM)

DBMS

22

File Processing.File..It contains data that is needed for information

processing These data is called entities, An entity is anything about which information can be stored, examples, physical object, a person, concept or event and so on An attribute is a characteristic of interest about an entity.

11 April 2011

ASS(CS, IFM)

DBMS

23

File Processing.File..The values of the attributes describe a particular

entity. An Instance of the entity is represented by a set of specific values for each of the attributesExamples, Entity a car Attributes (car) Make, Model, Price, Eng. Capacity Instances (car) Mercedes-Benz, E270, 12,000, 2686cc

11 April 2011

ASS(CS, IFM)

DBMS

24

File Processing.File..In data storage, data items are usually grouped

together to describe an entity

There are different types of files, Master files Transaction files Report files

11 April 2011

ASS(CS, IFM)

DBMS

25

File Processing.Master files A file of relatively permanent information about entities These files are used as a source of reference data for processing transactions and accumulated information based on the transaction data. Example, the accounts master file in a bank will contain details like account name, balance, address and so on

11 April 2011

ASS(CS, IFM)

DBMS

26

File Processing.Transaction Files A collection of records describing activities or transactions by organisation. Created as a result of transactions and preparing transaction documents Are used to update the details in the master file Example in the same bank system, the day-today activities like money withdrawals, deposits and transfers.

11 April 2011

ASS(CS, IFM)

DBMS

27

File Processing.Report Files A file created by extracting data to prepare a report Example, All accounts sorted by account number containing the details like account name, balance and so on

11 April 2011

ASS(CS, IFM)

DBMS

28

File Processing.Operations on Files There are mainly two kinds of file operationsRetrieval and Update operations

Retrieval operations do not change the contents

of the file thus it only locates records in the file matching certain specific criteria Update operations change the contents of the file by modifying the records, deleting (delete) the records and inserting (Insert) new records

11 April 2011

ASS(CS, IFM)

DBMS

29

File Processing.Operations on Files The following five operations are required for the processing of records in filesFile creation Records location Record creation Record deletion Record modification

11 April 2011

ASS(CS, IFM)

DBMS

30

File Processing.File Organisation A technique for physically arranging the records of a file on secondary storage devices Factors necessary to be considered when choosing the file organisationSpeed of data retrieval Speed of processing data Speed of update operations Storage space Security

11 April 2011

ASS(CS, IFM)

DBMS

31