JENNIFER DILLY FERRIS STATE UNIVERSITY SEPTEMBER 25, 2011 Database Design.

Slides:



Advertisements
Similar presentations
Chapter 5 Normalization of Database Tables
Advertisements

MySQL. To start go to Login details: login: labuser password:macimd15 – There.
THREE KINGS MANAGEMENT SYSTEM Kelvin Canela Care Bear Inc.
Logical Database Design
Mid-term Exam Answer Keys Week 7 Spring I. Multiple Choices Questions Each may have more than one answer (6 x 4 = 24 points total)
Murali Mani SQL DDL and Oracle utilities. Murali Mani Datatypes in SQL INT (or) INTEGER FLOAT (or) REAL DECIMAL (n, m) CHAR (n) VARCHAR (n) DATE, TIME.
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.
SQL Keys and Constraints Justin Maksim. Key Declaration Key constraint defined within the CREATE TABLE command Key can be declared using either the PRIMARY.
The Relational Model Codd (1970): based on set theory Relational model: represents the database as a collection of relations (a table of values --> file)
Database – Part 2a Dr. V.T. Raja Oregon State University.
Relational Database Management System A type of database in which records are stored in relational form is called relational database management system.
Database Architecture The Relational Database Model.
Databases. Objectives Define what a database is. Understand the difference between a flat and relational database Design and create a relational database.
Your Oracle Account UserName is the same as your UWP username Followed Not case sensitive Initial Password: UWPstudent Password is case sensitive.
Chapter 3 Relational Model Chapter 4 in Textbook.
© Pearson Education Limited, Chapter 2 The Relational Model Transparencies.
1 The Relational Data Model, Relational Constraints, and The Relational Algebra.
Chapters 17 & 18 Physical Database Design Methodology.
Irwin/McGraw-Hill Copyright © 2000 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS5th Edition.
SQL Data Definition (CB Chapter 6) CPSC 356 Database Ellen Walker Hiram College (Includes figures from Database Systems by Connolly & Begg, © Addison Wesley.
12/6/2012ISC329 Isabelle Bichindaritz1 The Dreamhome Online Real- estate Company Management System.
Chapter 6 SQL Data Definition Language Chapter 7 in Textbook.
Ihr Logo Fundamentals of Database Systems Fourth Edition El Masri & Navathe Chapter 5 The Relational Data Model and Relational Database Constraints.
Project – Phase II Derive Database Schema from E-R Model DBDL.
Dr. Chen, Business Database Systems JustLee DataBase Referential Integrity Jason C. H. Chen, Ph.D. Professor of MIS School of Business Administration Gonzaga.
Chapter 9 Methodology - Logical Database Design Chapter 16 in Textbook.
Chapter 8 Methodology - Conceptual Database Design Chapter 15 in Textbook.
SQL: DDL John Ortiz Cs.utsa.edu.
SQL: DDL. SQL Statements DDL - data definition language –Defining and modifying data structures (metadata): database, tables, views, etc. DML - data manipulation.
CIS 210 Systems Analysis and Development Week 6 Part II Designing Databases,
Creating Tables and Inserting Records -- Not easy to edit! -- check constraints! Create table test1 ( C1 char(5) primary key, C2 Varchar2(15) not null.
What is a Database?. “A persistent & organised store of data. ” Persistent:  Non-volatile  Using secondary storage Organised:  Data organised into.
1 Chapter 17 Methodology - Local Logical Database Design.
CS 3630 Database Design and Implementation. Database Schema Branch (Bno…) Staff (Sno…Bno) Owner (Ono…) PropertyForRent (Pno…Ono) Renter (Rno…) Viewing.
Chapter 7 SQL: Data Definition Pearson Education © 2009.
1 Principles of Database Systems With Internet and Java Applications Today’s Topic Chapter 7: SQL, the Structured Query Language Instructor’s name and.
Normalizing Your Database CPT 242. Normalization The procedure where the developer analyzes the data and establishes the table structure to create the.
Competitive (Business) Intelligence Systems The Road to Denormalization (starring Charlie Sheen & other Random Celebrities)
2 Copyright © 2006, Oracle. All rights reserved. Managing Schema Objects.
Relational Model E.F. Codd at IBM 1970 Chapter 3 (ed. 7 – Chap. 5)
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-1 David M. Kroenke’s Chapter Six: Transforming Data Models into Database.
Modelling Methodologies Chapter 16, 17, 18. Modeling Methodologies2 Database Design Physical DB design Logical DB design Conceptual DB design Hardware.
Data Definition Language
Engineering Project Management Database David H. Williams CS 610.
Chapter 4 Relational Database, Pivot Charts, and Switchboard.
Introduction Data Modeling and Relational Database Design.
DISCOVERY MACAddress ID1 IPAddress ID2 NetProtocolType DEVICE HostName DeviceType AmtOfCable ConnType VIRTUALIZATION ProfileID MONITORING DateTimeID RefreshRate.
Howard Paul. Sequential Access Index Files and Data File Random Access.
IST 220 – Intro to DB Lecture 4 Database Design thru ER Modeling.
DATA MODELING AND DATABASE DESIGN DATA MODELING AND DATABASE DESIGN Part 2.
SQL constrains and keys. SORTED RESULTS Sort the results by a specified criterion SELECT columns FROM tables WHERE predicates ORDER BY column ASC/DESC;
Oracle Developer. Create Table SQL> create table catalog ( 2 cno varchar2(7), 3 ctitle varchar2(50), 4 primary key (cno)); Table created. SQL> describe.
Databases Introduction - concepts. Concepts of Relational Databases.
Constraints and Views Chap. 3-5 continued (7 th ed. 5-7)
IT 5433 LM3 Relational Data Model. Learning Objectives: List the 5 properties of relations List the properties of a candidate key, primary key and foreign.
IT Course Project First Review Result. General Questions 1.What is ERD? 2.What is varchar, int? 3.What is Not Null, PK, FK? 4.What is frontend, backend?
Test Title Test Content.
Structured Query Language (SQL) DDL
國立臺北科技大學 課程:資料庫系統 Chapter 7 SQL Data Definition.
SQL Relational Database Project
SQL: Schema Definition and Constraints Chapter 6 week 6
CS 3630 Database Design and Implementation
Chapter Design Methodology Pearson Education © 2009.
لغة قواعد البيانات STRUCTURED QUERY LANGUAGE SQL))
CS4222 Principles of Database System
Conceptual Database Design
PostgreSQL S511.
Rob Gleasure robgleasure.com
Database Design: Relational Model
Instructor: Samia arshad
Presentation transcript:

