44220: Database Design & Implementation Implementing Physical Domains Ian Perry Room: C49 Tel Ext.: 7287

Slides:



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

44220: Database Design & Implementation ER Diagramming
44220: Database Design & Implementation Avoiding Database Anomalies Ian Perry Room: C49 Tel Ext.: 7287
 Microsoft Access is one of two primary database offering from Microsoft.  Access is a network/desktop-based database.  Advantage: It is easy to use.
Maintenance Modifying the data –Add records –Delete records –Update records Modifying the design –Add fields into tables –Remove fields from a table –Change.
BA271 Week 7 Lecture Building the database Dave Sullivan.
DT211 Stage 2 Databases Lab 1. Get to know SQL Server SQL server has 2 parts: –A client, running on your machine, in the lab. You access the database.
Database Design Concepts INFO1408 Term 2 week 1 Data validation and Referential integrity.
Access Lecture 1 Database Overview and Creating Tables Create an Employee Table.
Data Types and Field Properties 5.01 Understand database tables used in business.
1 AQA ICT AS Level © Nelson Thornes Types of data.
Creating a table in Access. Table Design Considerations Just as you first create a blueprint to build a house, you should first sketch or outline the.
44220: Database Design & Implementation Review & Assignment 1
Microsoft Access 2000 Creating Tables and Relationships.
44220: Database Design & Implementation Logical Data Modelling Ian Perry Room: C48 Tel Ext.: 7287
Tables. What is a Table? A part of a database Container for data Pieces of data, put together, have a meaning.
CREATE THE DIFFERENCE Normalisation (special thanks to Janet Francis for this presentation)
44095: IT for Management Introduction to Spreadsheets (Basic/Complex Formulae & Worksheets) By:Ian Perry Room: C48 Tel:
Driving School Database
 A database is a collection of data that is organized so that its contents can easily be accessed, managed, and updated. What is Database?
10 May Microsoft Access 2010 Relational databases’ program Part of the Microsoft Office package Administer relational database Update database through.
44220: Database Design & Implementation Review & Assignment 2 Ian Perry Room: C49 Tel Ext.: 7287
DATABASE. Computer-based filing systems Information in computer-based filing systems are stored in DATA FILES. A FILE is a collection of RELATED RECORDS.
Designing a Database (Part I) -Identify all fields needed to produce the required information -Group related fields into tables -Determine Each Table’s.
Complete theory from last lesson… Put today’s date in the front of your book Read pages 46 and 47 of the textbook…
Chapter 5: Data Types (2013) Revision Candidates should be able to know: Identify different data types? Key terms: File, record, field and key field Database.
GCSE Computing#BristolMet Session Objectives# 20 MUST describe a database and discuss the legal implications of storing personal information SHOULD explain.
5 5 Data types Logical/Boolean Has only two alternatives: Yes or no, on or off true or false Text/Alphanumeric Refers to all letters and numbers and other.
G045 Lecture 09 ERD Diagrams (Entity Relationship Diagrams) Mr C Johnston ICT Teacher
© Relational Databases. © Entities Data is stored in tables. Each table is concerned with one entity An entity is a.
11 3 / 12 CHAPTER Databases MIS105 Lec15 Irfan Ahmed Ilyas.
M1G Introduction to Database Development 2. Creating a Database.
WHAT IS A DATABASE? A DATABASE IS A COLLECTION OF DATA RELATED TO A PARTICULAR TOPIC OR PURPOSE OR TO PUT IT SIMPLY A GENERAL PURPOSE CONTAINER FOR STORING.
44220: Database Design & Implementation Modelling the ‘Real’ World Ian Perry Room: C41C Ext.: 7287
IE 423 – Design of Decision Support Systems Database development – Building Tables
Database Systems Module Review
Relational Databases. Relational database  data stored in tables  must put data into the correct tables  define relationship between tables  primary.
44220: Database Design & Implementation Review & Assignment 2 Ian Perry Room: C41C Tel Ext.: 7287
44220: Database Design & Implementation Implementing Physical Domains Ian Perry Room: C41C Tel Ext.: 7287
Databases.  A database is simply a collection of information stored in an orderly manner.  A database can be as simple as a birthday book, address book.
Database Systems ER Diagramming Tutor:Ian Perry Tel: Web:
CSCI-235 Micro-Computers in Science Microsoft Access 2002 Chapter 2 Tables and Forms: Design, Properties, Views, and Wizards.
44271: Database Design & Implementation Logical Data Modelling (Avoiding Database Anomalies) Ian Perry Room: C49 Tel Ext.: 7287
Study Opportunities1 Database table quiz What is your name?
Agenda  TMA01  M876 Block 2 Relational Theory. Data Modeling.
Mr C Johnston ICT Teacher
44220: Database Design & Implementation Introduction to Module Ian Perry Room: C49 Ext.: 7287
Database Systems Avoiding Database Anomalies Tutor:Ian Perry Tel: Web:
* 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.
44271: Database Design & Implementation Physical Data Modelling Ian Perry Room: C49 Tel Ext.: 7287
Database Systems Logical Data Modelling Tutor:Ian Perry Tel: Web:
Microsoft Access Prepared by the Academic Faculty Members of IT.
Normalisation Unit 6: Databases. Just to recap  What is an Entity  What is an Attribute?
MICROSFTACCESS tables. DATA TYPES Field TypeWhat It Holds Short Text Text up to 255 characters long (including spaces and punctuation). Use a Text field,
44220: Database Design & Implementation Review & Assignment 2 Ian Perry Room: C41C Tel Ext.: 7287
BTEC NCF IT Unit 02 Creating Systems to Manage Information Lesson 05 – Data Types Mr C Johnston.
DATA TYPES.
Creating a database table
Unit 16 – Database Systems
CSIS 115 Database Design and Applications for Business
BTEC NCF IT Unit 02 Creating Systems to Manage Information Lesson 05 – Data Types Mr C Johnston.
Data Types and Field Properties
Introduction to Computer Science (CIS 101)
Data Types and Field Properties
Data Types and Field Properties
Data Types and Field Properties
Chapter 2 Design Table and Form.
Chapter 2 Design Table and Form.
Data Types and Field Properties
Data Types and Field Properties
Presentation transcript:

