Download presentation
Presentation is loading. Please wait.
Published byMorgan Preston Modified over 8 years ago
1
By Justin LeBourdais
2
Description Designed for my mother’s business Small updateable database for her clients and employees Designed for ease of use, most code that needs to be run would already created.
3
Outcomes Database that works Easy to use, database doesn’t seem overly complex All SQL to create and to update is available in txt files
4
Problems Data model and database has a few incorrect relationships Didn’t follow naming convention correctly, used own method.
5
Lessons Learned Follow conventions! Data models are important. If it is wrong, you will have trouble later on Keep notes and all SQL code that you use. It will save you lots of work later.
6
Incorrect Model
7
Better Model
8
Example Code USE capstone; SELECT CAST(a.FirstName + ' ' + a.LastName AS CHAR(20)) "Employee Name", CAST(ahw.Week AS SMALLDATETIME) "Work Week", CAST(ahw.sunday + ahw.monday + ahw.tuesday + ahw.wednesday + ahw.thursday + ahw.friday + ahw.saturday AS CHAR(5)) "Hours worked", CAST (((ahw.sunday + ahw.monday + ahw.tuesday + ahw.wednesday + ahw.thursday + ahw.friday + ahw.saturday)* a.HourlyRate) AS DECIMAL(7,2)) "Pay" FROM attendant_hours_worked ahw, attendants a WHERE ahw.week ='2009-04-05' AND ahw.AttendantID = a.AttendantID;
9
Example Output
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.