Presentation is loading. Please wait.

Presentation is loading. Please wait.

Database Design concepts INFO 1408 Lecture 3 What is a database?

Similar presentations


Presentation on theme: "Database Design concepts INFO 1408 Lecture 3 What is a database?"— Presentation transcript:

1 Database Design concepts INFO 1408 Lecture 3 What is a database?

2 Objectives Introduce the three layers of data abstraction Introduce the terms physical and Logical data independence

3 Towards a definition ……… Take a moment or two to think about how you would define a database. Write down the key words you would use. Describe a database to your neighbour

4 A typical domestic ‘ database ’ Is this Organised? Efficient? Easily accessible? Flexible? …… good for much other than keeping things off the floor?

5 Paper based databases Have been around for a long time Data is organised and quickly accessible So is easier to maintain – fewer errors But is not all that flexible – things are filed in one place only (why would it not be a good idea to have duplicates)

6 A working definition A collection of data items that are treated as a unit – Andy Oppel

7 Are managed by a We will explore some features of a DBMS …….. Layers of data abstraction Physical data independence Logical data independence Computer based Databases

8 Some important features of a DBMS Moves data to and from physical data files Manages multiple users Manages transactions as an ‘ all or nothing ’ unit of work Supports a Query Language to retrieve data from the database Manages back ups Provides Security mechanisms

9 Layers of Data abstraction Allows us to consider User views of the data – which can be different for each user. More about this later in the term This is achieved by thinking of 3 Layers of abstraction

10 External layer Logical layer Physical layer What the user How the database the data for viewing How the computer’s operating system the data

11 Database File Database File Database File Database File Database File Internal Schema User View 1 User View 2 User View …. External layer Logical layer Physical layer Physical Data independence Logical Data independence

12 The Physical layer The data files that actually contain the data Data could be stored over multiple disc drives – by running in parallel (Microsoft is an exception in that everything is stored in one file – this limits the number of concurrent users, this is why it is not used for large enterprises.) The DBMS works with the computer ’ s Operating system (OS) to manage the file storage. The user of the database does not need to know how the DBMS does this. They just ask for the information and the DBMS supplies it. A little like you ordering a meal at a restaurant, it just arrives- you don ’ t know how it was cooked or what the ingredients are.

13 Database File Database File Database File Database File Database File Internal Schema User View 1 User View 2 User View …. External layer Logical layer Physical layer Physical Data independence Logical Data independence

14 Logical Layer The logical layer transforms the physical data into a common This structure is the one that the designer would recognise. It covers all the data requirements of all the users. This is what we will be working on when we start to design databases later on. This ‘ abstracted ’ format is known as a Depending on the DBMS data could be formatted as 2 dimensional tables or a hierarchical structure (similar to an organisation chart)

15 Database File Database File Database File Database File Database File Internal Schema User View 1 User View 2 User View …. External layer Logical layer Physical layer Physical Data independence Logical Data independence

16 External Layer This is the layer where users with the database and issue queries The DBMS handles the transformation of selected items from the data structures in the logical layer to form each user view These user views can be stored for future use, or may be used only temporarily and then discarded – an query.

17 When we start to create a database we need to look at each user requirements- These requirements will give us all of the views required Using some methods ( that we will learn) we can create the Internal schema which will organise the data so all user requirements can be met.

18 Database File Database File Database File Database File Database File Internal Schema User View 1 User View 2 User View …. External layer Logical layer Physical layer Physical Data independence Logical Data independence

19 Physical Data Independence There can be differing degrees of independence Prior to systems having data independence any change to the way data was stored would require a change to every computer program that used the data – time consuming and expensive

20 Database File Database File Database File Database File Database File Internal Schema User View 1 User View 2 User View …. External layer Logical layer Physical layer Physical Data independence Logical Data independence

21 Logical Data Independence The ability to make changes to the logical layer without disrupting existing users and processes Activities such as: Adding a new database object Adding data items to an existing object

22 What key words would you now use to describe a database to a colleague? Take a moment to jot down the key words

23 Does your definition include words such as.. efficient organised flexible consistent maintainable data accessible Reliable Error free Robust secure

24 Summary We have covered the three levels of abstraction Physical and logical data independence.

25 References Databases Demystified by Andy Oppel (Published By McGraw-Hill, ISBN 0-07- 225364-9) Data Analysis for database Design by David Howe (published by Arnold Second edition.)


Download ppt "Database Design concepts INFO 1408 Lecture 3 What is a database?"

Similar presentations


Ads by Google