Database Design and Implementation

Slides:



Advertisements
Similar presentations
Transformation of an ER Model into a Relational Database Schema Translating to Software.
Advertisements

McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. Extended Learning Module J (Office 2010 Version) Implementing.
Extended Learning Module J (Office 2007 Version) Implementing a Database with Microsoft Access McGraw-Hill/Irwin Copyright © 2010 by the McGraw-Hill Companies,
Relational Data Analysis II. Plan Introduction Structured Methods –Data Flow Modelling –Data Modelling –Relational Data Analysis Feasibility Maintenance.
IACT303 – INTI 2005 World Wide Networking Welcome and Introduction to Subject. Penney McFarlane The University of Wollongong.
The Relational Model Codd (1970): based on set theory Relational model: represents the database as a collection of relations (a table of values --> file)
Logical Database Design Nazife Dimililer. II - Logical Database Design Two stages –Building and validating local logical model –Building and validating.
Mapping ERM to relational database
44220: Database Design & Implementation Logical Data Modelling Ian Perry Room: C48 Tel Ext.: 7287
Modelling Techniques - Normalisation Description and exemplification of normalisation.Description and exemplification of normalisation. Creation of un-normalised.
COMP 111 Programming Languages 1 First Day. Course COMP111 Dr. Abdul-Hameed Assawadi Office: Room AS15 – No. 2 Tel: Ext. ??
Database Technical Session By: Prof. Adarsh Patel.
Lecture 7 Integrity & Veracity UFCE8K-15-M: Data Management.
10/10/2012ISC239 Isabelle Bichindaritz1 Physical Database Design.
1 CSE 2337 Introduction to Data Management Access Book – Ch 1.
September 2002 HND Year 2 Database Management Systems Sept 2002.
Database Systems Logical Data Modelling Tutor:Ian Perry Tel: Web:
LECTURE TWO Introduction to Databases: Data models Relational database concepts Introduction to DDL & DML.
Decision Analysis Fall Term 2015 Marymount University School of Business Administration Professor Suydam Week 10 Access Basics – Tutorial B; Introduction.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3 The Relational Data Model and Relational Database Constraints تنبيه.
AOIT Database Design Unit 3, Lesson 9 Data Integrity Copyright © 2009–2011 National Academy Foundation. All rights reserved.
Transformation of an ER Model into a Relational Database Schema Translating to Software.
April 20022/CS/3X1 Database Design Design method John Wordsworth Department of Computer Science The University of Reading Room.
To share important information about KS2 SATs. To answer any questions about KS2 SATs. Discuss / share ideas about how you as a parent can help your child.
Academic Upgrading Welcome to the Academic Upgrading Online Information Session. This online presentation will outline what the Academic Upgrading program.
SELECT, IMPLEMENT & USE TODAY’S ADVANCED BUSINESS SYSTEMS
Getting started with Accurately Storing Data
Techniques for Graded Unit Preparation
CSIS 115 Database Design and Applications for Business
Logical Database Design and the Rational Model
Database Development Lifecycle
Assessment.
Databases Chapter 9 Asfia Rahman.
The Relational Database Model
CHAPTER 7 DATABASE ACCESS THROUGH WEB
Chapter 6 - Database Implementation and Use
Assessment.
Prepared by : Moshira M. Ali CS490 Coordinator Arab Open University
Database Design Process (Chapter 3)
Lecture # 13 (After 1st Exam)
Translation of ER-diagram into Relational Schema
CIS 336 Competitive Success/snaptutorial.com
CIS 336 Education for Service-- snaptutorial.com.
CIS 336 Teaching Effectively-- snaptutorial.com
COS 346 Day 8.
INFO/CSE 100, Spring 2005 Fluency in Information Technology
From ER to Relational Model
Data Modelling Introduction
Chapter 4 The Relational Model Pearson Education © 2009.
Chapter 4 The Relational Model Pearson Education © 2009.
Entity relationship diagrams
Teaching slides Chapter 8.
Database Management System
Chapter 4 The Relational Model Pearson Education © 2009.
Chapter 4.1 V3.0 Napier University Dr Gordon Russell
The Relational Model Transparencies
Database solutions Chosen aspects of the relational model Marzena Nowakowska Faculty of Management and Computer Modelling Kielce University of Technology.
SEVEN STRATEGIES FOR IMPROVING TEST PERFORMANCE
Chapter 4 The Relational Model Pearson Education © 2009.
COMP 208/214/215/216 – Lecture 7 Documenting Design.
The Relational Database Model
Accounting Information Systems 9th Edition
Advanced Database Concepts: Reports & Views
Relational Database Design
CMPE/SE 131 Software Engineering March 9 Class Meeting
Database Design: Relational Model
They Say, I Say Chapter 1 and 12
Creative assessment and feedback
Normalisation 1 Unit 3.1 Dr Gordon Russell, Napier University
Preparing students for assessments Janet Strain Ann Jakeman
Presentation transcript:

Database Design and Implementation WELCOME aboard SA0951a Database Design and Implementation

SA0951a Aim/Learning Outcomes …An extensive experience in designing and implementing advanced database applications. Outcomes Critically analyse application requirements and design appropriate conceptual database models. Demonstrate an understanding of databases using a mainframe DBMS, including database programming techniques. Evaluate the different approaches to data manipulation using SQL demonstrating one of the options within an application. July 19

Materials and Delivery All materials are held on the BlackBoard/WebCT site for this module Check each week to see what’s coming up Downloads available Self-assessments, lectorials, labs etc WebCT has a discussion forum if you would like to “air” something with your classmates (keep it politically correct and academic though!) July 19

