Download presentation
Presentation is loading. Please wait.
Published byBlaze Jacobs Modified over 9 years ago
2
JENNIFER DILLY FERRIS STATE UNIVERSITY SEPTEMBER 25, 2011 Database Design
3
Table of Contents Overview of Relational Database Theory Database design example Description/overview Design standards Rationale Normalization examples 2
4
Overview of Relational Database Theory What are relational databases? Useful why? How is structure important? 3
5
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
6
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
7
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
8
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 1520900 901 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
9
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 90001 90040 90150 90250 AdmissionStaff AdmID INT FK StaffID INT FK 8
10
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
11
Summary Overview of Relational Database Theory Database design Standards Rationale Normalization examples 10
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.