44220: Database Design & Implementation Implementing Physical Domains Ian Perry Room: C49 Tel Ext.:

Ian PerrySlide : Database Design & Implementation: Implementing Physical Domains 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 1MNM

Ian PerrySlide : Database Design & Implementation: Implementing Physical Domains Domains Schema SSC Domains StaffIdentifiers = ; StudentIdentifiers = ; Titles = Mr, Ms, Mrs, Dr; PersonNames = String, <= 12 Characters; CourseIdentifiers = ; CourseNames = Computing, Law, …, Marketing; CourseDurations = 3, 6, 9, 12; OLevelPoints = ; ScalePoints = 1 - 6; PayRates = £13,000, £13,500, …, £15,500; BirthDates = Date, >= 21 Years before Today;

Ian PerrySlide : Database Design & Implementation: Implementing Physical Domains Relations – Staff & Student Relation Staff StaffID: StaffIdentifiers; Title: Titles; FirstName: PersonNames; SurName: PersonNames; ScalePoint: ScalePoints; DOB: BirthDates; Primary Key: StaffID Foreign Key: ScalePoint refs Pay.ScalePoint Relation Student EnrolNo: StudentIdentifiers; Title: Titles; FirstName: PersonNames; SurName: PersonNames; OLevelPoints: OLevelPoints; Tutor: StaffIdentifiers; Primary Key: EnrolNo Foreign Key: Tutor refs Staff.StaffID

Ian PerrySlide : Database Design & Implementation: Implementing Physical Domains Relations – Course, Team & Pay Relation Course CourseCode: CourseIdentifiers; Name: CourseNames; Duration: CourseDurations; Primary Key: CourseCode Relation Team CourseCode: CourseIdentifiers; StaffID: StaffIdentifiers; Primary Key: CourseCode & Staff-ID Foreign Key: CourseCode refs Course.CourseCode Foreign Key: StaffID refs Staff.StaffID Relation Pay ScalePoint: ScalePoints; RateOfPay: PayRates; Primary Key: ScalePoint

Ian PerrySlide : Database Design & Implementation: Implementing Physical Domains Logical => Physical Translating a Logical Model (e.g. a Database Schema) into a Physical Model (e.g. an Access Database) requires the following: Schema => Database Relations => Tables Attributes => Field Names Domains => Data Type Field Size Validation Rule Input Mask Key Fields => Relationships

Ian PerrySlide : Database Design & Implementation: Implementing Physical Domains Physical Implementation

