Normalisation Unit 6: Databases. Just to recap  What is an Entity  What is an Attribute?

Slides:



Advertisements
Similar presentations
Relational Database Systems Higher Information Systems Advanced Implementation in Microsoft Access.
Advertisements

Normalisation.
Build a database I: Design tables for a new Access database
Organisation Of Data (1) Database Theory
Relational Database Systems Higher Information Systems Advanced Implementation in Filemaker Pro.
Data Modeling. What are you keeping track of? You begin to develop a database by deciding what you are going to keep track of. Each thing that you are.
Relationships Relational Database. Identifying Entities… In the previous tutorial you learnt about identifying entities in a flat file database. Also.
Normalisation Ensuring data integrity in database design 1.
Table design screen Field name Data type Field size Other properties.
Accounting 6500 Relational Databases: Accounting Applications Introduction to Normalization.
Relational Data Analysis Learning outcomes  understand the process of normalisation;  perform Relational Data Analysis;  recognise the importance of.
1 NORMALISATION. 2 Introduction Overview Objectives Intro. to Subject Why we normalise 1, 2 & 3 NF Normalisation Process Example Summary.
Table design screen Field name Data type Field size Other properties.
Relational Data Analysis II. Plan Introduction Structured Methods –Data Flow Modelling –Data Modelling –Relational Data Analysis Feasibility Maintenance.
Project and Data Management Software
Relational Databases What is a relational database? What would we use one for? What do they look like? How can we describe them? How can you create one?
Page 1 ISMT E-120 Introduction to Microsoft Access & Relational Databases The Influence of Software and Hardware Technologies on Business Productivity.
2.3 Organising Data for Effective Retrieval
The Teacher Computing Database Design CP4 Revision.
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.
WJEC Applied ICT Databases – Terminology and Notation DEFINITION A database is a collection of data or information which is held together in an organised.
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)
DAY 15: ACCESS CHAPTER 2 Larry Reaves October 7,
Database. Basic Definitions Database: A collection of related data. Database Management System (DBMS): A software package/ system to facilitate the creation.
Driving School Database
BUS1MIS Management Information Systems Semester 1, 2012 Access: Creating a Database Week 6 Lecture 2.
Relational databases and third normal form As always click on speaker notes under view when executing to get more information!
University of Manitoba Asper School of Business 3500 DBMS Bob Travica
Microsoft ® Office Access ® 2007 Training Build a database I: Design tables for a new Access database ICT Staff Development presents:
Database Normalization Lynne Weldon July 17, 2000.
CORE 2: Information systems and Databases NORMALISING DATABASES.
DBSYSTEMS Chapter 3 Data Normalization Get data properly tabled! Based on G. Post, DBMS: Designing & Building Business Applications University of Manitoba.
1 What is database 2? What is normalization? What is SQL? What is transaction?
G045 Lecture 09 ERD Diagrams (Entity Relationship Diagrams) Mr C Johnston ICT Teacher
Introduction to Databases Trisha Cummings. What is a database? A database is a tool for collecting and organizing information. Databases can store information.
Copyright © 2005 Ed Lance Fundamentals of Relational Database Design By Ed Lance.
ATADESAB. BATLE CORDER DLEIF Lesson objectives In this lesson you will learn some basic database terms and learn how a database is created.
© Relational Databases. © Entities Data is stored in tables. Each table is concerned with one entity An entity is a.
M1G Introduction to Database Development 2. Creating a Database.
© Copyright 2002, 2005, 2013 L. M. Linson, may be freely used with this notice Practical Database Design “Structuring Your Tables” by Larry Linson, presented.
Entity-Relationship (ER) Modelling ER modelling - Identify entities - Identify relationships - Construct ER diagram - Collect attributes for entities &
INFO1408 Database Design Concepts Week 15: Introduction to Database Management Systems.
M1G Introduction to Database Development 4. Improving the database design.
Handling Many to Many Relationships. 2 Handling Many:Many Relationships Aims: To explain why M:M relationships cannot be implemented in relational database.
ITN Table Normalization1 ITN 170 MySQL Database Programming Lecture 3 :Database Analysis and Design (III) Normalization.
Relational Databases. Relational database  data stored in tables  must put data into the correct tables  define relationship between tables  primary.
Quiz questions. 1 A data structure that is made up of fields and records? Table.
Human Centric Computing (COMP106) Assignment 2 PROPOSAL 23.
Database Design Normalisation. Last Session Looked at: –What databases were –Where they are used –How they are used.
Principles of Database Design, Conclusions MBAA 609 R. Nakatsu.
Lesson 2: Designing a Database and Creating Tables.
Chapter 56 Relational Database Design Compiled by Eddie Moorcroft.
Mr C Johnston ICT Teacher
Data modeling Process. Copyright © CIST 2 Definition What is data modeling? –Identify the real world data that must be stored on the database –Design.
* Database is a group of related objects * Objects can be Tables, Forms, Queries or Reports * All data reside in Tables * A Row in a Table is a record.
Sample Table Standard Notation Entity name in uppercase
Concepts of Database Management Seventh Edition Chapter 4 Keys and Relationship.
Databases Database Normalisation. Learning Objectives Design simple relational databases to the third normal form (3NF).
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.
Year 12 > 13 Applied GCE ICT Unit 7 Using Database Software.
Normalisation FORM RULES 1NF 2NF 3NF. What is normalisation of data? The process of Normalisation organises your database to: Reduce or minimise redundant.
NORMALISATION OF DATABASES. WHAT IS NORMALISATION? Normalisation is used because Databases need to avoid have redundant data, which makes it inefficient.
Relational Databases – Further Study I think we’ve covered all you need to know for GCSE about relational databases I’m not aware of any practical coursework.
2b. Create an Access Database Lingma Acheson Department of Computer and Information Science IUPUI CSCI N207 Data Analysis with Spreadsheets 1.
Lesson Objectives By the end of this lesson you will be able to: 1.Assign appropriate primary keys/key fields 2.Identify foreign keys in different tables/files.
INFO/CSE 100, Spring 2005 Fluency in Information Technology
Database Normalisation
Presentation transcript:

