cs317 file and database...
TRANSCRIPT
September 30, 2018 Sam Siewert
CS317File and Database Systems
Lecture 6-2 – DBMS DevelopmentDream Home Case Study
http://www.hgtv.com/dream-home/front-yard-pictures-from-hgtv-dream-home-2014/pictures/index.html
Reminders…Warm-Up Quiz this Friday/Saturday - for Exam-1 next Week on Mon/Wed– Quiz #2, for Exam #1 on Canvas– Complete Exam #1 - Next Week on Tues, 10/9– Thurs & Friday - Fall Break– Week 8 - Start Part #2 - Normalization, Physical Design, Security,
Scaling, Etc.– Start Thinking about “Your Group Design”
Review for Exam #1 on Thursday, 10/4
Exam #1 on October 9– Knowledge and Concepts (Similar to Quizzes)– Theory, Implementation and Methods (Similar, but Simpler than
Exercises)
Assignment #3 Due this Friday, 10/5, Late Due Date is Monday 10/8 - Prioritize Exam over Exercise!
Sam Siewert 2
DBMS Analysis and Design
Bottom-Up & Top-Down for DreamHome Case Study
Sam Siewert
3
For Discussion…Assignment #3 – Work with Dream Home v. 1.0 to 2.0
1. Create your <name>DHV1 and <name>DHV2 as Needed and Ask for any Privileges you Want Added from Your DBA
2. Real-world Scenario – Update Current Database to New Schema and Reload Old Data Along with New Data
3. Bottom-Up Design focus on Attributes, Attribute Domains, Tables, Keys and Relations, … At DBMS Physical Layer
4. Top-Down Design focus on Information Models using ERD Driven by Concept and Requirements
5. Likely Will Encounter Both Scenarios
Sam Siewert 4
DreamHome v. 1.0Based on Earlier Edition of Connolly-BeggOriginal Source was Schema and Data for Ingres DBInstructor Adapted to Schema Generation (no changes required) and Data Loading (significant changes required) for MySQL
Version 1.0 Schema -http://mercury.pr.erau.edu/~siewerts/cs317/code/Dreamhome-db-v1.0/DreamHome-Tables-Old-Schema.html
Version 1.0 SQL to Create Schema -http://mercury.pr.erau.edu/~siewerts/cs317/code/Dreamhome-db-v1.0/DreamHome_schema_v1.0.sql Sam Siewert 5
DreamHome v. 1.0 DataTab delimited -http://mercury.pr.erau.edu/~siewerts/cs317/code/Dreamhome-db-v1.0/Tab-data/
Excel CSVs -http://mercury.pr.erau.edu/~siewerts/cs317/code/Dreamhome-db-v1.0/CSV-data/
Data Load SQL– Branch.sql– Staff.sql– Property_For_Rent.sql (PropertyForRent)– Renter.sql (Client)– Owners.sql (PrivateOwner)– Viewing.sql– (Registration) – New Table in v. 2.0
Sam Siewert 6
DreamHome SchemaPage 112, Figure 4.3
Chapter 7, Problem 7.21, 7.22
Create from DreamHomeversion 1.0
Can be Used to Verify Examples in Chapter 5 & 6
Sam Siewert 7
DreamHome v. 1.0 on Adminer
6 Tables, Missing Registration Table9 More Differences Compared to DreamHome 2.0 on Page 112, Figure 4-3
Sam Siewert 8
Example 6.24List the name of all clients who have viewed a property, along with any comments supplied.– Results the Same (NULL), but Order is Different from Book– Need to Adapt Query for this View a Bit
SELECT c.clientNo, fName, IName, propertyNo, commentFROM Client c, Viewing vWHERE c.clientNo = v.clientNo
Sam Siewert 9
Example 6.25For each branch office, list the staff number and names of staff who manage properties and the properties that they manage.– Results … Almost Identical other than Attribute names and B3 vs.
B003– Need to Adapt Query for this View a Bit
SELECT s.branchNo, s.staffNo, fName, IName, propertyNoFROM Staff s, PropertyForRent pWHERE s.staffNo = p.staffNoORDER BY s.branchNo, s.staffNo, propertyNo;
Sam Siewert 10
AdaptationMissing Table must be Added and Populated – Only Option
Attribute name changes – Handle with Updated Views or Alter Tables
Table name changes? – Updated Views (Stored Queries) or change Table names
Unload, Update Schema, Update Data, Reload?
Adapt from Existing v. 1.0 with SQL Script?
Sam Siewert 11
Hands-On Dream Home Exercisesor Quiz
DBMS Development LifecycleDreamHome Top-Down
Sam Siewert
12
DreamHome ExercisesChapters 6 & 7 - DML & DDL examples– Queries– Loading Data– Views– Schema Creation and Altering
Chapter 11 - DreamHome Case Study– Centralized– View Integration– Logical Design– Physical Design– Design Life-cycle
Sam Siewert 13