Sql Server 2008 Portfolio for Vera Vaitsiuk.

Post on 20-Jan-2015

91 Views

Category:

Technology

3 Downloads

Preview:

Click to see full reader

DESCRIPTION

This portfolio is designed to give examples of my development skills with SQL Server 2008.

Transcript

Vera Vaitsiuk

SQL Server Portfolio

E-mail: vaituk.vera@gmail.com

E-mail: vaituk.vera@gmail.com

IntroductionHello!

My name is Vera Vaitsiuk.

This portfolio is designed to give examples of my development skills with SQL Server 2008. These examples are taken from project assignments completed during the program “Systems Software , SQL Application” at American Advanced Institute of Technology in Southampton, Pennsylvania.

This program is very deep 9 months course that covers everything about SQL Server 2008 - SQL Server Management Studio, logical and physical database design and development, normalization, security, backup, restore, data extraction, data conversion, writing T-SQL queries, sub-queries, stored procedures, user-defined functions, cursors and views, SQL joins, triggers, SSRS, SSIS, import, export data, creating packages, scheduling maintenance plan, SQL Agent, database mail, high availability (windows clustering, log shipping, database mirroring), replication.

I am confident that from this portfolio, you'll be assured of my skills in SQL development.

E-mail: vaituk.vera@gmail.com

Table of contentsIntroduction . . . . . . 2

ApressFinancial project . . . 4

ApressFinancial: Data Diagram. . . . . 5

ApressFinancial: Examples of T-SQL codes. . . . 6

ApressFinancial: SSRS. . . . . . 13

AdventureWorks2008: SSRS. . . . . 14

AdventureWorksDW: SSIS. . . . . . 15

ApressFinancial database

ApressFinancial database was an example of my T-SQL development skills. ApressFinancial database is a database for a personal or corporate financial tool. This database holds information to keep track Customers, Financial Products (accounts, shares, life insurance), Transactions in one database.

In additional to tables and columns development creating relationships and indexes, I will demonstrate knowledge of advanced T-SQL using sub-query, aggregation functions, creating functions, stored procedure that were used to create customers, trigger to update information about transactions and SSRS.

The database diagrams follows. This detailed structure of the database shows what information was captured.

ApressFinancial database diagram

ApressFinancial database - Select DataThis is T-SQL code sample that will list the share's ID, share description, min and max prices of shares. The report is sorted in descending order based on the min price. In this example , shares will only be listed if they have min price greater than 1.

ApressFinancial Database – Select Data. This is T-SQL code sample that will list all from ShareDatails.Shares table. The report is sorted in ascending order based on the ShareID. This example shows how to combine a sub-query and an aggregation to produce the list of ShareIds that form the IN:

ApressFinancial database – Select Data. In this example I will use a CASE statement to add up Customer's Transaction Details for the month of August. If the Transaction Type is 0, then this is a Debit; if it is a 1, then it is a Credit. By using the SUM aggregation, we can add up the amount. We get two rows in the result set: one for debits and one for credits.

ApressFinancial database – Creating Function. A Scalar function to calculate Interest. This function will calculate the amount of interest from a defined rate and will use two dates for the number of days the interest shall last.

ApressFinancial database – Creating Store Procedure. This is T-SQL code sample for creating stored procedure for inserting customers into the Customers table.

Apress Financial database – Creating Trigger.This is T-SQL code sample for creating a trigger. The purpose of this is to change a Customer's account balance when a financial transaction occurs as defined by an INSERT in the TransactionDetails.Transactions table. We want to change balance AFTER the row has been inserted into TransactionDetails.Transactions table.

ApressFinancial database - Testing trigger.If we insert a cash withdrawal to the transaction types. We will list the customer balance before executing the INSERT into the TransactionDetails.Transactions table, and then we will add the row and look at the balance again to show that it has changed. The following code will insert a withdrawal of 200$ from CustomerID 1's account:

ApressFinancial database – SSRS.

In this slide we will call the report Designer within Business Intelligence Development Studio to produce a simple report containing the list of transactions from the TransactionDetails.Transactions table.

AdventureWorks2008 database – SSRS. This report uses AdventureWorks2008 Data-set. The report shows Sales Analysis for each subcategory of products for each quarter of the year.

AdventureWorksDW database – SSIS. In this sample I will walk through creating a SSIS package from scratch. As an example I will generate an Excel spreadsheet that can be used to manually enter a sales forecast by city and state. The city and state information will be extracted from the AdventureWorksDW database and output to an Excel spreadsheet. The sales department could use this spreadsheet to enter the forecast.

AdventureWorksDW database – SSIS. We can open the Excel spreadsheet that the package created and see the following (only a portion of the spreadsheet is shown).This spreadsheet shows the columns from our query plus the Forecast column which I added with the Derived Column task.

top related