Normalisation Unit 6: Databases

Just to recap  What is an Entity  What is an Attribute?

Just to recap  So, for example:  An entity in a video store database would be ‘Customer’  What would the Attributes be?

Attributes  First Name  Surname  Address  Telephone Number  Age  Gender 

Introduction  This week we will be going on to standard database notation and Normalisation  In your assignment your plan will need to be in both tabular format and in standardised database notation

Lesson Objectives  By the end of this lesson, you should be able to: Design a database in standard database notation Define the three forms of normalisation

Standard database notation  Using the video store as an example:

Standard database notation  In a video store database, the tables can be described as follows CUSTOMER (CustomerID, Firstname, Surname, Address, TelephoneNumber, , Age, Gender) VIDEO (VideoID, VideoTitle, Rating, FilmGenre, DateReleased, LengthOfFilm, RentalPrice) VIDEORENTALS (VideoRentalID, CustomerID, VideoID, DateRented, DateReturned)

Primary Keys  The underlined field types are known as Primary Keys This is a field that is used to uniquely define a particular record or line in a table. Since text fields e.g. surname can be repeated, primary keys are nearly always numeric fields.  They can include: Membership number, product number, employee number, catalogue number, account number.

Primary and Foreign Key Customer Table Customer ID First Name Surname Address Telephone number Age Gender Video Table Video ID Video title Rating Film Genre Date Released Length of film Rental price Video Rentals Table Video_Rental ID Customer ID Video ID Date Rented Date Returned

Your Task  For the two databases you have designed: Draw the tables as shown in the previous slide Identify possible Primary Keys

Foreign Keys  This is a field in one table which is also the primary key of another table.  Foreign keys are used to establish a relationship between the main table and other subsidiary tables.  Looking at the video tables, what would be the foreign keys?

Foreign Keys Customer Table Customer ID First Name Surname Address Telephone number Age Gender Video Table Video ID Video title Rating Film Genre Date Released Length of film Rental price Video Rentals Table Video_Rent al ID Customer ID Video ID Date Rented Date Returned

Your Task  On the tables you have finished for your databases, identify the foreign keys

Normalisation  The process of refining the structure of a database to minimise redundancy and improve integrity is called normalisation.  When a database has been normalised it is said to be in normal form.  There are three normal forms: First, second and third

First Normal Form  A database is in first normal form if there are no repeated fields.  That means that there must only be one field for each item of data you want to store.  A library database, for example, is not in first normal form because it has the field’s book1, book2, book3, book4, book5, and book6, which all store the same information, i.e. the name of a book.

First Normal Form  First normal form not only facilitates searching, but is also more space efficient as there wouldn't be 5 empty fields being stored if borrowers only had one book.

Second Normal Form  A database is said to be in second normal form if it: is already in first normal form has no fields that aren't dependent on the whole of the key  That is to say that all fields are dependent on the whole of the key (where there is a compound key).

Second Normal Form  For example, a merits database: Name Tutor group Teacher Subject Date Reason Head of year Tutor  There are no repeated fields, so it's in first normal form. If you made name the key field, however, you could see there would be fields that aren't dependent on the key.

Second Normal Form  Subject, for example, is related to the teacher, not to the student. This database, therefore, is not in second normal form.  Even if you were to make a compound key to include the date and the teacher giving the merit, it still wouldn't be in second normal before because subject wouldn't be dependent on the whole of the key.

Third Normal Form  A database is in third normal form if it: is already in second normal form it has no non-key dependencies  By non-key dependencies, we mean that there are no fields that are dependent on other fields that are not part of the key.

Third Normal Form  For example: In the version of merits database previously, where ‘Name’ was the key, the ‘subject’ was related to the ‘teacher’, and not to the student - that is a non-key dependency.

Real Life  But forget all that! It still sounds a bit complicated to me, and I've been developing relational databases (including professionally) for more than 4 years.  For your assignment, don't try to start at first normal form, and then go to second normal form, and then to third.  Once you've got the hang of it, you'll knock out databases in third normal form without even thinking about it. The key thing is to think about what your entities (or tables) are going to be - if you pick the right ones it'll normalise itself.

The Normalisation Oath  Well, don't forget it all, however, because you may be asked about normalisation in an exam. Here's a little tip to remember the three stages - we call it the Normalisation Oath:  Each attribute is dependent on the key, the whole key, and nothing but the key!  So, to get to third normal form, your non- repeating fields (first normal form) need to be dependent on the whole of the key (second normal form), and nothing other than the key (third normal form). It works for me!

So,  By choosing the correct field names and tables, your database should normalise itself  Normalisation improves searches and queries