The Teacher Computing Database Design CP4 Revision.

Slides:



Advertisements
Similar presentations
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.
Advertisements

GCSE Computing#BristolMet Session Objectives# 21 MUST describe methods of validating data as it is input. SHOULD explain the use of key fields to connect.
Normalisation Ensuring data integrity in database design 1.
Databases Revision.
Database Design Conceptual –identify important entities and relationships –determine attribute domains and candidate keys –draw the E-R diagram Logical.
Entity-Relationship Model and Diagrams (continued)
Project and Data Management Software
Chapter 3: Data Modeling
Database – Part 2a Dr. V.T. Raja Oregon State University.
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?
Databases Tom Morgan.
 An entity-relationship (ER) diagram is a specialized graphic that illustrates the interrelationships between entities in a database.  An Entity Relationship.
Page 1 ISMT E-120 Desktop Applications for Managers Introduction to Microsoft Access.
2.3 Organising Data for Effective Retrieval
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)
DAY 15: ACCESS CHAPTER 2 Larry Reaves October 7,
Driving School Database
FatMax Licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 LicenseCreative Commons Attribution-NonCommercial-ShareAlike 2.5.
Principles of Database Design, Part II AIMS 2710 R. Nakatsu.
MIS 301 Information Systems in Organizations Dave Salisbury ( )
RELATIONSHIPS Generally there are two main database types: flat-file and relational.
MIS 301 Information Systems in Organizations Dave Salisbury ( )
Richard Merritt1 Data Modelling Entities, Attributes and Relationships.
Avoiding Database Anomalies
Normalization A technique that organizes data attributes (or fields) such that they are grouped to form stable, flexible and adaptive entities.
PLUG IT IN 3 Fundamentals of Relational Database Operations.
CORE 2: Information systems and Databases NORMALISING DATABASES.
MS Access: Creating Relational Databases Instructor: Vicki Weidler Assistant: Joaquin Obieta.
Data Modelling. ICT5 Introduction Historical development with most organisations Small-scale origins Individual computers bought for particular applications.
Normalisation. NoKats Dog Club A club formed since Keeps records of members and their dogs on index cards. Cards are managed by the secretary and.
Databases The Kingsway School. Database Systems Databases are programs which store information in a logical way. Databases have a structure which helps.
Unit 4 Normalisationand Relational Database Management Systems.
Access Review. Access Access is a database application A database is a collection of records and files organized for a particular purpose Access supports.
Database revision.
Entity-Relationship (E-R) Diagrams
Database Management Systems MIT Lesson 02 – Database Design (Entity Relationship Diagram) By S. Sabraz Nawaz.
An Entity Relationship (ER) Diagram is a graphic that shows the interrelationship between entities in a database.
ENTITY RELATIONSHIP DIAGRAM ENTITY RELATIONSHIP DIAGRAM IS A SPECIALIZED GRAPHIC THAT ILLUSTRATES THE INTERRELATIONSHIPS BETWEEN ENTITIES IN A DATABASE.
Relational Theory and Design
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.
Lesson 2: Designing a Database and Creating Tables.
Chapter 56 Relational Database Design Compiled by Eddie Moorcroft.
MIS 301 Information Systems in Organizations Dave Salisbury ( )
Flat Files Relational Databases
Link tables and keys Access/IPS Walsall College of Arts & Technology.
Entity-Relationship Diagram Presentation Gianna-lee Williams 6AQ Ms. Anderson.
Understand Relational Database Management Systems Software Development Fundamentals LESSON 6.1.
Sample Table Standard Notation Entity name in uppercase
Btec National - IT SYSTEMS ANALYSIS AND DESIGN 1 IT Systems Analysis and Design Entity Relationship Diagrams.
6.1 © 2007 by Prentice Hall Chapter 6 (Laudon & Laudon) Foundations of Business Intelligence: Databases and Information Management.
Database Design. Database Design Process Data Model Requirements Application 1 Database Requirements Application 2 Requirements Application 4 Requirements.
Concepts of Database Management, Fifth Edition Chapter 6: Database Design 2: Design Methodology.
Databases Database Normalisation. Learning Objectives Design simple relational databases to the third normal form (3NF).
Teanna Clarke 6aQ What is a Entity-Relationship Diagram?  An Entity-Relationship Diagram (ERD) is a tool that graphically shows the connections among.
What Is Normalization  In relational database design, the process of organizing data to minimize redundancy  Usually involves dividing a database into.
©G. Millbery 2005Relational and Online Database Management SystemsSlide 1 Module Relational and Online Database Management Systems Normalisation.
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.
Normalisation Unit 6: Databases. Just to recap  What is an Entity  What is an Attribute?
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.
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.
Relational and Online Database Management Systems Normalisation
Database Normalisation
Lesson Objectives Aims You should know about: 1.3.2:
Databases.
Databases 1.
Presentation transcript:

