SlideShare a Scribd company logo
1 of 19
Introduction to Computer Science
Databases and SQL
Lecture d
This material (Comp 4 Unit 5) was developed by Oregon Health & Science University, funded by the Department
of Health and Human Services, Office of the National Coordinator for Health Information Technology under
Award Number 90WT0001.
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/.
Databases and SQL
Learning Objectives - 1
• Define and describe the purpose of
databases (Lecture a)
• Define a relational database (Lecture a)
• Describe data modeling and normalization
(Lecture b)
• Describe the structured query language
(SQL) (Lecture c)
2
Databases and SQL
Learning Objectives - 2
• Define the basic data operations for
relational databases and how to
implement them in SQL (Lecture c)
• Design a simple relational database and
create corresponding SQL commands
(Lecture c)
• Examine the structure of a health care
database component (Lecture d)
3
Sample Database Use in VistA
• VistA: Veterans
Health Information
Systems and
Technology
Architecture
• Used at Department
of Veterans Affairs
(VA) health care
facilities Figure 1. VistA screenshot.
(U.S. Dept. of Veterans Affairs, n.d., PD-US)
4
NUMI
• National Utilization Management Integration
(NUMI) supports reviews of clinical care
activities
– Documents patient movements
– Separate from VistA
Figure 2. Stay Movements and Reviews tables in NUMI.
(U.S. Dept. of Veterans Affairs, 2016, PD-US)
5
Workflow
Figure 3. NUMI workflow.
(U.S. Dept. of Veterans Affairs, 2011, PD-US) 6
NUMI Tables
Figure 4. List of tables in NUMI database.
7
Patient Table (Select Elements)
Element Name Data
Type
Primary
Key
Foreign
Key
Comments
PatientID int Yes No ID number for patient
PatientName varchar No No Name that the NUMI system
associates with patient
Sex varchar No No Sex designation associated
with the patient
SSN varchar No No Social Security Number
associated with patient
SiteID smallint Yes Yes ID number for Site
Table 1. Patient table (select elements).
8
Site Table (Select Elements)
Element
Name
Data
Type
Primary
Key
Foreign
Key
Comments
SiteID smallint Yes No ID number for site
SiteName varchar No No Name of site
DisplayName varchar No No Displayed name for site
Table 2. Site table (select elements).
9
ER Diagram
Figure 5. Entity-relationship (ER) Diagram for two tables.
10
Patient Review Table
(Select Elements)
Element Name Data
Type
Primary
Key
Foreign
Key
Comments
PatientReviewID bigint Yes No ID number for Patient Review
PatientID int No Yes ID number for Patient
ReviewDate smalldate
time
No No Date patient was reviewed
UMRAttendingPhysicianID int No Yes ID number for Attending
Physician
PatientStayID bigint No Yes ID number for Patient Stay
CurrentCareLevelID tinyint No Yes ID number for Level of Care
WardLocationID smallint No Yes ID number for Ward Location
Table 3. Patient review table (select elements).
11
ER Diagram
Figure 6. Entity-relationship diagram for seven tables.
12
Patient Review in NUMI
Figure 7. Primary Review screen in NUMI.
(U.S. Dept. of Veterans Affairs, 2011, PD-US) 13
Databases and SQL
Summary – Lecture d
• Viewed an example application: NUMI
• Examined the NUMI database structure
– Tables
– Relationships
14
Databases and SQL
Summary - 1
• Four basic data operations: retrieval,
addition, modification and deletion
• Efficiency of those operations is critical for
efficient use of data
• Information relationships and types are
maintained in a relational database
• Designed a simple database, and
improved it using the normalization
method
15
Databases and SQL
Summary - 2
• Provided introduction to SQL statements
and data types
• Learned basic select, insert, delete, and
update SQL statements
• Examined design of a health care
database
16
Databases and SQL
References – 1 – Lecture d
References
U.S. Department of Veterans Affairs. (2011, September 21). Veterans Health Information
Systems and Technology Architecture.
U.S. Department of Veterans Affairs, Office of Information and Technology. (2011). User
Guide for National Utilization Management Integration (NUMI). (version 1.1.13.1).
U.S. Department of Veterans Affairs, Office of Information and Technology. (2011).
Systems Management Guide for National Utilization Management Integration (NUMI).
(version 1.1.13.1).
Tables
Table 1: Patient Table (select elements). (2011). Public Domain.
Table 2: Site Table (select elements). (2011). Public Domain.
Table 3. Patient review table (select elements). (2011). Public Domain.
Figures
Figure 1: VistA Image. [image on the Internet]. U.S. Department of Veterans Affairs
(n.d.). Retrieved Jan 2012. Available from VistA Imaging Overview
https://www.va.gov/health/imaging/overview.asp at
https://www.va.gov/health/IMAGING/images/CPRS_IMG_comp.png. Public Domain.
17
Databases and SQL
References – 2 – Lecture d
Figures, continued
Figure 2: Stay Movements and Reviews tables in NUMI. [image]. U.S. Department of
Veterans Affairs, Office of Information and Technology. (2016). Figure 43, In User
Guide for National Utilization Management Integration (NUMI). (Version 1.1.14.4).
Retrieved February 27, 2017 from
https://www.va.gov/vdl/documents/HealtheVet/National_Utilization_Management_Inte
gration/numi_user_guide_14_4.docx. Public Domain.
Figure 3: NUMI Workflow. [image]. U.S. Department of Veterans Affairs, Office of
Information and Technology. (2011). In User Guide for National Utilization
Management Integration (NUMI). (Version 1.1.13.1). Public Domain.
Figure 4: List of tables in NUMI database. (2011). Public Domain.
Figure 5: Entity-relationship (ER) Diagram for two tables. (2011). Public Domain.
Figure 6: Entity-relationship diagram for seven tables. (2011). Public Domain.
Figure 7: Primary Review screen in NUMI. [image]. U.S. Department of Veterans Affairs,
Office of Information and Technology. (2011). In User Guide for National Utilization
Management Integration (NUMI). (Version 1.1.13.1). Public Domain.
18
Introduction to Computer Science
Databases and SQL
Lecture d
This material was developed by Oregon
Health & Science University, funded by the
Department of Health and Human Services,
Office of the National Coordinator for Health
Information Technology under Award
Number 90WT0001.
19

