Artificial intelligence in the post-deep learning era
Lezlee Coulter SQl Server Portfolio
1. SQL Server 2008R2
Lezlee Coulter
lezlee99@comcast.net
linkedin.com/pub/lezlee-coulter
443-871-5557
2. Table of Contents
Introduction Why SetFocus?
Piggy Bank
Developing and Implementing a SQL Server Database for a Banking Institution
T-SQL Queries
Sample T-SQL Queries to include Merge, Recursive CTE’s, Pivot, Cross Apply
Mini-AdventureWorks
Implentation of Database Development, SSIS Packages & SSRS Reports
Putting It All Together
BLOCK FLIX
Adhering to RDBMS core concepts through design and development of a database for a
movie rental company.
Import and export of data to and from central, store and kiosk databases through SSIS.
Utilizing SSRS to create and distribute marketing & finance reports.
3. Why SetFocus?
Drawn to the intense nature of the course work and the high caliber
instruction, I came to SetFocus to start on a new career path. “I want to
live and breathe SQL Server,” was my request. They did not disappoint.
The ten-week SQL Master’s Program delivered real world application of
the skills needed in today’s work force. From Normalization to
Reporting, from Stored Procedures to Integration, SetFocus provided me
with an invaluable education.
But who am I? That’s what you really want to know. I am a person who
decided that life is too short not do something I love. I wanted to know
how they pull up my balance at the bank or find my information when I
swipe my card at the grocery store. But, I wanted to be able to do it
myself. That’s why I’m here. That’s why I chose this path.
I’ve included some samples of my work and I hope you enjoy them.
Please feel free to contact me with any questions.
Lezlee Coulter
4. SQL Server Master’s Curriculum
RDBMS Concepts
MS SQL Server 2008R2 T-SQL
Implementing a Microsoft SQL Server 2008R2
Database
Advanced T-SQL Querying and Programming
Microsoft SQL Server 2008R2 Integration
Services
Microsoft SQL Server 2008R2 Reporting
Services
5. Piggy Bank
Following our RDBMS and T-SQL instruction, we were
given a banking scenario and data that the bank may
want to utilize.
Normalize the data through Codd’s rules.
Write Stored Procedures to create customers and
accounts.
Write Stored Procedures to initialize and complete
standard banking transactions.
Create Views to access ATM and statement balances
and transaction history.
6.
7. Transfer Funds
• Declare proper Accounts for Transfer
• Declare proper Balances based on AccountID
• Withdraw and Update Account
• Deposit and Update Account
8. • Verify opening balance based on
Business Requirement
• Ensure proper data entry
Using SCOPE_IDENTITY() to Insert into
Customer Account following Account Insert
Cont’d
9. Views
A Current Month Bank Statement
Utilizing Concatenation , Joins & Date Functions
• Select Customer data, Account data & Transaction data
to provide a statement based on the current month
• Using INNER JOINS to retrieve a “match” for the Customer/Account
10. T-SQL Queries
The Merge Statement
New in 2008: Insert & Update in One
• Update target table when date and currencies match, BUT rate DOES NOT
• Insert into target table when date and currencies DO NOT match
19. Mini-AdventureWorks
Working in BIDS
Create a small database using the AdventureWorks model
Build SSIS Packages to import data from flat files
Design and deploy SSRS Reports to Report Server
Create linked reports from multi-parameterized reports
and make available through subscriptions
26. Group Roles
Block-Flix
Project Lead: Lezlee Coulter
Developers: James Vaughn
Theresa Rice
Irina Zilbermanas
Putting It All Together
A movie rental company needs a new database
to function with store, kiosk & online rentals & sales
As a group, design and implement the database
Develop the necessary packages in SSIS to import inventory
Create reports for the finance & marketing departments
Present our work to management
27. Online
Store
Kiosk
Kiosk Database Kiosk
Store Store
Database Store Database
Databas Database
Database
e
Kiosk
Kiosk Central Database
Database
Database
Store Store
Kiosk Database Database Kiosk
Database Kiosk Database
Database
28. • Store and Kiosk databases mirror Central database to
facilitate efficient import & export of data
• Online Store utilizes Central Database
• Access to database restricted through stored procedures
• Import & Export of data through SSIS packages
30. Receiving a Shipment
• New copies of existing titles are delivered
• An .xls file is accompanied, electronically
• File contains
• MovieID’s
• MediaTypeID’s (DVD or Blu-Ray)
• Quantity
• ID’s must be imported via SSIS
31. SSIS
Insert Existing Titles Into Inventory
Control Flow : Moves processed files to a new location
Send Tasks to relay success or failure
32. SSIS
DATA FLOW
Inserting new copies of existing titles
into inventory
33. Stored Procedure to Insert Inventory
Using the While Statement to
‘”loop” through the Quantity
Inserts 10 copies of MovieID 11
34. SSRS
Report Procedures
Most Rented Movies for Current Month
• Counts TransactionID’s based on Movie Rentals
• Groups by Title & Genre
• Orders by Date desc
36. SSRS
Report Procedures
Most Active Customers for Current Month
• Sums Transaction Types based on Movie Rentals
• Groups by Members
• Orders by Rentals desc
38. Managing Block Flix
As the project lead, looking at the task as a whole, “seeing the forest”, was my main
purpose. We had just one week in which to design and implement the databases and
prepare a presentation. Which aspects needed to be fully functional?
Which aspects were Phase Two? Where did my teammates’ strengths lie?
Where do we need to be by week’s end and how do we get there?
We normalized the data and created the databases. I distributed the procedures
and the SSIS packages that call them. After we wrote the procedures to be called
from user-interface applications, such as Transactions and CreateMember,
I then focused on the procedures for the required reports and distributed the design.
The challenge, for me, in this project was not as related to the technology as it
was to “steering the ship” in the direction of success. It was a wonderful experience
and one from which I learned to truly see all of our processes as a part of a whole.
39. Topping It All Off…
with a Trigger
After Trigger
Sets DateModified to GETDAT() on any Update
Instead of Trigger
Inhibits an update or delete of Transactions
40. DDL Trigger
A Safety Trigger to ensure that the tables
are not dropped or altered