The Teacher Computing Database Design CP4 Revision

The Teacher Computing Database Design Careful database design is needed to avoid… Data Redundancy – storing the same data item in more than one place (waste of storage space) Data Inconsistency – two versions of the same data may be different.

The Teacher Computing Entities An entity is a thing about which data is stored (Eg Customer, Employee, Stock) A relationship is a link between two entities.

The Teacher Computing Relationships One-to-One : One Pupil has one Network Account. One-to-Many : One Pupil borrows many LibraryBooks Many-to-Many : One Teacher teaches many Pupils – One Pupil is taught by many Teachers.

The Teacher Computing Entity-Relationship Diagrams One-to-One One-to-Many Many-to-Many

The Teacher Computing Key Fields Each Entity must have a unique key field – the primary key. An Entity may have foreign keys – primary key fields of other entities. These provide the links (relationships) between different entities. WardID is a foreign key. PatientIDSurnameForenameDiseaseWardID P101SmithPaulMeaslesW10 P102JonesJaneMumpsW12 P103WilkinsMaryMeaslesW10 P104JacksonTomTonsillitisW17 PatientID is the primary key field.

The Teacher Computing Table Design The standard notation for writing down the design of a table… CAPITAL letters for the name of the table Underline the key field, Italicise the foreign keys. Eg.: PATIENTS (PatientID, Surname, Forename, Disease, WardID)

The Teacher Computing Database Normalisation Avoids data duplication Avoids data inconsistencies …ensures the best possible design for a database so other applications can use it.

The Teacher Computing Un-Normalised Data PupilIDPupilNameDOBExamIDSubjectLevelDateRoomIDRoomName P99010Jane Grey CP101 EN004 AR075 Computing English Art AS GCSE AS UH UG Hall Gym P99205Tom Jones CP101 MA110 PH190 Computing Maths Physics AS UH UG 58 Hall Gym Science Lab P99311Sam Hill CP101 EN004 Computing English AS GCSE UH UG Hall Gym There are a number of repeated fields here… To change into First Normal Form – the repeated groups of fields must go… Split into two linked tables…

The Teacher Computing First Normal Form PUPILS ( PupilID, PupilName, DOB, ExamID) EXAMS ( ExamID, Subject, Level, Date, RoomID, RoomName) The key field of the PUPILS table is a combined key field. The link is made through the foreign key ‘ExamID’. PupilIDPupilNameDOBExamID P99010Jane Grey CP101 P99010Jane Grey EN004 P99010Jane Grey AR075 P99205Tom Jones CP101 P99205Tom Jones MA110 P99205Tom Jones PH190 P99311Sam Hill CP101 P99311Sam Hill EN004 ExamIDSubjectLevelDateRoomIDRoomName CP101ComputingAS UHHall AR075ArtAS UGGym MA110MathsAS UGGym PH190PhysicsAS Science Lab EN004EnglishGCSE UGGym To get this into Second Normal Form, no field must be dependant on only part of the key field. Do this by creating a linking table HINT : You need to do this every time you have a Many-to-Many relationship)

The Teacher Computing Second Normal Form PUPILS ( PupilID, PupilName, DOB) EXAMS ( ExamID, Subject, Level, Date, RoomID, RoomName) PUPIL_SITS(PupilID,ExamID) …must be changed to… The Many-to-Many relationship…

The Teacher Computing Second Normal Form PupilIDPupilNameDOB P99010Jane Grey P99205Tom Jones P99311Sam Hill ExamIDSubjectLevelDateRoomIDRoomName CP101ComputingAS UHHall AR075ArtAS UGGym MA110MathsAS UGGym PH190PhysicsAS Science Lab EN004EnglishGCSE UGGym PupilIDExamID P99010CP101 P99010EN004 P99010AR075 P99205CP101 P99205MA110 P99205PH190 P99311CP101 P99311EN004 To make this database into Third Normal Form, there must be no non-key dependencies…..so separate the Rooms into another table…

The Teacher Computing Third Normal Form PupilIDPupilNameDOB P99010Jane Grey P99205Tom Jones P99311Sam Hill PupilIDExamID P99010CP101 P99010EN004 P99010AR075 P99205CP101 P99205MA110 P99205PH190 P99311CP101 P99311EN004 ExamIDSubjectLevelDateRoomID CP101ComputingAS UH AR075ArtAS UG MA110MathsAS UG PH190PhysicsAS EN004EnglishGCSE UG RoomIDRoomName UHHall UGGym UGGym 58Science Lab UGGym PUPILS (PupilID, PupilName, DOB) EXAMS (ExamID, Subject, Level, Date, RoomID) PUPIL_SITS (PupilID, ExamID) ROOMS (RoomID, RoomName)