JENNIFER DILLY FERRIS STATE UNIVERSITY SEPTEMBER 25, 2011 Database Design

Table of Contents  Overview of Relational Database Theory  Database design example  Description/overview  Design standards  Rationale  Normalization examples 2

Overview of Relational Database Theory  What are relational databases?  Useful why?  How is structure important? 3

Description Database Design Example - Description  How to start  What data is needed? Foley FoleyID Foley InsertDate DcDate POA MedicalRecord MedRecID LName FName MName DOB Staff StaffID LName FName Title Admission AdmID AdmDate Diagnosis BloodCx BloodCxID BloodCx CollectedDate Result UrineCx UrineCxID UrineCx CollectedDate Result 4

Standards /Rationales Database Design Example – Standards /Rationales  Naming  Atomic data  Keys  Primary (PK)  Foreign (FK) Foley FoleyID PK Foley InsertDate DcDate POA MedicalRecord MedRecID PK LName FName MName DOB Staff StaffID PK LName FName Title Admission AdmID PK AdmDate Diagnosis StaffID FK BloodCx BloodCxID PK BloodCx CollectedDate Result UrineCx UrineCxID PK UrineCx CollectedDate Result 5

Standards /Rationale Database Design Example – Standards /Rationale  Referential integrity  Datatypes  Indexes Foley FoleyID INT PK Foley varchar(20) InsertDate datetime DcDate datetime POA char(1) MedicalRecord MedRecID INT PK LName varchar(30) FName varchar(30) MName varchar(30) DOB datetime Staff StaffID INT PK LName varchar(30) FName varchar(30) Title varchar(30) Admission AdmID INT PK AdmDate datetime Diagnosis varchar(30) AdmissionFoley AdmID INT FK FoleyID INT FK BloodCx BloodCxID INT PK BloodCx varchar(20) CollectedDate datetime Result varchar(30) AdmissionBloodCxUrineCx AdmID INT FK BloodCxID INT FK UrineCxID INT FK UrineCx UrineCxID INT PK UrineCx varchar(20) CollectedDate datetime Result varchar(30) MedRecAdmission MedRecID INT FK AdmID INT FK AdmissionStaff AdmID INT FK StaffID INT FK 6

Examples of Normalization “Key” dependency ViolationCorrection Admission AdmID INT PK AdmDate datetime Diagnosis varchar(30) Admission AdmID INT PK AdmDate datetime Diagnosis varchar(30) Admission AdmIDAdmit DateDiagnosis 90009/08/2011Hypertension 90109/25/2011Heart Attack MedRecAdmission MedRecIDAdmID MedicalRecord MedRecID INT PK LName varchar(30) FName varchar(30) MName varchar(30) DOB datetime MedicalRecord MedRecIDLNameFNameMNameDOB 1520BaseDateAh08/15/1942 MedicalRecord MedRecID INT PK LName varchar(30) FName varchar(30) MName varchar(30) DOB datetime MedRecAdmission MedRecID INT FK AdmID INT FK 7

Examples of Normalization No repeating groups ViolationCorrection Admission AdmID INT PK AdmDate datetime Diagnosis varchar(30) Staff varchar(max) Staff StaffID INT PK LName varchar(30) FName varchar(30) Title varchar(30) Admission AdmID INT PK AdmDate datetime Diagnosis varchar(30) Admission AdmIDAdmDateDiagnosisStaff 90009/08/2011HypertensionJoe Schmo, Larry Parry 90109/25/2011Heart AttackJean Bean 90210/01/2001StrokeJean Bean AdmissionStaff AdmIDStaffID AdmissionStaff AdmID INT FK StaffID INT FK 8

Examples of Normalization No redundant data ViolationCorrection MedicalRecord MedRecID INT PK LName varchar(30) FName varchar(30) MName varchar(30) DOB datetime Admission AdmID INT PK LName FName MName AdmDate datetime Diagnosis varchar(30) StaffID INT FK Admission AdmID INT PK AdmDate datetime Diagnosis varchar(30) StaffID INT FK MedicalRecord MedRecID INT PK LName varchar(30) FName varchar(30) MName varchar(30) DOB datetime MedRecAdmission MedRecID INT FK AdmID INT FK MedRecAdmission MedRecID INT FK AdmID INT FK 9

Summary  Overview of Relational Database Theory  Database design  Standards  Rationale  Normalization examples 10