1 Information Retrieval and Use Data Analysis & Data Modeling, Relational Data Analysis and Logical Data Modeling Geoff Leese September 2009.

Slides:



Advertisements
Similar presentations
Normalisation.
Advertisements

BUSINESS DRIVEN TECHNOLOGY Plug-In T4 Designing Database Applications.
RJP/RDA 1 /93 Relational Data Analysis (RDA) RDA organises all the system’s data items into a set of well NORMALISED relations. These should avoid: 1.
Relational Database Systems Higher Information Systems.
Normalisation Ensuring data integrity in database design 1.
Modeling the Data: Conceptual and Logical Data Modeling
Normalisation “A formal technique for analysing relations based on their primary key and functional dependencies.” [Codd]. Process – Analyse each relation.
Relational Data Analysis Learning outcomes  understand the process of normalisation;  perform Relational Data Analysis;  recognise the importance of.
Entity-Relationship Model and Diagrams (continued)
Normalisation up to 1NF Bottom-up Approach to Data Modelling.
1 © Prentice Hall, 2002 Chapter 5: Logical Database Design and the Relational Model Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B.
Database Fundamentals Lecture 5. The Design Process continued.
1 NORMALISATION. 2 Introduction Overview Objectives Intro. to Subject Why we normalise 1, 2 & 3 NF Normalisation Process Example Summary.
Database Design Concepts Info 1408 Lecture 2 An Introduction to Data Storage.
1 An Introduction to Relational Data Analysis (Normalisation)
Database Design Concepts INFO1408 Term 2 week 1 Data validation and Referential integrity.
Project and Data Management Software
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 5 Normalization of Database Tables.
LOGICAL DATABASE DESIGN
Entity/Relationship Modelling
APPENDIX C DESIGNING DATABASES
Michael F. Price College of Business Chapter 6: Logical database design and the relational model.
Page 1 ISMT E-120 Introduction to Microsoft Access & Relational Databases The Influence of Software and Hardware Technologies on Business Productivity.
Page 1 ISMT E-120 Desktop Applications for Managers Introduction to Microsoft Access.
Module Title? DBMS E-R Model to Relational Model.
DATA MODELLING TOOLS FOR ORGANISING DATABASES. For a database to be organised and logical, it must be well-designed and set out. In such cases, the databases.
Modelling Techniques - Normalisation Description and exemplification of normalisation.Description and exemplification of normalisation. Creation of un-normalised.
CREATE THE DIFFERENCE Normalisation (special thanks to Janet Francis for this presentation)
Section 11 : Normalisation
Concepts and Terminology Introduction to Database.
Relational databases and third normal form As always click on speaker notes under view when executing to get more information!
Richard Merritt1 Data Modelling Entities, Attributes and Relationships.
Normalisation Mia’s Sandwich Shop The Process Explained.
Module III: The Normal Forms. Edgar F. Codd first proposed the process of normalization and what came to be known as the 1st normal form. The database.
Concepts of Relational Databases. Fundamental Concepts Relational data model – A data model representing data in the form of tables Relations – A 2-dimensional.
Database Design (Normalizations) DCO11310 Database Systems and Design By Rose Chang.
University of Sunderland COMM2Q Unit 2 COMM2Q Lecture 2 HIS Application Building.
Copyright Ó Oracle Corporation, All rights reserved. Normalization Use the student note section below for further explanation of the slide content.Use.
Normalisation Rules and Practical Application Geoff Leese January 2010.
CORE 2: Information systems and Databases NORMALISING DATABASES.
Copyright 2008 McGraw-Hill Ryerson 1 TECHNOLOGY PLUG-IN T5 DESIGNING DATABASE APPLICATIONS.
McGraw-Hill/Irwin © 2008 The McGraw-Hill Companies, All Rights Reserved Plug-In T5: Designing Database Applications Business Driven Technology.
1 IRU – database design part one Geoff Leese September 2009.
ITN Table Normalization1 ITN 170 MySQL Database Programming Lecture 3 :Database Analysis and Design (III) Normalization.
Database Design Normalisation. Last Session Looked at: –What databases were –Where they are used –How they are used.
Chapter 56 Relational Database Design Compiled by Eddie Moorcroft.
Flat Files Relational Databases
Chapter 10 Designing Databases. Objectives:  Define key database design terms.  Explain the role of database design in the IS development process. 
Data modeling Process. Copyright © CIST 2 Definition What is data modeling? –Identify the real world data that must be stored on the database –Design.
Sample Table Standard Notation Entity name in uppercase
Detailed Data Modeling. Outline Data Modeling Modeling Constructs –Entities –Relationships –Cardinality Model Basic Rules Advanced Rules Prototyping Process.
Databases Database Normalisation. Learning Objectives Design simple relational databases to the third normal form (3NF).
Lecture 4: Logical Database Design and the Relational Model 1.
McGraw-Hill/Irwin Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 6 Modeling the Data: Conceptual and Logical Data Modeling.
1 Information Retrieval and Use De-normalisation and Distributed database systems Geoff Leese September 2008, revised October 2009.
NormalisationNormalisation Normalization is the technique of organizing data elements into records. Normalization is the technique of organizing data elements.
What Is Normalization  In relational database design, the process of organizing data to minimize redundancy  Usually involves dividing a database into.
MS Access. Most A2 projects use MS Access Has sufficient depth to support a significant project. Relational Databases. Fairly easy to develop a good user.
IT 5433 LM3 Relational Data Model. Learning Objectives: List the 5 properties of relations List the properties of a candidate key, primary key and foreign.
Normalisation FORM RULES 1NF 2NF 3NF. What is normalisation of data? The process of Normalisation organises your database to: Reduce or minimise redundant.
Normalisation Worked example for an Order Remember : The data should depend upon the key, the whole key and nothing but the key.
Chapter 4: Logical Database Design and the Relational Model
Chapter 5: Logical Database Design and the Relational Model
Data Modelling Chapter 7
Entity-Relationship Model and Diagrams (continued)
Chapter 4.1 V3.0 Napier University Dr Gordon Russell
IST 318 Database Administration
Normalisation Un-normalised Data (UNF or 0NF) Data Attributes:
Presentation transcript:

1 Information Retrieval and Use Data Analysis & Data Modeling, Relational Data Analysis and Logical Data Modeling Geoff Leese September 2009

2 Relational Data Analysis n Captures the detailed knowledge of the meaning of the data. n Ensures that the data is logically easy to maintain and extend. ä Data inter-dependencies have been identified ä Ambiguities have been resolved. ä Eliminate unnecessary duplication of data. ä Forms the data into optimum groups. ä Validates the Logical Data Model (LDM).

3 Logical Data Modelling n Basic Rules for converting 3NF to a LDM ä Create an entity type for each data relation ä Mark qualifying foreign keys ä Check compound key relations ä Make foreign/primary key relations

4 Guidelines for logical modelling n Entity type names are singular nouns, descriptive, concise and organisation specific. n Attribute names are unique descriptive nouns of standard format. n Relationship names are descriptive, precise verb phrases.

5 Simple Master - Detail relationships n Where a single foreign key of a relation corresponds to the primary key of another relation n See next slide for example.

6 Simple Master - Detail relationships Shows SINGLE primary key at MASTER entity (Organisation) connected to SINGLE foreign key at DETAIL entity (Contact people)

7 Multiple level Master - Detail Relationships n Example: five entities

8 Identifying Recursive (Unary) Relationships n Is a relation where a foreign key references the same relation. n Example: Employee Employee-number Employee-name Employee-manager-number Employee

9 Relationships : Student/Module n At this point we need to identify the data items that describe or identify each entity n Entity attributes are also known as data items n What are the data items associated with the following LDS diagram? Takes StudentModule Is taken by

10 The Student Entity TypeAttribute Name Attribute StudentStudent NameJones Street AddressLeek Road TownStoke-on-Trent Post CodeST4 2DE Telephone Takes StudentModule Is taken by

11 The Module Entity TypeAttribute Type Attribute ModuleModule NumberCM Module NameSSAT Module LeaderA Lecturer Level1 Cats Points10 Takes StudentModule Is taken by student

12 The Data Items Takes StudentModule Is taken by student Module Number Module Name Module Leader Level Cats Points Student Name Street AddressTown Post CodeST4 2DE Telephone

13 Identifying occurrences of entities n Each occurrence of an entity must be uniquely identified in some way n Imagine the British Gas data base that used only surnames to identify account holders n There would be 100,000 account holders called Jones in this country n Even if we used the given names there would still be considerable duplication n It would be impossible to find the right account by name alone

14 Adding a Primary Key Takes StudentModule Is taken by student Module Number Module Name Module Leader Level Cats Points Student Number Student Name Street AddressTown Post CodeST4 2DE Telephone Primary key added

15 Relationships: Getting it right Takes StudentModule Is taken by student Takes StudentModule Is taken by student Is this right? The real situation is surely

16 Putting it right: Intersection entity Student Number Module number StudentModule Module Number Module Name Module Leader Level Cats Points Student Number Student Name Street AddressTown Post CodeST4 2DE Telephone Stud/Mod We need a link entity - less ambiguity

17 Normalisation - steps n Start with a set of un-normalised tables ä Entity/attribute list n Step 1 - remove ambiguity and repeating data n Step 2 - remove shared data

18 Normalisation - step 1 n Break down ALL attributes into smallest meaningful parts ä EG student name becomes student surname, student firstname, student title n Remove REPEATED information to form a new table ä EG a course may be composed of MANY modules (but assume that each module is only on one course!) - so form a MODULE table

19 Normalisation - step 2 n Remove SHARED data to form new tables ä EG modules may share tutors - so form a TUTORS table.

20 Normalisation n FIRST NORMAL FORM - a relation (table) is in 1NF if it contains atomic values and all repeating groups have been removed

21 Normalisation n SECOND NORMAL FORM - a relation(table) is in 2NF if it is in 1NF and every non-key attribute is fully dependent on the primary key

22 Normalisation n THIRD NORMAL FORM - a relation(table) is in 3NF if it is in 2NF and every non-key attribute is not dependent on any other non-key attribute

23 Relational Data Analysis Form n Validates the LDM against the relations. n Consists of: ä Unnormalised Form –attributes ä First Normal Form (1NF) ä Second Normal Form (2NF) ä Third Normal Form (3NF) –Relations –Attributes

24 RDA Form Name Date UNF 1NF 2NF 3NF Result relation attribute attributes

25 Data Dictionary n lists, for every field in every table ä Tablename ä Fieldname ä Field Type ä Field size (if variable) ä Decimal places (if applicable) ä Description (if required) ä Other significant field properties

26 Data Dictionary example

27 The domain n Is the “set” of items, and the definition thereof to which an attribute belongs n Define domain once, saves time when defining attributes belonging to it. n For example - Date of Birth, Course Start Date and Enrolment Date all belong to the DATE domain - data type is date/time, format dd/mm/yyyy, non- unique, non-null.

28 Further reading n Rolland chapters 3 and 4 n Hoffer chapters 10 and 12 n Kendall & Kendall chapter 17