More Related Content

Similar to Databases and SQL - Lecture D

Database Management SystemCase Study
Database Management SystemCase StudyDatabase Management SystemCase Study
Database Management SystemCase StudyOllieShoresna
 
User-centered Design of a PHR: Traditional Web Forms vs. Wizard Forms [5 Cr2 ...
User-centered Design of a PHR: Traditional Web Forms vs. Wizard Forms [5 Cr2 ...User-centered Design of a PHR: Traditional Web Forms vs. Wizard Forms [5 Cr2 ...
User-centered Design of a PHR: Traditional Web Forms vs. Wizard Forms [5 Cr2 ...Gunther Eysenbach
 
Comp10 unit3a lecture_slides
Comp10 unit3a lecture_slidesComp10 unit3a lecture_slides
Comp10 unit3a lecture_slidesCMDLMS
 
Strengths and Weakness of Informatics.docx
Strengths and Weakness of Informatics.docxStrengths and Weakness of Informatics.docx
Strengths and Weakness of Informatics.docxwrite5
 
National Training on Safe Hospitals - Sri Lanka - Worksheets Module 2 - 14Sep...
National Training on Safe Hospitals - Sri Lanka - Worksheets Module 2 - 14Sep...National Training on Safe Hospitals - Sri Lanka - Worksheets Module 2 - 14Sep...
National Training on Safe Hospitals - Sri Lanka - Worksheets Module 2 - 14Sep...Reynaldo Joson
 
Comp8 unit1a lecture_slides
Comp8 unit1a lecture_slidesComp8 unit1a lecture_slides
Comp8 unit1a lecture_slidesCMDLMS
 
Lecture C
Lecture CLecture C
Lecture CCMDLMS
 
IRJET- Data Analysis and Solution Prediction using Elasticsearch in Healt...
IRJET-  	  Data Analysis and Solution Prediction using Elasticsearch in Healt...IRJET-  	  Data Analysis and Solution Prediction using Elasticsearch in Healt...
IRJET- Data Analysis and Solution Prediction using Elasticsearch in Healt...IRJET Journal
 
Search System for Medical Images
Search System for Medical ImagesSearch System for Medical Images
Search System for Medical ImagesIRJET Journal
 
Mining of Prevalent Ailments in a Health Database Using Fp-Growth Algorithm
Mining of Prevalent Ailments in a Health Database Using Fp-Growth AlgorithmMining of Prevalent Ailments in a Health Database Using Fp-Growth Algorithm
Mining of Prevalent Ailments in a Health Database Using Fp-Growth AlgorithmWaqas Tariq
 
Mining of Prevalent Ailments in a Health Database Using Fp-Growth Algorithm
Mining of Prevalent Ailments in a Health Database Using Fp-Growth AlgorithmMining of Prevalent Ailments in a Health Database Using Fp-Growth Algorithm
Mining of Prevalent Ailments in a Health Database Using Fp-Growth AlgorithmWaqas Tariq
 
ANALYZABILITY METRIC FOR MAINTAINABILITY OF OBJECT ORIENTED SOFTWARE SYSTEM
ANALYZABILITY METRIC FOR MAINTAINABILITY OF OBJECT ORIENTED SOFTWARE SYSTEMANALYZABILITY METRIC FOR MAINTAINABILITY OF OBJECT ORIENTED SOFTWARE SYSTEM
ANALYZABILITY METRIC FOR MAINTAINABILITY OF OBJECT ORIENTED SOFTWARE SYSTEMIAEME Publication
 
Hospital Management System
Hospital Management SystemHospital Management System
Hospital Management SystemRANJIT SINGH
 

Similar to Databases and SQL - Lecture D (20)

Database Management SystemCase Study
Database Management SystemCase StudyDatabase Management SystemCase Study
Database Management SystemCase Study
 
User-centered Design of a PHR: Traditional Web Forms vs. Wizard Forms [5 Cr2 ...
User-centered Design of a PHR: Traditional Web Forms vs. Wizard Forms [5 Cr2 ...User-centered Design of a PHR: Traditional Web Forms vs. Wizard Forms [5 Cr2 ...
User-centered Design of a PHR: Traditional Web Forms vs. Wizard Forms [5 Cr2 ...
 
Comp10 unit3a lecture_slides
Comp10 unit3a lecture_slidesComp10 unit3a lecture_slides
Comp10 unit3a lecture_slides
 
Strengths and Weakness of Informatics.docx
Strengths and Weakness of Informatics.docxStrengths and Weakness of Informatics.docx
Strengths and Weakness of Informatics.docx
 
National Training on Safe Hospitals - Sri Lanka - Worksheets Module 2 - 14Sep...
National Training on Safe Hospitals - Sri Lanka - Worksheets Module 2 - 14Sep...National Training on Safe Hospitals - Sri Lanka - Worksheets Module 2 - 14Sep...
National Training on Safe Hospitals - Sri Lanka - Worksheets Module 2 - 14Sep...
 
Cal Essay
Cal EssayCal Essay
Cal Essay
 
Comp8 unit1a lecture_slides
Comp8 unit1a lecture_slidesComp8 unit1a lecture_slides
Comp8 unit1a lecture_slides
 
Lecture C
Lecture CLecture C
Lecture C
 
Oo tech
Oo techOo tech
Oo tech
 
Database design
Database designDatabase design
Database design
 
IRJET- Data Analysis and Solution Prediction using Elasticsearch in Healt...
IRJET-  	  Data Analysis and Solution Prediction using Elasticsearch in Healt...IRJET-  	  Data Analysis and Solution Prediction using Elasticsearch in Healt...
IRJET- Data Analysis and Solution Prediction using Elasticsearch in Healt...
 
Search System for Medical Images
Search System for Medical ImagesSearch System for Medical Images
Search System for Medical Images
 
pentaho_usability_presentation
pentaho_usability_presentationpentaho_usability_presentation
pentaho_usability_presentation
 
Mining of Prevalent Ailments in a Health Database Using Fp-Growth Algorithm
Mining of Prevalent Ailments in a Health Database Using Fp-Growth AlgorithmMining of Prevalent Ailments in a Health Database Using Fp-Growth Algorithm
Mining of Prevalent Ailments in a Health Database Using Fp-Growth Algorithm
 
Mining of Prevalent Ailments in a Health Database Using Fp-Growth Algorithm
Mining of Prevalent Ailments in a Health Database Using Fp-Growth AlgorithmMining of Prevalent Ailments in a Health Database Using Fp-Growth Algorithm
Mining of Prevalent Ailments in a Health Database Using Fp-Growth Algorithm
 
ANALYZABILITY METRIC FOR MAINTAINABILITY OF OBJECT ORIENTED SOFTWARE SYSTEM
ANALYZABILITY METRIC FOR MAINTAINABILITY OF OBJECT ORIENTED SOFTWARE SYSTEMANALYZABILITY METRIC FOR MAINTAINABILITY OF OBJECT ORIENTED SOFTWARE SYSTEM
ANALYZABILITY METRIC FOR MAINTAINABILITY OF OBJECT ORIENTED SOFTWARE SYSTEM
 
2
22
2
 
Hospital Management System
Hospital Management SystemHospital Management System
Hospital Management System
 
ASAD Project Report
ASAD Project ReportASAD Project Report
ASAD Project Report
 
Showcase 2
Showcase 2Showcase 2
Showcase 2
 

More from CMDLearning

What is Health Informatics - Lecture B
What is Health Informatics - Lecture BWhat is Health Informatics - Lecture B
What is Health Informatics - Lecture BCMDLearning
 
Evolution of and Trends in Health Care - Lecture D
Evolution of and Trends in Health Care - Lecture DEvolution of and Trends in Health Care - Lecture D
Evolution of and Trends in Health Care - Lecture DCMDLearning
 
Evolution of and Trends in Health Care - Lecture C
Evolution of and Trends in Health Care - Lecture CEvolution of and Trends in Health Care - Lecture C
Evolution of and Trends in Health Care - Lecture CCMDLearning
 
Evolution of and Trends in Health Care - Lecture B
Evolution of and Trends in Health Care - Lecture BEvolution of and Trends in Health Care - Lecture B
Evolution of and Trends in Health Care - Lecture BCMDLearning
 
Evolution of and Trends in Health Care - Lecture A
Evolution of and Trends in Health Care - Lecture AEvolution of and Trends in Health Care - Lecture A
Evolution of and Trends in Health Care - Lecture ACMDLearning
 
Public Healthcare (Part 2) Lecture C
Public Healthcare (Part 2) Lecture CPublic Healthcare (Part 2) Lecture C
Public Healthcare (Part 2) Lecture CCMDLearning
 
Public Healthcare (Part 2) Lecture B
Public Healthcare (Part 2) Lecture BPublic Healthcare (Part 2) Lecture B
Public Healthcare (Part 2) Lecture BCMDLearning
 
Public Healthcare (Part 2) Lecture A
Public Healthcare (Part 2) Lecture APublic Healthcare (Part 2) Lecture A
Public Healthcare (Part 2) Lecture ACMDLearning
 
Public Health (Part 1) Lecture C
Public Health (Part 1) Lecture CPublic Health (Part 1) Lecture C
Public Health (Part 1) Lecture CCMDLearning
 
Public Health (Part 1) Lecture B
Public Health (Part 1) Lecture BPublic Health (Part 1) Lecture B
Public Health (Part 1) Lecture BCMDLearning
 
Public Health (Part 1) Lecture A
Public Health (Part 1) Lecture APublic Health (Part 1) Lecture A
Public Health (Part 1) Lecture ACMDLearning
 
Regulating Healthcare - Lecture E
Regulating Healthcare - Lecture ERegulating Healthcare - Lecture E
Regulating Healthcare - Lecture ECMDLearning
 
Regulating Healthcare - Lecture D
Regulating Healthcare - Lecture DRegulating Healthcare - Lecture D
Regulating Healthcare - Lecture DCMDLearning
 
Regulating Healthcare - Lecture C
Regulating Healthcare - Lecture CRegulating Healthcare - Lecture C
Regulating Healthcare - Lecture CCMDLearning
 
Regulating Healthcare - Lecture A
Regulating Healthcare - Lecture ARegulating Healthcare - Lecture A
Regulating Healthcare - Lecture ACMDLearning
 
Regulating Healthcare - Lecture B
Regulating Healthcare - Lecture BRegulating Healthcare - Lecture B
Regulating Healthcare - Lecture BCMDLearning
 
Financing Healthcare (Part 2) Lecture C
Financing Healthcare (Part 2) Lecture CFinancing Healthcare (Part 2) Lecture C
Financing Healthcare (Part 2) Lecture CCMDLearning
 
Financing Healthcare (Part 2) Lecture B
Financing Healthcare (Part 2) Lecture BFinancing Healthcare (Part 2) Lecture B
Financing Healthcare (Part 2) Lecture BCMDLearning
 
Financing Healthcare (Part 2) Lecture A
Financing Healthcare (Part 2) Lecture AFinancing Healthcare (Part 2) Lecture A
Financing Healthcare (Part 2) Lecture ACMDLearning
 
Financing Healthcare (Part 2) Lecture D
Financing Healthcare (Part 2) Lecture DFinancing Healthcare (Part 2) Lecture D
Financing Healthcare (Part 2) Lecture DCMDLearning
 

More from CMDLearning (20)

What is Health Informatics - Lecture B
What is Health Informatics - Lecture BWhat is Health Informatics - Lecture B
What is Health Informatics - Lecture B
 
Evolution of and Trends in Health Care - Lecture D
Evolution of and Trends in Health Care - Lecture DEvolution of and Trends in Health Care - Lecture D
Evolution of and Trends in Health Care - Lecture D
 
Evolution of and Trends in Health Care - Lecture C
Evolution of and Trends in Health Care - Lecture CEvolution of and Trends in Health Care - Lecture C
Evolution of and Trends in Health Care - Lecture C
 
Evolution of and Trends in Health Care - Lecture B
Evolution of and Trends in Health Care - Lecture BEvolution of and Trends in Health Care - Lecture B
Evolution of and Trends in Health Care - Lecture B
 
Evolution of and Trends in Health Care - Lecture A
Evolution of and Trends in Health Care - Lecture AEvolution of and Trends in Health Care - Lecture A
Evolution of and Trends in Health Care - Lecture A
 
Public Healthcare (Part 2) Lecture C
Public Healthcare (Part 2) Lecture CPublic Healthcare (Part 2) Lecture C
Public Healthcare (Part 2) Lecture C
 
Public Healthcare (Part 2) Lecture B
Public Healthcare (Part 2) Lecture BPublic Healthcare (Part 2) Lecture B
Public Healthcare (Part 2) Lecture B
 
Public Healthcare (Part 2) Lecture A
Public Healthcare (Part 2) Lecture APublic Healthcare (Part 2) Lecture A
Public Healthcare (Part 2) Lecture A
 
Public Health (Part 1) Lecture C
Public Health (Part 1) Lecture CPublic Health (Part 1) Lecture C
Public Health (Part 1) Lecture C
 
Public Health (Part 1) Lecture B
Public Health (Part 1) Lecture BPublic Health (Part 1) Lecture B
Public Health (Part 1) Lecture B
 
Public Health (Part 1) Lecture A
Public Health (Part 1) Lecture APublic Health (Part 1) Lecture A
Public Health (Part 1) Lecture A
 
Regulating Healthcare - Lecture E
Regulating Healthcare - Lecture ERegulating Healthcare - Lecture E
Regulating Healthcare - Lecture E
 
Regulating Healthcare - Lecture D
Regulating Healthcare - Lecture DRegulating Healthcare - Lecture D
Regulating Healthcare - Lecture D
 
Regulating Healthcare - Lecture C
Regulating Healthcare - Lecture CRegulating Healthcare - Lecture C
Regulating Healthcare - Lecture C
 
Regulating Healthcare - Lecture A
Regulating Healthcare - Lecture ARegulating Healthcare - Lecture A
Regulating Healthcare - Lecture A
 
Regulating Healthcare - Lecture B
Regulating Healthcare - Lecture BRegulating Healthcare - Lecture B
Regulating Healthcare - Lecture B
 
Financing Healthcare (Part 2) Lecture C
Financing Healthcare (Part 2) Lecture CFinancing Healthcare (Part 2) Lecture C
Financing Healthcare (Part 2) Lecture C
 
Financing Healthcare (Part 2) Lecture B
Financing Healthcare (Part 2) Lecture BFinancing Healthcare (Part 2) Lecture B
Financing Healthcare (Part 2) Lecture B
 
Financing Healthcare (Part 2) Lecture A
Financing Healthcare (Part 2) Lecture AFinancing Healthcare (Part 2) Lecture A
Financing Healthcare (Part 2) Lecture A
 
Financing Healthcare (Part 2) Lecture D
Financing Healthcare (Part 2) Lecture DFinancing Healthcare (Part 2) Lecture D
Financing Healthcare (Part 2) Lecture D
 

Recently uploaded

nagpur Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
nagpur Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meetnagpur Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
nagpur Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetCall Girls Service
 
VIP Call Girls Noida Jhanvi 9711199171 Best VIP Call Girls Near Me
VIP Call Girls Noida Jhanvi 9711199171 Best VIP Call Girls Near MeVIP Call Girls Noida Jhanvi 9711199171 Best VIP Call Girls Near Me
VIP Call Girls Noida Jhanvi 9711199171 Best VIP Call Girls Near Memriyagarg453
 
Best Lahore Escorts 😮‍💨03250114445 || VIP escorts in Lahore
Best Lahore Escorts 😮‍💨03250114445 || VIP escorts in LahoreBest Lahore Escorts 😮‍💨03250114445 || VIP escorts in Lahore
Best Lahore Escorts 😮‍💨03250114445 || VIP escorts in LahoreDeny Daniel
 
Hubli Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Hubli Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetHubli Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Hubli Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetCall Girls Service
 
Ernakulam Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Ernakulam Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetErnakulam Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Ernakulam Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetCall Girls Chandigarh
 
coimbatore Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
coimbatore Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meetcoimbatore Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
coimbatore Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetCall Girls Service
 
❤️Call girls in Jalandhar ☎️9876848877☎️ Call Girl service in Jalandhar☎️ Jal...
❤️Call girls in Jalandhar ☎️9876848877☎️ Call Girl service in Jalandhar☎️ Jal...❤️Call girls in Jalandhar ☎️9876848877☎️ Call Girl service in Jalandhar☎️ Jal...
❤️Call girls in Jalandhar ☎️9876848877☎️ Call Girl service in Jalandhar☎️ Jal...chandigarhentertainm
 
Call Girl Gorakhpur * 8250192130 Service starts from just ₹9999 ✅
Call Girl Gorakhpur * 8250192130 Service starts from just ₹9999 ✅Call Girl Gorakhpur * 8250192130 Service starts from just ₹9999 ✅
Call Girl Gorakhpur * 8250192130 Service starts from just ₹9999 ✅gragmanisha42
 
dehradun Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
dehradun Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meetdehradun Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
dehradun Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetCall Girls Service
 
dhanbad Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
dhanbad Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meetdhanbad Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
dhanbad Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetCall Girls Service
 
Independent Call Girls Hyderabad 💋 9352988975 💋 Genuine WhatsApp Number for R...
Independent Call Girls Hyderabad 💋 9352988975 💋 Genuine WhatsApp Number for R...Independent Call Girls Hyderabad 💋 9352988975 💋 Genuine WhatsApp Number for R...
Independent Call Girls Hyderabad 💋 9352988975 💋 Genuine WhatsApp Number for R...Ahmedabad Call Girls
 
Bareilly Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Bareilly Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetBareilly Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Bareilly Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetCall Girls Service
 
bhopal Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
bhopal Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meetbhopal Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
bhopal Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetCall Girls Service
 
bhubaneswar Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
bhubaneswar Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meetbhubaneswar Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
bhubaneswar Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetCall Girls Service
 
Vip Call Girls Makarba 👙 6367187148 👙 Genuine WhatsApp Number for Real Meet
Vip Call Girls Makarba 👙 6367187148 👙 Genuine WhatsApp Number for Real MeetVip Call Girls Makarba 👙 6367187148 👙 Genuine WhatsApp Number for Real Meet
Vip Call Girls Makarba 👙 6367187148 👙 Genuine WhatsApp Number for Real MeetAhmedabad Call Girls
 
ooty Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
ooty Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meetooty Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
ooty Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetCall Girls Service
 
Dehradun Call Girls 8854095900 Call Girl in Dehradun Uttrakhand
Dehradun Call Girls 8854095900 Call Girl in Dehradun  UttrakhandDehradun Call Girls 8854095900 Call Girl in Dehradun  Uttrakhand
Dehradun Call Girls 8854095900 Call Girl in Dehradun Uttrakhandindiancallgirl4rent
 
Thrissur Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Thrissur Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetThrissur Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Thrissur Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetCall Girls Service
 
Call Girls Patiala Just Call 8250077686 Top Class Call Girl Service Available
Call Girls Patiala Just Call 8250077686 Top Class Call Girl Service AvailableCall Girls Patiala Just Call 8250077686 Top Class Call Girl Service Available
Call Girls Patiala Just Call 8250077686 Top Class Call Girl Service AvailableDipal Arora
 

Recently uploaded (20)

nagpur Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
nagpur Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meetnagpur Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
nagpur Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
 
VIP Call Girls Noida Jhanvi 9711199171 Best VIP Call Girls Near Me
VIP Call Girls Noida Jhanvi 9711199171 Best VIP Call Girls Near MeVIP Call Girls Noida Jhanvi 9711199171 Best VIP Call Girls Near Me
VIP Call Girls Noida Jhanvi 9711199171 Best VIP Call Girls Near Me
 
Best Lahore Escorts 😮‍💨03250114445 || VIP escorts in Lahore
Best Lahore Escorts 😮‍💨03250114445 || VIP escorts in LahoreBest Lahore Escorts 😮‍💨03250114445 || VIP escorts in Lahore
Best Lahore Escorts 😮‍💨03250114445 || VIP escorts in Lahore
 
Hubli Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Hubli Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetHubli Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Hubli Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
 
Ernakulam Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Ernakulam Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetErnakulam Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Ernakulam Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
 
coimbatore Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
coimbatore Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meetcoimbatore Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
coimbatore Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
 
❤️Call girls in Jalandhar ☎️9876848877☎️ Call Girl service in Jalandhar☎️ Jal...
❤️Call girls in Jalandhar ☎️9876848877☎️ Call Girl service in Jalandhar☎️ Jal...❤️Call girls in Jalandhar ☎️9876848877☎️ Call Girl service in Jalandhar☎️ Jal...
❤️Call girls in Jalandhar ☎️9876848877☎️ Call Girl service in Jalandhar☎️ Jal...
 
Call Girl Gorakhpur * 8250192130 Service starts from just ₹9999 ✅
Call Girl Gorakhpur * 8250192130 Service starts from just ₹9999 ✅Call Girl Gorakhpur * 8250192130 Service starts from just ₹9999 ✅
Call Girl Gorakhpur * 8250192130 Service starts from just ₹9999 ✅
 
dehradun Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
dehradun Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meetdehradun Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
dehradun Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
 
dhanbad Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
dhanbad Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meetdhanbad Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
dhanbad Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
 
Independent Call Girls Hyderabad 💋 9352988975 💋 Genuine WhatsApp Number for R...
Independent Call Girls Hyderabad 💋 9352988975 💋 Genuine WhatsApp Number for R...Independent Call Girls Hyderabad 💋 9352988975 💋 Genuine WhatsApp Number for R...
Independent Call Girls Hyderabad 💋 9352988975 💋 Genuine WhatsApp Number for R...
 
Bareilly Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Bareilly Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetBareilly Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Bareilly Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
 
bhopal Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
bhopal Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meetbhopal Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
bhopal Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
 
bhubaneswar Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
bhubaneswar Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meetbhubaneswar Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
bhubaneswar Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
 
9316020077📞Goa Call Girls Numbers, Call Girls Whatsapp Numbers Goa
9316020077📞Goa  Call Girls  Numbers, Call Girls  Whatsapp Numbers Goa9316020077📞Goa  Call Girls  Numbers, Call Girls  Whatsapp Numbers Goa
9316020077📞Goa Call Girls Numbers, Call Girls Whatsapp Numbers Goa
 
Vip Call Girls Makarba 👙 6367187148 👙 Genuine WhatsApp Number for Real Meet
Vip Call Girls Makarba 👙 6367187148 👙 Genuine WhatsApp Number for Real MeetVip Call Girls Makarba 👙 6367187148 👙 Genuine WhatsApp Number for Real Meet
Vip Call Girls Makarba 👙 6367187148 👙 Genuine WhatsApp Number for Real Meet
 
ooty Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
ooty Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meetooty Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
ooty Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
 
Dehradun Call Girls 8854095900 Call Girl in Dehradun Uttrakhand
Dehradun Call Girls 8854095900 Call Girl in Dehradun  UttrakhandDehradun Call Girls 8854095900 Call Girl in Dehradun  Uttrakhand
Dehradun Call Girls 8854095900 Call Girl in Dehradun Uttrakhand
 
Thrissur Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Thrissur Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetThrissur Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Thrissur Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
 
Call Girls Patiala Just Call 8250077686 Top Class Call Girl Service Available
Call Girls Patiala Just Call 8250077686 Top Class Call Girl Service AvailableCall Girls Patiala Just Call 8250077686 Top Class Call Girl Service Available
Call Girls Patiala Just Call 8250077686 Top Class Call Girl Service Available
 

Databases and SQL - Lecture D

  • 1. Introduction to Computer Science Databases and SQL Lecture d This material (Comp 4 Unit 5) was developed by Oregon Health & Science University, funded by the Department of Health and Human Services, Office of the National Coordinator for Health Information Technology under Award Number 90WT0001. This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/.
  • 2. Databases and SQL Learning Objectives - 1 • Define and describe the purpose of databases (Lecture a) • Define a relational database (Lecture a) • Describe data modeling and normalization (Lecture b) • Describe the structured query language (SQL) (Lecture c) 2
  • 3. Databases and SQL Learning Objectives - 2 • Define the basic data operations for relational databases and how to implement them in SQL (Lecture c) • Design a simple relational database and create corresponding SQL commands (Lecture c) • Examine the structure of a health care database component (Lecture d) 3
  • 4. Sample Database Use in VistA • VistA: Veterans Health Information Systems and Technology Architecture • Used at Department of Veterans Affairs (VA) health care facilities Figure 1. VistA screenshot. (U.S. Dept. of Veterans Affairs, n.d., PD-US) 4
  • 5. NUMI • National Utilization Management Integration (NUMI) supports reviews of clinical care activities – Documents patient movements – Separate from VistA Figure 2. Stay Movements and Reviews tables in NUMI. (U.S. Dept. of Veterans Affairs, 2016, PD-US) 5
  • 6. Workflow Figure 3. NUMI workflow. (U.S. Dept. of Veterans Affairs, 2011, PD-US) 6
  • 7. NUMI Tables Figure 4. List of tables in NUMI database. 7
  • 8. Patient Table (Select Elements) Element Name Data Type Primary Key Foreign Key Comments PatientID int Yes No ID number for patient PatientName varchar No No Name that the NUMI system associates with patient Sex varchar No No Sex designation associated with the patient SSN varchar No No Social Security Number associated with patient SiteID smallint Yes Yes ID number for Site Table 1. Patient table (select elements). 8
  • 9. Site Table (Select Elements) Element Name Data Type Primary Key Foreign Key Comments SiteID smallint Yes No ID number for site SiteName varchar No No Name of site DisplayName varchar No No Displayed name for site Table 2. Site table (select elements). 9
  • 10. ER Diagram Figure 5. Entity-relationship (ER) Diagram for two tables. 10
  • 11. Patient Review Table (Select Elements) Element Name Data Type Primary Key Foreign Key Comments PatientReviewID bigint Yes No ID number for Patient Review PatientID int No Yes ID number for Patient ReviewDate smalldate time No No Date patient was reviewed UMRAttendingPhysicianID int No Yes ID number for Attending Physician PatientStayID bigint No Yes ID number for Patient Stay CurrentCareLevelID tinyint No Yes ID number for Level of Care WardLocationID smallint No Yes ID number for Ward Location Table 3. Patient review table (select elements). 11
  • 12. ER Diagram Figure 6. Entity-relationship diagram for seven tables. 12
  • 13. Patient Review in NUMI Figure 7. Primary Review screen in NUMI. (U.S. Dept. of Veterans Affairs, 2011, PD-US) 13
  • 14. Databases and SQL Summary – Lecture d • Viewed an example application: NUMI • Examined the NUMI database structure – Tables – Relationships 14
  • 15. Databases and SQL Summary - 1 • Four basic data operations: retrieval, addition, modification and deletion • Efficiency of those operations is critical for efficient use of data • Information relationships and types are maintained in a relational database • Designed a simple database, and improved it using the normalization method 15
  • 16. Databases and SQL Summary - 2 • Provided introduction to SQL statements and data types • Learned basic select, insert, delete, and update SQL statements • Examined design of a health care database 16
  • 17. Databases and SQL References – 1 – Lecture d References U.S. Department of Veterans Affairs. (2011, September 21). Veterans Health Information Systems and Technology Architecture. U.S. Department of Veterans Affairs, Office of Information and Technology. (2011). User Guide for National Utilization Management Integration (NUMI). (version 1.1.13.1). U.S. Department of Veterans Affairs, Office of Information and Technology. (2011). Systems Management Guide for National Utilization Management Integration (NUMI). (version 1.1.13.1). Tables Table 1: Patient Table (select elements). (2011). Public Domain. Table 2: Site Table (select elements). (2011). Public Domain. Table 3. Patient review table (select elements). (2011). Public Domain. Figures Figure 1: VistA Image. [image on the Internet]. U.S. Department of Veterans Affairs (n.d.). Retrieved Jan 2012. Available from VistA Imaging Overview https://www.va.gov/health/imaging/overview.asp at https://www.va.gov/health/IMAGING/images/CPRS_IMG_comp.png. Public Domain. 17
  • 18. Databases and SQL References – 2 – Lecture d Figures, continued Figure 2: Stay Movements and Reviews tables in NUMI. [image]. U.S. Department of Veterans Affairs, Office of Information and Technology. (2016). Figure 43, In User Guide for National Utilization Management Integration (NUMI). (Version 1.1.14.4). Retrieved February 27, 2017 from https://www.va.gov/vdl/documents/HealtheVet/National_Utilization_Management_Inte gration/numi_user_guide_14_4.docx. Public Domain. Figure 3: NUMI Workflow. [image]. U.S. Department of Veterans Affairs, Office of Information and Technology. (2011). In User Guide for National Utilization Management Integration (NUMI). (Version 1.1.13.1). Public Domain. Figure 4: List of tables in NUMI database. (2011). Public Domain. Figure 5: Entity-relationship (ER) Diagram for two tables. (2011). Public Domain. Figure 6: Entity-relationship diagram for seven tables. (2011). Public Domain. Figure 7: Primary Review screen in NUMI. [image]. U.S. Department of Veterans Affairs, Office of Information and Technology. (2011). In User Guide for National Utilization Management Integration (NUMI). (Version 1.1.13.1). Public Domain. 18
  • 19. Introduction to Computer Science Databases and SQL Lecture d This material was developed by Oregon Health & Science University, funded by the Department of Health and Human Services, Office of the National Coordinator for Health Information Technology under Award Number 90WT0001. 19

Editor's Notes

  1. Welcome to Introduction to Computer Science: Databases and SQL. This is lecture d. The component, Introduction to Computer Science, is a basic overview of computer architecture; data organization, representation and structure; structure of programming languages; networking and data communication. It also includes the basic terminology of computing.
  2. The learning objectives for Databases and SQL are to: Define and describe the purpose of databases Define a relational database Describe data modeling and normalization Describe the structured query language, or SQL
  3. Define the basic data operations for relational databases and how to implement them in SQL Design a simple relational database and create corresponding SQL commands Examine the structure of a health care database component
  4. 4
  5. 5
  6. 6
  7. 7
  8. This discussion will begin with the center of the health care system – the patient. Note that for this table, and for all the tables that follow, the examples are from the U.S. Department of Veterans Affairs, or VA, Systems Management Guide for National Utilization Management Integration, or NUMI, written by the architects for system developers and maintainers. To simplify these examples, only a few tables from the NUMI application and only a select number of elements or fields from each table will be presented, which should provide a feel for the database design and relationships without getting lost in too many details. For each table, the column information shows the element, or column name, the data type for the VA database, whether the column is a primary or foreign key, and comments about that element. Each row contains information about this data element in the corresponding table. For the Patient table, there is information for about five of the elements in the table. You can see the VA System Management Guide for details about all fifteen elements. The first element, PatientID, has an int data type. This field is the primary key for the table and represents the ID number for the patient. Note that the element name is in bold as it is the primary key for the table. The next three elements are varchar fields that store the name, sex, and social security number of a patient and are not primary or foreign keys. Sex is often stored as a single character in medical applications, instead of as a varchar. The final field is another integer that stores the ID number for the site. The datatype is referred to as smallint, which is an integer that uses fewer numbers of bits than a regular int. This ID is a primary key and foreign key from the site’s table.
  9. This slide shows select elements from the Site table. The SiteID field, which is the primary key for the table, serves as a relationship between the Patient table and the Site table. The other two fields relate to the name of the site--one is the full name and the other is the displayed name for the site in NUMI; this allows for a different variant of the name, for example, an abbreviation, to be displayed within the NUMI application.
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. References slide. No audio.
  18. References slide. No audio.
  19. No audio.