Your SlideShare is downloading. ×
Kevin Bengtson Portfolio
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Kevin Bengtson Portfolio

1,577
views

Published on


0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,577
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
15
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1.
    • SQL Portfolio
    • Kevin Bengtson
    • [email_address]
    • 763-898-3453
  • 2. Table of Contents
    • PiggyBank Project – Database T-SQL design
    • Junglebooks T-SQL Queries
    • Library T-SQL Queries
    • SQL Server Administative Tasks Project
    • MiniAdventureWorks SSIS/SSRS
    • BlockFlix Final Group Project
    • What is SetFocus?
  • 3. Piggybank Project
    • Introduction: Given a set of columns to be used in a banking database, determine which columns are necessary. Create the database using SSMS.
    • Project Goals: Develop a database and the appropriate Stored Procedures to access the data. Create testscripts to test the procecdures
  • 4. Project Sample – Database Diagram
  • 5. Project Sample – Create Account
    • USE [PiggyBank1]
    • GO
    • /****** Object: Table [dbo].[Account] Script Date: 04/01/2010 15:53:47 ******/
    • SET ANSI_NULLS ON
    • GO
    • SET QUOTED_IDENTIFIER ON
    • GO
    • CREATE TABLE [dbo].[Account](
    • [AccountID] [int] IDENTITY(1,1) NOT NULL,
    • [AccountTypeID] [tinyint] NOT NULL,
    • [AccountStatusID] [tinyint] NOT NULL,
    • [CurrentBalance] [money] NOT NULL,
    • [OverDraftAccountID] [int] NULL,
    • [GeneralOverdraft] [bit] NULL,
    • CONSTRAINT [PK_Account] PRIMARY KEY CLUSTERED
    • (
    • [AccountID] ASC
    • )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    • ) ON [PRIMARY]
    • GO
    • ALTER TABLE [dbo].[Account] WITH CHECK ADD CONSTRAINT [FK_Account_AccountStatus] FOREIGN KEY([AccountStatusID])
    • REFERENCES [dbo].[AccountStatus] ([AccountStatusID])
    • GO
    • ALTER TABLE [dbo].[Account] CHECK CONSTRAINT [FK_Account_AccountStatus]
    • GO
    • ALTER TABLE [dbo].[Account] WITH CHECK ADD CONSTRAINT [FK_Account_AccountType] FOREIGN KEY([AccountTypeID])
    • REFERENCES [dbo].[AccountType] ([AccountTypeID])
    • GO
    • ALTER TABLE [dbo].[Account] CHECK CONSTRAINT [FK_Account_AccountType]
    • GO
  • 6. Project Sample – Create Customer
    • USE [PiggyBank1]
    • GO
    • /****** Object: Table [dbo].[Customer] Script Date: 04/01/2010 15:52:43 ******/
    • SET ANSI_NULLS ON
    • GO
    • SET QUOTED_IDENTIFIER ON
    • GO
    • SET ANSI_PADDING ON
    • GO
    • CREATE TABLE [dbo].[Customer](
    • [CustomerID] [int] IDENTITY(1,1) NOT NULL,
    • [CustomerFirstName] [varchar](20) NOT NULL,
    • [CustomerLastName] [varchar](30) NOT NULL,
    • [CustomerMiddleInitial] [varchar](1) NULL,
    • [Street] [varchar](50) NOT NULL,
    • [City] [varchar](20) NOT NULL,
    • [State] [char](2) NOT NULL,
    • [ZipCode] [char](10) NOT NULL,
    • [Email] [varchar](30) NULL,
    • [HomePhone] [char](12) NOT NULL,
    • [WorkPhone] [char](12) NULL,
    • [CellPhone] [char](12) NULL,
    • CONSTRAINT [PK_Customer] PRIMARY KEY CLUSTERED
    • (
    • [CustomerID] ASC
    • )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    • ) ON [PRIMARY]
    • GO
    • SET ANSI_PADDING OFF
    • GO
  • 7. Project Sample – ATMGetTransactions
    • USE [PiggyBank1]
    • GO
    • /****** Object: StoredProcedure [dbo].[ATMGetTransactions] Script Date: 04/01/2010 16:08:33 ******/
    • SET ANSI_NULLS ON
    • GO
    • SET QUOTED_IDENTIFIER ON
    • GO
    • --=============================================
    • -- ATMGetTransactions
    • -- Author: Kevin Bengtson
    • -- Create date: 1/26/2010
    • -- Description: Get the transaction history for
    • -- the last 30 days
    • -- =============================================
    • create procedure [dbo].[ATMGetTransactions]
    • -- The set of input parameters.
    • @AccountID int
    • as
    • begin
    • select convert(varchar(30), t.TransactionDate, 101) as Date, t.TransactionTypeName as Type, t.TransactionAmount, t.NewBalance
    • from dbo.v_Transaction_Info t
    • where t.AccountID = @AccountID AND t.TransactionDate >= DATEADD(day, -30, getdate())
    • order by t.TransactionDate desc
    • end
    • GO
    • GO
  • 8. Project Sample – Screenshot testscripts
  • 9. T-SQL Queries Project
    • Introduction: Given two databases, Library and Junglebooks, deliver T-SQL Queries to perform specific functions.
    • Project Goals: Develop Queries to access the data and print it out.
  • 10. T-SQL Queries Project - Samples
    • Introduction: Given two databases, Library and Junglebooks, deliver Queries to perform specific functions.
    • use JungleBooks
    • --TSQL1 #1
    • SELECT ISBN, title, publisher
    • FROM dbo.Books
    • WHERE UnitPrice < 15
    • ORDER BY title
    • --TSQL1 #2
    • SELECT Name as 'Search Results'
    • FROM dbo.Authors
    • WHERE LOWER(name) like '%pet%'
    • ORDER BY Name
    • --TSQL1 #3
    • SELECT
    • CustomerId as 'Cust ID',
    • OrderId as 'Order #',
    • OrderDate as 'Order Date'
    • FROM dbo.Orders
    • WHERE CustomerId BETWEEN 6 and 15
    • ORDER BY CustomerId
    • Project Goals: Develop Queries to access the data and print it out. Create testscripts to test the procecdures
  • 11. T-SQL Queries Project - Samples
    • use library
    • -- Task 1
    • select m.firstname + ' ' + m.middleinitial + ' ' + m.lastname as Name,
    • a.street,
    • a.city,
    • a.state,
    • a.zip
    • from dbo.adult a inner join dbo.member m
    • on a.member_no = m.member_no
    • -- where m.middleinitial is not null
    • order by m.lastname, m.firstname
    • -- Task 2
    • select i.isbn,
    • c.copy_no,
    • c.on_loan,
    • t.title as Title,
    • i.translation,
    • i.cover
    • from dbo.item i inner join dbo.copy c
    • on i.isbn = c.isbn
    • inner join dbo.title t
    • on c.title_no = t.title_no
    • where (i.isbn = 500 or i.isbn = 1000) AND
    • c.on_loan <> 'Y'
    • order by i.cover
  • 12. T-SQL Queries Project - Screenshots
  • 13. T-SQL Queries Project - Screenshots
  • 14. SQL Server Administrative Tasks
    • Introduction : Project includes implementing different including :
    • Install and Configure SQL Server 2008 Practical Exercise
    • Manage Database Files
    • Resizing Files and Modifying Database Properties
    • Policy-Based Management
    • Implementing Disaster Recovery Procedures
    • Database Snapshots
    • Working with Schemas
    • Implementing Security
    • Schema Permissions
  • 15. SQL Server Administrative Tasks
    • Auditing Database Role Membership
    • Exporting and Importing Data
    • Weekly Integrity Checks
    • Transaction Log Approaching Capacity
    • Monitoring CREATE TABLE statements
    • Ownership Chaining
    • Resource Governor
    • Data Collector
    • Database Mirroring
    • Replication
  • 16. Administrative Tasks Screenshots
  • 17. Administrative Tasks Screenshots
  • 18. Administrative Tasks Screenshots
  • 19. Administrative Tasks Screenshots
  • 20. Administrative Tasks Screenshots Query History Report
  • 21. Administrative Tasks Screenshots Query History Report
  • 22. SSIS-SSRS-TSQL Project
    • Introduction : Create MiniAdventureWorksDB Database using SSIS. Build Routines in SSIS to execute procedures.
  • 23. SSIS-SSRS-TSQL Project
    • SSIS Project Packages
      • CreateDatabase.dtsx
      • ImportProducts.Dtsx
      • ImportVendors.Dtsx
      • ImportShipMethod.Dtsx
      • ImportOrders.Dtsx
      • MasterPackage.Dtsx
  • 24. SSIS-SSRS-TSQL Project
    • SSRS Report Packages
      • rptTopSales.rdl
      • rptSalesMatrixByYear.rdl
  • 25. SIS-SSRS-TSQL Project Screenshots
  • 26.  
  • 27. Team Members: Kevin Puls – Project Manager Kevin Bengtson – Assistant Project Manager Jose Suarez Vincent Doyle
  • 28. BlockFlix Database Layout *No deletes allowed on transaction table
  • 29.
    • XML file example
    • Add Movie SSIS Demo
    XML Movie Import
  • 30. XML Movie Import - Functions
    • Usp_AddMovie
        • Input movie title, year, genre ID, and rating ID
        • Will not re-enter duplicate
    • Usp_AddCast
        • Input cast member first and last name
        • Will not re-enter duplicates
    • Usp_AddMovieCast
        • Input movie ID, cast ID, and cast type ID
        • Will not re-enter duplicates
    • Usp_AddInventory
        • Input movie ID, location ID, inventory type ID, rentable, quantity, cost, and condition ID
  • 31. Transaction Procedure – Usp_RentMovie
  • 32. Transaction Procedure – Usp_RentMovie (Page 2)
  • 33. Additional Transaction Procedures
    • Usp_ReturnMovie
        • Input SKU
        • Returns movie to inventory (Set quantity back to 1)
        • Subtracts 1 from the account’s checked-out amount
    • Usp_BuyMovie
        • Input SKU
        • Optional Input Customer ID and Account ID
        • Make an entry for the Transaction table
        • Remove from the Inventory table
        • Delete movie from database if not copies are available
    • Usp_MoveSell
        • Input SKU
        • Put a rented item up for sale
        • Will not work for Kiosks
  • 34. Account Payment Procedures - Usp_LostInventory
  • 35. Account Payment Procedures - Usp_LostInventory (Page2)
  • 36.
    • Usp_MakeOverdue
        • Queries all active accounts
        • Closes accounts that are 30 days overdue
    • Usp_MakePayment
        • Input customer ID, account ID, transaction type ID
        • Determine membership type / fee amount
        • Update fee balance in account table
        • Reopens account if balance is paid in full
    Additional Account Payment Procedures
  • 37.
    • Usp_CreateCustomer
        • Input first name, last name, middle initial, street, city, state, zip code, e-mail, phone
    • Usp_ModifyCustomer
        • Input first name, last name, middle initial, street, city, state, zip code, e-mail, phone
    • Usp_CreateAccount
        • Input customer ID, membership type ID, account status ID
    • Usp_ModifyAccount
        • Input customer ID, membership type ID, account status ID
    Customer Account Procedures
  • 38.
    • Usp_QueueAdd
        • Input account ID and list ID (Movie or game ID)
        • Adds a game or movie to an account’s queue
    • Usp_QueueAdjust
        • Input account ID, list ID 1, list ID 2
        • Swaps the positions of two items in a queue
    • Usp_QueueSubtract
        • Input account ID and list ID
        • Removes a game or movie from an account’s queue
        • Reorders the remaining items in the queue
    Customer Account Procedures (Page 2)
  • 39. Requested Reports
  • 40. Requested Reports (Page 2)
  • 41. Requested Reports (Page 3)
    • Usp_ShowMovieInventory
        • Input location ID
        • Returns a list of all movies at the given location
  • 42.
    • Full Backup
        • Every week
    • Differential Backup
        • Every day
    • Transaction Backup
        • Every 1 hour
    • Rebuild Indexes
        • Every week
    • Update Statistics
        • Every week
    • Clean History
        • Every week
    • Maintenance Cleanup
        • Every week
    Backup and Maintenance Plan
  • 43.
    • Dell PowerEdge 11G R610
        • Two Quad-Core Intel® Xeon® 5500 series processors
        • 96GB (12 DIMM slots/6 per-processor): 8GB DDR3 1333MHz memory
        • Windows Server ® 2008 R2 Enterprise
    • Datacenter Cluster
        • 12 Server blades
        • 48 Gigs of RAM per blade
        • 3 TB of storage per blade
        • Windows Server ® 2008 R2 Datacenter
  • 44.
    • Data uploading to BlockFlix Master
        • SSIS nightly uploads
        • Upload all
          • Transactions
          • Inventory/Inventory Lost
          • New customer information
    • Full Game functionality
        • All the same functions that are available to movies
    Unimplemented Components
  • 45.
    • Video Streaming
        • Separate server with large disk space to store the movies in and filestream them out.
        • Database would need to be changed to keep track of Video Stream movies.
    •   Throttling
        • Database modification is already in place
        • Modification of Usp_RentMovie is needed
    • Movie Search
        • Be able to do a fuzzy search on Title or Cast Name and return all movies
    Possible Expansion
  • 46. What is SetFocus?
    • The SetFocus SQL Master’s Program is an intensive, hands–on, project oriented program allowing knowledge and valuable experience putting the SQL skill set to use in a simulated work environment.
    • I received over 300 hours of in-depths hands on experience focused on SQL Development.
    • SetFocus projects are real world projects that are distributed just as I would receive in a position. I received project specifications and was expected to identify best courses of action with deadlines set for completion.