44271: Database Design & Implementation Physical Data Modelling Ian Perry Room: C49 Tel Ext.: 7287

Slides:



Advertisements
Similar presentations
44220: Database Design & Implementation Avoiding Database Anomalies Ian Perry Room: C49 Tel Ext.: 7287
Advertisements

Relational Database. Relational database: a set of relations Relation: made up of 2 parts: − Schema : specifies the name of relations, plus name and type.
Foundations of Relational Implementation n Defining Relational Data n Relational Data Manipulation n Relational Algebra.
SQL Lecture 10 Inst: Haya Sammaneh. Example Instance of Students Relation  Cardinality = 3, degree = 5, all rows distinct.
CIT 613: Relational Database Development using SQL Introduction to SQL.
INFS614, Fall 08 1 Relational Algebra Lecture 4. INFS614, Fall 08 2 Relational Query Languages v Query languages: Allow manipulation and retrieval of.
Database Management: Getting Data Together Chapter 14.
Chapter 3 An Introduction to Relational Databases.
The Relational Database Model:
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
Attribute databases. GIS Definition Diagram Output Query Results.
The Relational Model Codd (1970): based on set theory Relational model: represents the database as a collection of relations (a table of values --> file)
Information systems and databases Database information systems Read the textbook: Chapter 2: Information systems and databases FOR MORE INFO...
RIZWAN REHMAN, CCS, DU. Advantages of ORDBMSs  The main advantages of extending the relational data model come from reuse and sharing.  Reuse comes.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
Michael F. Price College of Business Chapter 6: Logical database design and the relational model.
SQL's Data Definition Language (DDL) – View, Sequence, Index.
44220: Database Design & Implementation Review & Assignment 1
44220: Database Design & Implementation Logical Data Modelling Ian Perry Room: C48 Tel Ext.: 7287
Week 6 Lecture Normalization
Introduction to Accounting Information Systems
Introduction to SQL Steve Perry
1 INTRODUCTION TO DATABASE MANAGEMENT SYSTEM L E C T U R E
44220: Database Design & Implementation Review & Assignment 2 Ian Perry Room: C49 Tel Ext.: 7287
MIS 301 Information Systems in Organizations Dave Salisbury ( )
Distribution of Marks For Second Semester Internal Sessional Evaluation External Evaluation Assignment /Project QuizzesClass Attendance Mid-Term Test Total.
44220: Database Design & Implementation Implementing Physical Domains Ian Perry Room: C49 Tel Ext.: 7287
University of Sunderland COM 220Lecture Two Slide 1 Database Theory.
Databases From A to Boyce Codd. What is a database? It depends on your point of view. For Manovich, a database is a means of structuring information in.
Normalization (Codd, 1972) Practical Information For Real World Database Design.
SQL Structured Query Language Programming Course.
MIS 3053 Database Design & Applications The University of Tulsa Professor: Akhilesh Bajaj RM/SQL Lecture 1 ©Akhilesh Bajaj, 2000, 2002, 2003, All.
Instructor: Dema Alorini Database Fundamentals IS 422 Section: 7|1.
Lecture2: Database Environment Prepared by L. Nouf Almujally 1 Ref. Chapter2 Lecture2.
FEN Introduction to the database field:  The Relational Model Seminar: Introduction to relational databases.
44220: Database Design & Implementation Modelling the ‘Real’ World Ian Perry Room: C41C Ext.: 7287
Oracle & SQL Introduction. Database Concepts Revision DB? DBMS? DB Application? Application Programs? DBS? Examples of DBS? Examples of DBMS? 2Oracle.
Database Systems Module Review
Database Design. The process of developing database structures from user requirements for data a structured methodology Structured Methodology - a number.
The University of Akron Dept of Business Technology Computer Information Systems The Relational Model: Concepts 2440: 180 Database Concepts Instructor:
Course FAQ’s I do not have any knowledge on SQL concepts or Database Testing. Will this course helps me to get through all the concepts? What kind of.
Visual Programing SQL Overview Section 1.
SQL Jan 20,2014. DBMS Stores data as records, tables etc. Accepts data and stores that data for later use Uses query languages for searching, sorting,
44220: Database Design & Implementation Review & Assignment 2 Ian Perry Room: C41C Tel Ext.: 7287
WXGE 6101 DATABASE CONCEPTS & IMPLEMENTATIONS. Lesson Overview The Relational Model Terminology of relational model. Properties of database relations.
44220: Database Design & Implementation Implementing Physical Domains Ian Perry Room: C41C Tel Ext.: 7287
Database Management Supplement 1. 2 I. The Hierarchy of Data Database File (Entity, Table) Record (info for a specific entity, Row) Field (Attribute,
44271: Database Design & Implementation Logical Data Modelling (Avoiding Database Anomalies) Ian Perry Room: C49 Tel Ext.: 7287
The relational model A data model (in general) : Integrated collection of concepts for describing data (data requirements). Relational model was introduced.
CIT 613: Relational Database Development using SQL Introduction to SQL DeSiaMorePowered by DeSiaMore 1.
44220: Database Design & Implementation Introduction to Module Ian Perry Room: C49 Ext.: 7287
Database Systems Avoiding Database Anomalies Tutor:Ian Perry Tel: Web:
Distribution of Marks For Second Semester Internal Sessional Evaluation External Evaluation Assignment /Project QuizzesClass Attendance Mid-Term Test Total.
Database Systems Logical Data Modelling Tutor:Ian Perry Tel: Web:
Introduction to Core Database Concepts Getting started with Databases and Structure Query Language (SQL)
LECTURE TWO Introduction to Databases: Data models Relational database concepts Introduction to DDL & DML.
44220: Database Design & Implementation Introduction to Module Ian Perry Room: C41C Ext.: 7287
Rationale Databases are an integral part of an organization. Aspiring Database Developers should be able to efficiently design and implement databases.
1 CS122A: Introduction to Data Management Lecture #4 (E-R  Relational Translation) Instructor: Chen Li.
44220: Database Design & Implementation Review & Assignment 2 Ian Perry Room: C41C Tel Ext.: 7287
Fundamental of Database Systems
COP Introduction to Database Structures
Chapter 4 Relational Databases
Translation of ER-diagram into Relational Schema
Databases and Information Management
Week 11: Database Management System
Database.
Structured Query Language
Databases.
Databases and Information Management
Presentation transcript:

44271: Database Design & Implementation Physical Data Modelling Ian Perry Room: C49 Tel Ext.:

Ian PerrySlide : Database Design & Implementation: Physical Data Modelling The ‘Data Modelling Stack’

Ian PerrySlide : Database Design & Implementation: Physical Data Modelling What is a Physical Data Model? The Physical Implementation (hardware & software) of a Logical Data Model: it is useless to progress to this stage of database development if your Logical Data Model is NOT demonstrably ‘robust’. Physical Data Model must enable: data to be stored (& maintained) in structured manner. an ‘accurate’ implementation of the logical data model. retrieval of specific groupings of data (information?). refer back to the original business requirements. There may be several software constraints: depending upon the software application chosen.

Ian PerrySlide : Database Design & Implementation: Physical Data Modelling Our Physical ‘World’? RDBMS Software: Microsoft Access In this physical world we must be able to: Create Translate our Relational Schema into a Database. Populate This Database with ‘test’ data. Query Ask questions of the Database.

Ian PerrySlide : Database Design & Implementation: Physical Data Modelling Properties of RDBMS Software Modification: To Schema: creating & deleting relations (i.e. Tables). adding attributes to, or removing attributes from, existing relations. To Data: creating & deleting tuples (i.e. Records) updating attribute values in a tuple (i.e. Data held in Fields) Interrogation: Relational Algebra Relational Calculus (SQL)

Ian PerrySlide : Database Design & Implementation: Physical Data Modelling Logical => Physical i.e. translate our Relational Schema into a Database Storage Model: Schema => Database Relations => Tables Attributes => Field Names Domains => Data Type Field Size Input Mask Validation Rule etc. Key Fields=> Relationships

Ian PerrySlide : Database Design & Implementation: Physical Data Modelling The SSC Database Relations Staff (StaffID, FirstName, SurName, ScalePoint, DOB) Student (EnrolNo, FirstName, SurName, OLevelPoints, Tutor) Course (CourseCode, Name, Duration) Team (CourseCode, StaffID) Pay (ScalePoint, RateOfPay) ER Diagram Staff Course Student 1MMM

Ian PerrySlide : Database Design & Implementation: Physical Data Modelling Physical Implementation

Ian PerrySlide : Database Design & Implementation: Physical Data Modelling Relational Algebra With most (all?) Relational DataBase Management Systems the means of database interrogation is based upon: Relational Algebra (E. F. Codd, 1972) As represented by the 3 primary functions of: SELECT PROJECT JOIN

Ian PerrySlide : Database Design & Implementation: Physical Data Modelling Example Relations (Relational Algebra) EmpNoENameESalaryDept JNameEmpNoHours Employee (EmpNo, EName, ESalary, Dept) Assignment (JName, EmpNo, Hours) Job (JName, Budget) JNameBudget

Ian PerrySlide : Database Design & Implementation: Physical Data Modelling SELECT Extracts TUPLES (Rows) from a relation subject to required conditions on attributes in that relation. e.g.: SELECT Employee WHERE ESalary > NB. SELECT Employee WHERE ESalary > GIVING Temp1 Would ‘create’ a new relation, i.e. Temp1

Ian PerrySlide : Database Design & Implementation: Physical Data Modelling PROJECT Extracts COLUMNS from a relation in a named order by attribute. e.g.: PROJECT Employee OVER EName, Dept

Ian PerrySlide : Database Design & Implementation: Physical Data Modelling JOIN COMBINES RELATIONS which have a common attribute to generate a temporary relation containing all of the attributes from both relations. e.g: JOIN Employee AND Assignment OVER EmpNo NB. This temporary relation contains only one instance of the ‘EmpNo’ Attribute.

Ian PerrySlide : Database Design & Implementation: Physical Data Modelling Asking ‘Complex’ Questions What are the Names, Jobs and Hours worked by those in the Sales Dept? PROJECT ( SELECT ( JOIN Employee AND Assignment OVER EmpNo) WHERE Dept = 'Sales') OVER EName, JName, Hours NB. The final relation is constructed by working from the innermost nesting outwards.

Ian PerrySlide : Database Design & Implementation: Physical Data Modelling Structured Query Language SQL is the most often used method for accessing relational databases. A ‘software interpretation’ of Codd's Relational Algebra. Remember: SELECT - extracts TUPLES from a relation subject to required conditions on attributes in the relation. PROJECT - extracts COLUMNS from a relation in a named order by attribute. JOIN - COMBINES RELATIONS which have a common attribute to generate a temporary relation containing all of the attributes from both relations. SQL ‘works’ for all RDBMS applications: e.g. Access, Oracle, MySQL, etc.

Ian PerrySlide : Database Design & Implementation: Physical Data Modelling The SQL ‘SELECT’ Statement SQL Syntax SELECT {column_name [, column_name,... ] } FROM table_name [ table_alias ] [ WHERE condition [ AND/OR condition [, AND/OR condition,... ] ] ] [ GOUP BY column_name [, column_name,... ] [ HAVING condition ] ] [ ORDER BY {column_name/column_number [,... ] } ] Don’t worry, it is not a frightening as it looks!

Ian PerrySlide : Database Design & Implementation: Physical Data Modelling Example Relations (SQL) SurnameNameDeptPositionAge Staff (Surname, Name, Dept, Position, Age) Course (CourseNo, CourseName, Level, Surname) CourseNoCourseNameLevelSurname

Ian PerrySlide : Database Design & Implementation: Physical Data Modelling The ‘simplest’ SELECT SELECT * FROM staff ; A SELECT of all Tuples (rows) from a Table called staff.

Ian PerrySlide : Database Design & Implementation: Physical Data Modelling A ‘more useful’ SELECT SELECT name, surname, age, position FROM staff WHERE age > 35 OR position = 'CLERK' GROUP by age ; A PROJECT of specific columns of the staff Table (in a named order), with some SELECTion of conditions.

Ian PerrySlide : Database Design & Implementation: Physical Data Modelling Previous SQL Statement Produces:

Ian PerrySlide : Database Design & Implementation: Physical Data Modelling SELECTing from 2 Tables SELECT S.name, S.surname, S.age, C.courseno FROM staff S, course C WHERE S.surname = C.surname AND age > 50 ; JOINs the Tables staff and course to create a temporary table and PROJECTs columns from this new table based on the SELECTion criteria.

Ian PerrySlide : Database Design & Implementation: Physical Data Modelling Previous SQL Statement Produces:

Ian PerrySlide : Database Design & Implementation: Physical Data Modelling Query-By-Example (QBE) SQL can be difficult to learn, however, most RDBMS software has a QBE interface: which presents the user with ‘lists’ of things to choose from. Using this 'point-&-click' QBE interface, we don’t have to know (much) about: Field Names, Logical Operators, etc. can easily set up relationships between tables: Staff.SURNAME = Course.SURNAME and apply criteria for selection, e.g.: Staff.AGE > 50

Ian PerrySlide : Database Design & Implementation: Physical Data Modelling This Week’s Workshop Provides a ‘gentle’ Introduction to Microsoft Access Showing you how to build, and then ask questions of, relatively simple Relational Databases. i.e.: Databases consisting of two, or three, Tables.