Delivery Schedule Lectorials, tutorials, labs all on Friday Except……….. This week and weeks 6 and 10 In weeks 6 and 10 lecture will be 1-2 3004 Lab will be in 4534.1. at 3-5 Tutorials are NOT affected This is because the deliverers are attending a database workshop in weeks 6 and 10 on fridays! July 19

What are we trying to teach you? To go through the process of database development from inception to delivery Conceptual design Translation to a logical design Implementing design Building Querying Programming Testing testing testing! July 19

How are we going to do it? We encourage and expect interaction in classes So, don’t just listen, actively engage with us We’ll make tutorials interactive so you have time to assimilate ideas and practice with colleagues So some group activity will be encouraged We expect therefore Your participation and contributions with your peers To keep up the pace and develop your own level of enquiry July 19

Assessment ……… is twofold A paper test in week 13 will examine the early stage of database design issues This is 40% A coursework submission & viva in early January (week 17) before term 2 starts will examine the practical issues of querying and programming aspects This is 60% The lab work will prepare you for this July 19

Reading & Study You will learn at different paces but should aim to be up-to-date by the start of the following week AT the end of each lectorial we shall recommend reading/practice to keep you on track Aim to spend 10 hours or so each week on the module July 19

We start with Relational Modelling The relational model is underpinned by mathematical set theory It arranges data in a database into a set of 2-D logically related TABLES. Each table contains many attributes Each attribute contains data If your relational model is badly designed then you will encounter anomalies We start therefore by considering how NOT to design a database! July 19

Why is this Single Table design poor? Student Age Sex Module Title 1 18 m SA0951 DB SA0954 OO 2 25 f 3 33 SA0956 JAVA we INSERT, MODIFY and DELETE data And we HATE to duplicate data and/or lose it unintentionally  So, in groups, consider the effects of the following: Insert a new student studying SA0951 Delete student 3 Modify the age of student 1 July 19

What have you learnt? That anomalies will occur if you don’t design your data model correctly What we really need are lists of students and modules in our database like this But can you see a problem even with this? What information is lost? Student Age Sex 1 18 m 2 25 f 3 33 Module Title SA0951 DB SA0954 OO SA0956 JAVA July 19

How do we make the model relational? The previous example had two UNLINKED tables and therefore we could not model things like students taking many modules To link them we need to consider KEYS EVERY table in a relational model has a PRIMARY KEY A link is formed when a primary key is matched to a FOREIGN KEY in another table July 19

Key definitions Candidate key A unique identifier for a table (there may be more than one) The key can be composed of any number of attributes Primary key (PK) The chosen candidate key Foreign key (FK) A key that matches a primary key July 19

Over to you! Student Module grade 1 SA0951 18 SA0954 14 2 15 3 SA0956 Choose a PRIMARY KEY for this table by considering the candidates. Explain why you chose it. July 19

OK , so now we need to LINK Think of a link as having a “1” end at the primary key and a “1” or “many” at the foreign key end. From the example, ask yourself ………. How many modules could a student take? How many students could any module have on it? July 19

Here’s the model, what are the PK and FK’s that link the tables together? Student Age Sex 1 18 m 2 25 f 3 33 Module Title SA0951 DB SA0954 OO SA0956 JAVA Student Module grade 1 SA0951 18 SA0954 14 2 15 3 SA0956 9 Remember you need to identify the PK for each table and then the foreign keys that match a PK. You have already found the PK for the bottom table. July 19

We are well on the way now …… We just need a few extra rules now for the keys. We call them integrity constraints ENTITY integrity A PK cannot have duplicate or null entries in it REFERENTIAL integrity Every FK entry MUST have a matching entry in the related PK An FK can be entirely null, but not partially null July 19

Lets expand our student model … refresh your memory of the keys first Age Sex 1 18 m 2 25 3 33 f Student Module grade 4 SA0951 18 1 SA0954 2 15 3 SA0957 9 Module Title SA0951 DB SA0954 OO VB SA0956 JAVA Where are the violations of integrity constraints? Check each of the null entries as part of the exercise July 19

When we store data ……… We store them as a particular TYPE TEXT for character data NUMBER for integer and real numbers DATE for the calendar Which of these would you use for the student model attributes? Justify your choice for each July 19

Final group exercise We want to model customers paying invoices by instalments Here are the attributes for the model: Customer Number, customer name, postcode, invoice number, invoice date, invoice bill amount, date and amount paid for each instalment. You need to decide on: The number of tables and their attributes The PK’s and FK’s in the model We can continue with this in lab if not finished July 19

Directed Reading Find the chapter on relational modelling in any database book Connolly and Begg “Database Solutions” Connolly and Begg “Database Systems” Ritchie “Relational database principles” Rob et al “Database Systems” Any many many more ……. The internet will have many links to the subject matter too ………. http://www.utexas.edu/its/archive/windows/database/datamodeling/rm/overview.html July 19

NEXT lecture & Lab Lecture Is at 1-2pm Thursday 24th in 3004 The remaining lectures will be on fridays 1-2 in 3004 except weeks 6 and 10. Remind you of this later. NO LECTURES ON MONDAYS now – ok? The labs: Start Thursday 24th 3-5 in 4534.1 (also weeks 6 and 10) Again they will be on fridays 2-4 except weeks 6 and 10. Tutorials You should be in a Group These run 11-12 and 12-1 on fridays, always. The room is either 3512.1 or 2021 – CHECK! July 19