Ian PerrySlide : Database Design & Implementation: Implementing Physical Domains Controlling Data Entry Access provides 4 main ways to control the data that can be entered into individual fields. Data Type Number, Text, Memo, Date/Time, Currency, etc. Field Size (or Format) depends upon the Data Type chosen. Validation Rule to control the range of allowable values that can be entered into a field. Input Mask to force the data that is entered to conform to a particular shape/pattern.

Ian PerrySlide : Database Design & Implementation: Implementing Physical Domains Data Type & Field Size Number Default = Long Integer; However, ALWAYS store numbers using the smallest possible Field Size. Byte; whole numbers, positive only, between 0 and 255. Integer; whole numbers between –32,768 and 32,767. Long Integer; whole numbers between –2,147,483,648 and 2,147,483,647. Single; large numbers, both positive & negative, including fractions. Double; very large numbers, both positive & negative, including fractions.

Ian PerrySlide : Database Design & Implementation: Implementing Physical Domains Data Type & Field Size Text from 1 to 255 characters (Default = 50). Domain PersonNames = String, <= 12 Characters; Attribute FirstName: PersonNames; Field Definition Field Name :- FirstName Data Type :- Text Field Size :- 12 Memo Field Size cannot be altered, but can accommodate up to 65,535 characters.

Ian PerrySlide : Database Design & Implementation: Implementing Physical Domains Data Type & Format Date/Time can accommodate Date and Time values between the Years 100 and NB. Format ‘decides’ how a Date is displayed. Domain BirthDates = Date, >= 21 Years before Today; Attribute DOB: BirthDates; Field Definition Field Name :- DOB Data Type :- Date/Time Format :- Long Date

Ian PerrySlide : Database Design & Implementation: Implementing Physical Domains Data Type & Format Currency As with Date/Time fields, Format ‘decides’ how Currency fields are displayed. Domain PayRates = £13,000, £13,500, …, £15,500; Attribute RateOfPay: PayRates; Field Definition Field Name :- RateOfPay Data Type :- Currency Format :- Currency

Ian PerrySlide : Database Design & Implementation: Implementing Physical Domains Validation Rules To control the range of allowable values that can be entered into a field. e.g. Numeric Ranges Domain StaffIdentifiers = ; Attribute StaffID: StaffIdentifiers; Field Definition Field Name :- StaffID Data Type :- Number Field Size :- Integer Validation Rule :- >=1001 And <=1199 Validation Text :- Must be > 1000 And < 1200

Ian PerrySlide : Database Design & Implementation: Implementing Physical Domains Validation Rules e.g. Specific Numbers Domain CourseDurations = 3, 6, 9, 12; Attribute Duration: CourseDurations; Field Definition Field Name :- Duration Data Type :- Number Field Size :- Byte Validation Rule :- 3 Or 6 Or 9 Or 12 Validation Text :- 3, 6, 9 or 12 months only.

Ian PerrySlide : Database Design & Implementation: Implementing Physical Domains Validation Rules e.g. Patterns of Text Domain Titles = Mr, Ms, Mrs, Dr; Attribute Title: Titles; Field Definition Field Name :- Title Data Type :- Text Field Size :- 3 Validation Rule :- “Mr” Or “Ms” Or “Mrs” Or “Dr” Validation Text :- Mr, Ms, Mrs or Dr only.

Ian PerrySlide : Database Design & Implementation: Implementing Physical Domains Input Masks To force the data that is entered to conform to a particular shape/pattern. Domain PersonNames = String, <= 12 Characters; Attribute SurName: PersonNames; Field Definition Field Name :- SurName Data Type :- Text Field Size :- 12 Input Mask :- >L<L??????????

Ian PerrySlide : Database Design & Implementation: Implementing Physical Domains A little bit of Everything! Always attempt to constrain the domain of each Field in as many ways as possible: Domain Titles = Mr, Ms, Mrs, Dr; Attribute Title: Titles; Field Definition Field Name :- Title Data Type :- Text Field Size :- 3 Input Mask :- >L<L? Validation Rule :- “Mr” Or “Ms” Or “Mrs” Or “Dr” Validation Text :- Mr, Ms, Mrs or Dr only.

Ian PerrySlide : Database Design & Implementation: Implementing Physical Domains This Week’s Workshop Implementing Physical Domains in Microsoft Access: Data Types Field Sizes Input Masks Validation Rules Remember: I will be looking carefully for evidence of you attempting to use all of the above, when judging the quality of the Implementation of your Database for Assignment 2.