marino mercedesportfolio201212

116
Marino Mercedes Phone: 646 897-8735 Emails: [email protected] [email protected] http://www.linkedin.com/pub/marino-mercedes/38/827/2b1 SQL Server Portfolio 1

Upload: marino-mercedes

Post on 31-Oct-2014

429 views

Category:

Technology


0 download

DESCRIPTION

This Portfolio contains four different projects that shows the SQL Master Program hand on training at SetFocus LLC.

TRANSCRIPT

  • 1. Marino MercedesSQL Server PortfolioPhone: 646 897-8735Emails: [email protected]@Setfocus.comhttp://www.linkedin.com/pub/marino-mercedes/38/827/2b1 1

2. Table of Contents Introduction:3 JungleBooks, TSQL:4 PiggyBank Bank Online, TSQL:12 MiniAdventureWorkDB Integration Services:27 MiniAdventureWorkDB Reporting Services:51 BlockFlix Online Video Streaming Integration Services:67 BlockFlix Online Video Streaming Reporting Services:91 BlockFlix Online Video Streaming T-SQL:101 BlockFlix Online Video Streaming High Availability : 104 About Me 116 2 3. Introduction This portfolio contains many examples of my development skillsgained in the SQL Server Master Program. It is a result of my hardwork during a 15-week hands-on experience with The SetFocus SQLMasters Program. SetFocus utilizes Microsoft Official Curriculum in conjunction with itsown materials to produce the following coursework: RDBMS , .NET, XML and CSV Querying multiple database objects using Transact SQL (T-SQL) MS SQL Server 2008R2 Implementing and maintaining a MS SQL Server 2008 and 2008R2 Database Designing multiples MS SQL Server 2008R2 Infrastructures for different purposes Designing security for MS SQL Server 2008R2 Designing High Availability Database Solutions using MS SQL Server 2008R2 Troubleshooting and Optimizing Database Servers using MS SQL Server 2008R2 Extracting, Transforming and Downloading Database using SQL Server IntegrationServices 2008R2 Designing, Deploying and Analyzing Database Report using SQL Server ReportingServices 2008R2 3 4. JungleBooks: Junglebooks is a book company which has a database consisting ofbooks, authors, orders and customers. This short project contain a database diagram and its database that wascreated according to instructors specification. JungleBooks is a SQL Server application that support a clientapplication platform using .NET. We have create queries for three store procedures to support threebasic operation against the JungleBooks. BooksQuantityPerCustomerOrder this application displays booksquantity per customer order. CustomerCardInformation this application displays the customer scurrent card information CheapUnitPriceBook this procedure displays the list of books lessthan the customer given unit price4 5. JungleBooks Database Diagram OrdersCustomers OrderID CustomerIDCustomerID NameOrderDate Address CardType CardNumber ExpiryDate OrderItemsOrderItemIDOrderIDISBNQuantityOrderedQuantityDispatchedUnitPriceBookAuthors BookAuthorIDBooks ISBN ISBN AuthorID PublisherTitleUnitPriceAbstractPagesAuthorsPublished AuthorIDStock Name 5 6. JungleBooks:BookQuantityPerCustomerOrder this procedure displays books quantity per customers order based on Customer ID 6 7. JungleBooks:BookQuantityPerCustomerOrder this procedure displays books quantity per customers order based on Customer IDUsing this syntax to execute the procedure we get displayed the Customerbooks quantity per order based on Customer ID 7 8. JungleBooks:CustomerCardInformation this procedure displays the current Customer Cardinformation based on the last four digits of customer card and Customer ID 8 9. JungleBooks: CustomerCardInformation this procedure displays the current Customer Card information for book order based on Customer IDUsing the syntax below to execute CustomerCardInformation procedure, we get displayed theCustomer s current credit card information used for books order based on the last four digits of thecustomer card and the Customer ID9 10. JungleBooks:CheapUnitPrice this procedure displays the list of all books available thatcontains the price below than the Customer given Unit Price 10 11. JungleBooks:CheapUnitPrice this procedure displays the list of all books available thatcontains the price below than the Customer given Unit PriceUsing the syntax below to execute CheapUnitPrice procedure, we get displays thelist of all books available that contains the price below than the Unit Price providedby the Customer 11 12. PiggyBank: Piggy Bank is a mini-project that simulates an online bank operations.Such as check account balance, making deposit, withdraws, andtransfer money to different Accounts and making transactionsthrough this online bank platform. The piggy bank contains useful information that would be used asreference in future project. It contains an Entity RelationshipDiagram of the tables used in the project. Such as Account, AccountStatus, Account Type, Customer, Customer Account, Transactions,Transaction Type. Piggy Bank mini-project support internal operations. Such as addnew customer, update an existing customer, add new account, anexisting update account, update interest rate for a specific customerand account. Get a customer and account current and past history. Piggy Bank mini-project, originally download all customers andaccounts information through the technique of extracting it from axml file into SQL Server entities. 12 13. PiggyBank:Diagram representation of the PiggyBank database tables .CustomerTransactions CustomerIDTransactionID CustomerFirstName AccountID CustomerLastNameTransactionTypeID TransactionType CustomerMiddleInitial CustomerIDTransactionTypeID StreetTransactionDate TransactionTypeName CityTransactionAmount State NewBalance ZipCode Email HomePhone WorkPhone CellPhoneAccount AccountID AccountTypeID AccountStatusID CurrentBalanceCustomerAccount AccountCustomerID OverDraftAccountID AccountID GeneralOverDraft CustomerIDAccountType AccountTypeID AccountTypeNameAccountStatus InterestRate AccountStatusID AccountStatus 13 14. PiggyBank:This is XML technique used to download records from a xml file to SQL ServerEntities as it shows below. This is the beginning of the file. 14 15. PiggyBank:XML technique used to download records from a xml file to SQL ServerEntities such as customer and account table. The end of xml the file.15 16. PiggyBank:XML technique used to download records from a xml file to SQL Server Entitiessuch as account status, account type and transaction type. End of the xml file16 17. PiggyBank:All records downloaded from a xml file to SQL Server Entities such as accountstatus, account type, transaction type, customer, etc., except for transactions .17 18. PiggyBank:Piggy bank Add Customer store procedure s to add new customer into thecustomer table. Add Customer procedure. 18 19. PiggyBank:Piggy bank Add Customer store procedure s to add new customer into thecustomer table. Add Customer procedure. 19 20. PiggyBank:Piggy bank execute Add Customer store procedure s to add new customer into thecustomer table. Add Customer testing procedure.Piggy bank Customer table before we add a new customer recordPiggy bank Customer table after a new customer record has being added 20 21. PiggyBank:Piggy bank Deposit store procedures, this procedure is used to deposit money intoa Customer Account. Deposit store procedure.21 22. PiggyBank:Piggy bank Deposit store procedure is used to transfer money from one Customer Account intoa Customer Account. Deposit store procedure. 22 23. PiggyBank:Piggy bank Deposit store procedures, this procedure is used to deposit money intoa Customer Account. Deposit store procedure.Piggy bank Deposit procedures, Before we make a deposit into a Customer Account and transactionsTables, we can check the Customer ID # 1, Account ID # 100000, and Transaction ID # 9Piggy bank Deposit procedures, After a deposit has being made into a Account and transactions tables,we can check the Customer ID # 1, Account ID # 100000 and Transaction ID # tables 23 24. PiggyBank:Piggy bank Transfer store procedures is used to transfer money from one Customer Accountinto another Customer Account. Transfer procedure Part-A 24 25. PiggyBank:Piggy bank Transfer store procedures is used to transfer money from one Customer Accountinto another Customer Account. Transfer procedure Part-B25 26. PiggyBank:Piggy bank Account table Before we transfer money from one Account to another Account.Transfer money from Account ID # 100072 to Account ID # 100070Piggy bank Account table After the transfer of money from one Account to another Accounthas being made. Transfer money from Account ID # 100072 to Account ID # 100070 26 27. MiniAdventureWorksDB MiniAdventureWorksDB is a SQL Server project that simulate thePhoenix environment 0f Datacenter company. The project contains SSISbasic functions and complex packages as well as SSRS functions. In this project database goes under transformation process, in which weimplement the technique to download data from .csv files to SQL ServerEntities. The database is downloaded from SOURCEFILES directory that containsseveral .csv files, such as VendorMaster, ProductMaster,ShipmethodMaster, UpdateProducts, PODATA_2001, PODATA_2002,PODATA_2003, and PODATA_2004, Using SSIS technique we developed several packages to import data from.csv files to MiniAdventureWorksDB database, the following packageswere built: CreateDatabase.dtsx, ImportVendors.dtsx, ImportProducts.dtsx,ImportShipMethod.dtsx, ImportOrders.dtsx, UpdateProducts.dtsx, andMasterPackage.dtsx27 28. MiniAdventureWorksDBMiniAdventureWorksDB project has the SQL Server Entities, Vendor, Product, ShipMethod, PurchaseOrderHeader, and PurchaseOrderDetail.In which we download the data from the .csv files through a transformation process.The following Diagram describe the relationship between the entitiesPurchaseOrderDetailPurchaseOrderHeader *PurchaseOrderDetailID PurchaseOrderID ShipMethod *PurchaseOrderID POHeaderNumberShipMethodIDProductID VendorIdNameOrderQtyShipMethodIdDateInsertedUnitPrice OrderDateDateModifiedTotalDueFreightDateInsertedTotalDueDateModifiedDateInsertedDateModifiedProduct Vendor *ProductIDVendorIDProductNumberAccountNumberProductNameNameListPriceCreditRatingDateInserted DateInsertedDateModified DateModified 28 29. MiniAdventureWorksDB CreateDatabase.dtsx package, is the first package we employed in our transformation ofimporting data from the .csv files into the five SQL Server tables. This package use a Dropand Create Database.sql file that allow us easy data handle, I set the data to multiple user.29 30. MiniAdventureWorksDB CreateDatabase.dtsx package, create the five tables and other and T-SQL applicationssuch as functions, triggers, store procedures and other code. Such as common tableexpression used for data manipulation 30 31. MiniAdventureWorksDB We run CreateDatabase.dtsx package and it turn green that mean the packageexecutes its task successfully by creating the MiniAdventureWorksDB database 31 32. MiniAdventureWorksDB TheCreateDatabase.dtsx package already create the MiniAdventureWorksDBdatabase and the empty tables as it show, ready to receive the data records32 33. MiniAdventureWorksDB ImportVendor.dtsx package, import all Vendors data files from VendorMaster.csv filesinto Vendor table. The database go through a processing while it is transform byImportVendor package before it is downloaded into the SQL Server Vendor table The VendorMaster.csv file import 92 Vendors to the Vendor table. 33 34. MiniAdventureWorksDB ImportVendor.dtsx package, use a control flow task and a data flow task toimport data from the VendorMaster.csv files into Vendor table. 34 35. MiniAdventureWorksDB ImportVendor.dtsx package, when it run and turn green mean that all Vendorsrecord were imported from the VendorMaster.csv files to Vendor tablesuccessfully. 92 Vendors were downloaded into Vendor table35 36. MiniAdventureWorksDB This is a Vendor table after we run the ImportVendor.dtsx package toimport all Vendor records to the Vendor table. 36 37. MiniAdventureWorksDB ImportProducts.dtsx package, it contains a control flow and two data flow; Import Products and UpdatedProducts data flows. Import Products contain a Flat File Source, a Data Conversion, a Lookup Products, a Row Count data flow,an OLEDB destination, a Conditional Split, a Row Count data flow, and an OLEDB Command. Update Products contain a Flat File Source, a Data Conversion, a Lookup Products, a Row Count data flow,an OLEDB destination, a Conditional Split, a Row Count data flow, and an OLEDB Command. 37 38. MiniAdventureWorksDB Import Products contain a Flat File Source, a Data Conversion, a LookupProducts, a Row Count data flow, an OLEDB destination, a Conditional Split,a Row Count data flow, and an OLEDB Command. The package import 280rows of products into Product table. 38 39. MiniAdventureWorksDB Update Products contain a Flat File Source, a Data Conversion, a LookupProducts, a Row Count data flow, an OLEDB destination, a Conditional Split,a Row Count data flow, and an OLEDB Command. The Update Product dataflow update no rows in the Product table.39 40. MiniAdventureWorksDB This is a Product table after we run the ImportProducts.dtsx package toimport 280 Product rows into the Product table.40 41. MiniAdventureWorksDB ImportOrders.dtsx package, import all Orders from PODATA_2001 to PODATA_2004 flatfiles into 2 flat file destinations called BadVendors.csv and BadProducts.csv. TheImportOrders.dtsx contains 3 file system tasks, one to create a folder to outputBadVendors.csv and BadProducts.csv. The 2nd and the third file system task are used todelete BadVendors.csv and BadProducts.csv files once they have being processed. It has afor each loop container to loop through all PODATA Orders related to BadVendors andBadProducts and import them into PurchaseOrderHeader and PurchaseOrderDetailtables The for each loop container have 2 data flows to process PODATA.csv files to importOrders into PurchaseOrderHeader and PurchaseOrderDetail tables. It contains a filesystem task to move all processed PODATA files into a folder named ProcessedFiles. Thefor each loop container also has a script task that is used with 2 lines of code that usevariables to count the number of Orders per Vendors. The script task use the variablesTotalNumberBadVendors, TotalNumberBadProducts, NumberBadVendors andNumberBadProducts for this purpose. The ImportOrders.dtsx package use a script task to script the email connection, becauseusing the send mail task does not works due to server connection problem. It wasnecessary to script my email connection to send an email as a result of the successfulcompletion of the ImportOrders.dtsx package The ImportOrders.dtsx package import 642 rows of Orders related to Vendors andProducts into the PurchaseOrderHeader and 1,072 rows of Orders related to Vendors andProducts into the PurchaseOrderDetail tables. Upon successful completion of importorders into the tables, the packages pick up the output files BadVendors.csv andBadProducts.csv from ProcessedFiles folder and send it as an attachment a managerialdepartment. 41 42. MiniAdventureWorksDB ImportOrders.dtsx package, is the most complex package of the MiniAdventureWorksDBproject. It involved the use of many SSIS components to achieve a variety of functions on thedatabase. Starting by extracting the data from .csv files and transforming it into an statisticaldata, and upon completion it notifies the department involved with such a data.42 43. MiniAdventureWorksDB ImportOrders.dtsx contains 18 variables, each one accomplishes specific task.Such as connection string of directory path. 43 44. MiniAdventureWorksDB The IMPORTPODATA_csv data flow import 642 rows of Orders related toVendors and Products into PurchaseOrderHeader table.44 45. MiniAdventureWorksDB The Building PODetail data flow import 1,072 rows of Orders related toVendors and Products into PurchaseOrderDetail tables 45 46. MiniAdventureWorksDB These are the PurchaseOrderHeader and PurchaseOrderDetail tables afterimporting the Orders from PODATA.csv files. Both tables contained Ordersdetail related to Vendors and Products. 46 47. MiniAdventureWorksDB The Script task named send AOL mail, send a mail to my email recipient byscripting the connection string of the server, using the following code. Scriptingthe connection string to my email, the send mail script task accomplish the finaltask. 47 48. MiniAdventureWorksDB The Script task named send AOL mail, send a mail to my email recipient byscripting the connection string of the server, using the following code. Scriptingthe connection string to my email, the send mail script task accomplish the finaltask. 48 49. MiniAdventureWorksDB The is the mail with the attachment of BadVendors.csv and BadProducts.csvfiles containing 108 Vendors row and 11954 Products rows related to vendors. 49 50. MiniAdventureWorksDB The MasterPackage.dtsx package use 6 execute package tasks connected to startthe data transformation in an orderly way. It executes all packages in sequenceand organized way to accomplish the requirements of MiniAdventureWorksDB.50 51. MiniAdventureWorksDB MiniAdventureWorksDB Project contains two essential part theSSIS data transformation and the SSRS reporting services. This isthe Reporting Services part which contains 2 report applicationsthat use from basic ad hoc queries to store procedures. ThertpSalesMatrixByYear.rdl is a report application that containseveral text boxes. Such as Vendor Sales By Year, and 4 others text boxes that containinformation about the user running the report, the server in whichthe report is running, the date and time. The report also use aMatrix task that holds data about the name, the sum of totalDueby Year the total due. The report contains the sharedMiniAdventureDataSourceMatrix.rds data source. TherptVendorSalesByYear.rdl report contains the VendorSalesByYeardataset, as well as ServerName, ServerDateTime andShipMethod_Name datasets.51 52. MiniAdventureWorksDB The rptVendorSalesByYear.rdl report use an ad hoc query to select Vendor Name,Year Order Date and the Sum of Total Due from Vendor andPurchaseOrderHeader table based on ShipMethodID and group by Vendor Name.52 53. MiniAdventureWorksDB The report contains a VendorSalesByYear dataset that use an ad hoc query to selectVendor Name, Year Order Date and the Sum of Total Due from Vendor andPurchaseOrderHeader table based on ShipMethodID and group by Vendor Name. 53 54. MiniAdventureWorksDB This is the top of the rptVendorSalesByYear.rdl report, view from the reportingserver web server.54 55. MiniAdventureWorksDB The report contains a TOP5ProductsForVendors dataset that use a store procedureand a function to select Vendor Name, Rank, Total Due, Product Name, ProductRank and Product Total Due from Vendor and PurchaseOrderHeader andPurchaseOrderDetail tables based on VendorID and group by Vendor Name. 55 56. MiniAdventureWorksDB The report contains a TOP5ProductsForVendors dataset that use a store procedureand a function to select Vendor Name, Rank, Total Due, Product Name, ProductRank and Product Total Due from Vendor and PurchaseOrderHeader andPurchaseOrderDetail tables based on VendorID and group by Vendor Name. 56 57. MiniAdventureWorksDB This is the GetTop5ProductsOrdersFromVendors store procedure that invoke theGetTopNProductsOrdersFunctions to retrieve Vendor records. 57 58. MiniAdventureWorksDB This is the GetTopNProductsOrdersFunctions that retrieve Vendor informationfrom PuchaseOrderHeader and PurchaseOrderDetail tables.58 59. MiniAdventureWorksDB This is the result set of executing the GetTopNProductsOrdersFunctions functionafter retrieve Vendor records.This is the result set of executing the StoreProcGetTopNVendors_TopNProducts procedurethat output the result set with Vendor records from GetTopNProductsOrdersFunctions.59 60. MiniAdventureWorksDB This is the top of the rptTopSales.rdl report, view from the reporting server webserver.60 61. MiniAdventureWorksDB This is the bottom of the rptTopSales.rdl report, view from the reporting serverweb server. 61 62. MiniAdventureWorksDB This is the Home Report Manager website of my SQL Server, and theMiniAdventureWork_Reports contain 2 reports that can be accessed directly byclicking on them. Each report has a folder and a linked report with the samename to protect the original reports62 63. MiniAdventureWorksDB Here we configured a report delivery for an unattended report delivery. A reportwould be delivered to a shared folder destination calledMiniAdventureSharedReports. 63 64. MiniAdventureWorksDB These are the subscriptions that already have delivered the unattended reports to ashared destination folder named MiniAdventureSharedReports.64 65. MiniAdventureWorksDB This is the MiniAdventureSharedReports folder containing 2 reports by ascheduled subscription delivery of the unattended reports to this recipient. 65 66. MiniAdventureWorksDB This is the opened LinkedrptTopSales.pdf report that was delivered by ascheduled subscription to MiniAdventureSharedReports folder.66 67. Block-Flix Final ProjectBlock-Flix Final Project Team IBlock-Flix Online Video Streaming 67 68. BlockFlix-Final Project Block-Flix Project Team I Instroductions Silas Taylor, Project Manager Luanna Rozentals, Asst Project Manager Angela Johnson David MacDonald Marino Mercedes Ivette Calloway 68 69. Block-Flix Final Project Block-Flix Final Project simulate operations for a new upcoming Movierental company. The company will have opened a few store nationwideand is in the process of creating a centralized database for trackinginventory, sales, customers and memberships. The company has an online store where customers can buy or rent moviesor video games. Online stores has a database that will keep track ofcustomer transactions (Sell/Rent or return of movies). The transactinformation is saved in a File Stream or .CSV file which is later uploadedinto the central database to use and distribute customer and movie titlesinformation. SetFocus Team I and me have developed some applications for the projectthat can be used by a .Net platform in conjunction with SQL Server tofulfill customers requirements. However, some of the application werecomplete by our group team I. I decided to redo the whole project bycorrecting applications that didnt work, uncompleted application addingsome new applications.69 70. Block-Flix Final Project Block-Flix Final project contains three main parts: The SSIS Applications toexecutes many packages, The SSRS Applications to run many reports, andthe T-SQL codes that supports those applications. The SSIS Project part contains 10 SSIS packages as follow: CreateDatabase,AddMedia, AddMovie, AddMovieCast, AddInventory, AddCast,AddCastType, ReseedTables, OnlineVideoStreaming, ExcutePackages. The SSRS Project part contains 7 reports as follow:CustomerMembership.rdl, GetMostActiveCustomerByTheMonthAndYear.rdl,GetMostRentedMovieByTheMonthAndYear.rdl,MostActiveCustomerOfTheMonth.rdl, MostRentedMovieOfTheMonth.rdl,LostDamagedCustomerReport.rdl, and OnlineVideoStreaming. T-SQL Applications that support both parts of the project are as follow:GetMonthName, GetMostRentedMovieByTheMonthAndYear,GetMostRentedMovieByTheMonthAndYear,MostActiveCustomerOfTheMonth, MostRentedMovieOfTheMonth,NotifyLostDamagedVideos, UpdateLostDamaged, OnlineVideoStreaming,BuyMovie, RentMovie, ReturnMovie, UpdateMonthyFeeBilling and others. 70 71. Block-Flix Final ProjectThis is Block-Fix Database Diagram that show all entities that support Block-FlixFinal Project AccountAccountQueueCustomerAccountAccountIDQueueID CustomerAccountID Pay mentTy peIDAccountID CustomerID AccountStatusIDMediaID AccountID FeeBalance VideoLinkID MembershipTy peIDInv entory Ty peID CheckOutCountQueueNumberCustomer CustomerID CustomerFirstName CustomerLastName InventoryTypeInventoryTypeIDMovieMedia CustomerMiddleInitial MediaIDTypeName StreetTitle CityMediaDescription State Year ZipCode Genre RatingIDGenreID Email GenreIDGenreName HomePhone WorkPhone CellPhone RatingVideoStreamLinkRatingID VideoLinkIDRating VideoStreamLinkCustomerCreditCardRatingDescription RowNumber CreditCardEncry ptedNoInventory CreditEx piration SKU MembershipTypes CustomerIDMov ieID MembershipTy peID AccountID Inv entory Ty peID MembershipTy pe AccountStatusID LocationID Max Checkout MembershipTy peID Quantity Price NoDay Late FineCharged CurrentCheckout Location BalancePaymentLocationIDPay mentTy peID LocationCityPay mentName Locationty peID LocationStateAccountStatus LocationAddress AccountStatusID CastLocationZipCode AccountStatus CastID CastTy peID MediaID LocationType CastFirstNameCastType LocationtypeID CastTy peID CastLastName LocationName CastTy peName RentDetail RentDetailIDMovieItemTransactionTypeAccountID Mov ieID TransactionTypeID Mov ieIDMov ieTitle TransactionTypeName MediaID Price MediaIDTransactions InventoryTransaction TransactionID Inv entory TransactionID MovieCast AccountID Mov ieID Mov ieCastID TransactionTy peIDAccountID MediaID CustomerIDInv entory Ty peID CastTy peID Pay mentTy peID TransactionTy peID CastID TransactionDate TransactionAmount TransactionTotalAmount71 72. Block-Flix Final Project This is the CreateDatabase.dtsx package Successfully executed. 72 73. Block-Flix Final Project The CreateDatabase.sql SQL file that used by the file connection of the SQLtask to script all database entities. This is the beginning of the file thatcreates Block-Flix database. 73 74. Block-Flix Final Project These are the AccountQueue and Account tables scripted by a file connectionusing the CreateDatabase.sql file for the BlockFlix Final Project. 74 75. BlockFlix-Final Project AddMedia.dtsx package contains a data flow tasks that extract the Mediainformations from MovieList.csv file When this task is executed download allMovie Media information from the MovieList.csv file into the MovieMedia table. 75 76. Block-Flix Final Project MovieMedia table that contains 10 initials rows of Movie Media informationdownloaded from MovieList.csv file 76 77. Block-Flix Final Project AddMovie.dtsx package contains a data flow tasks that extracts all Movieinformations from MovieList.csv file When this task is executed download allMovie informations from the MovieList.csv file into the MovieItem table. 77 78. BlockFlix-Final Project MovieItem table that contains 10 initial rows of Movie Item informationdownloaded from MovieList.csv file78 79. Block-Flix Final Project ReseedTables.dtsx package, it contains a SQL tasks that reseed all tables in BlockFix databaseby reseeding tables identities of. Once tables identities are set of it insert a new set ofinformation that complement the data downloaded from MovieList.csv file. 79 80. Block-Flix Final Project These are the list of tables that SQL tasks will first delete and reseed in theBlock-Fix database.80 81. Block-Flix Final Project This is the Customer table that a SQL tasks will reseed in the BlockFix databaseby reseeding tables identities of.81 82. Block-Flix Final Project OnlineVideoStreaming.dtsx package, this package contains a FileSystem task, a SQL tasks , a For Each Loop task, and a Script task.The File System task create a directory to download Customerinformation in a .CSV file, which later send in an email attachment toBlockFlix customers. The SQL tasks create an object that return a full result-set for onespecific customer of the BlockFlix database based on Customer ID.The SQL task use a file connection that connect to anOnlineVideoStreaming.sql file. The For Each Loop task loop through an ADO object source that isset to a For Each ADO Enumerator property . The ADO Enumeratorloop through a record-set of multiple tables to output a full result set. The Script task is used to script the SQL connection and usercredential to send the result-set in a body of an email to the customeremail recipient. The Script task also output the email bodyinformation in a CSV file attachment. 82 83. Block-Flix Final Project This is the OnlineVideoStreaming.dtsx package and upon its successful execution itgrab the OnlineVideoStreaming.csv file and send it in an email attachment.83 84. Block-Flix Final Project this is the For Each Loop task Variable Mapping, it is used to map the variables thatwill create the object of type result-set. The foreach loop will loops through arecord-set to output only these 7 fields base on Customer ID. 84 85. Block-Flix Final Project this is the For Each Loop task contains a data flow task that use an OLEDB Source, aRow Count, and a Flat File Destination. It is used to output the Customer result-set into a flat file destination.85 86. Block-Flix Final Project This is the Script task contains a ReadOnlyVariables and ReadWriteVariables thatwe use to read from and to write too. The Script task read the VideoCountsvariable and write the CustomerEmail along with other variables. It uses the editscript where we script user credential and script a record-set body for the customeremail as well as the email attachment 86 87. Block-Flix Final Project I am not a .Net developer but I did some research and get some tips on how to writthe code in the edit task for user credential and to output customer information aspart of the email body . I have learned how write the edit script to send thecustomer email with a file attachment. 87 88. Block-Flix Final Project Here is where I define the users credentials and the body of the Customer emailusing .Net coding application that connect to my SQL Server Instance88 89. Block-Flix Final Project This the opened Customer email that contains the email body with the Customerand Video information plus the OnlineVideoStreaming.csv file attachment.89 90. Block-Flix Final Project The ExecutePackages.dtsx package execute successfully the 8 packages that wereexecuted one by one through the ExecutedPackages.dtsx packages. 90 91. Block-Flix Final Project The BlockFlix SSRS project part contains 7 reports that are basically used fornotification of the customers Videos and other functions. These reports useT-SQL code to accomplish their functions, the reports as follow: CustomerMembership.rdl, GetMostActiveCustomerByTheMonthAndYear.rdl,GetMostRentedMovieByTheMonthAndYear.rdl,LostDamagedCustomerReport.rdl, MostActiveCustomerOfTheMonth.rdl,MostRentedMovieOfTheMonth.rdl and OnlineVideoStreaming.rdl,. These reports use store procedures to accomplish their functions as follow:GetMonthName, GetMostActiveCustomerByTheMonthAndYear,GetMostRentedMovieByTheMonthAndYear,GetMostActiveCustomerOfTheMonth, GetMostRentedMovieOfTheMonth,NotifyLostDamagedVideos and OnlineVideoStreaming. These reports output data based on a subscription and scheduled reportdelivery to a share destination folder. The email delivery is not used in thisproject due to connection problem. The report information is output basedon customer ID 91 92. Block-Flix Final Project The MostActiveCustomerOfTheMonth.rdl use a store procedure calledGetMostActiveCustomerOfTheMonth. The report output Customer information of themost active customer of the current month. 92 93. Block-Flix Final Project This is the MostActiveCustomerOfTheMonth.rdl report that output the mostactive customers of the current month as follow:93 94. Block-Flix Final Project The MostRentedMovieOfTheMonth.rdl use a store procedure calledGetMostRentedMovieOfTheMonth. The report output the Movie information of themost rented movies of the current month. 94 95. Block-Flix Final Project This is the MostRentedMovieOfTheMonth.rdl report that output the most rentedmovies of the current month as follow:95 96. Block-Flix Final Project The OnlineVideoStreaming.rdl use a store procedure called OnlineVideoStreaming.The procedure output the Video Streaming Link and the Video details for customersrequested movies. 96 97. Block-Flix Final Project The OnlineVideoStreaming store procedure output the Video Streaming Link and theVideo details for customers requested movies. The Video Streaming Link detailsabout the specific video must be send in an email to customer recipient. 97 98. Block-Flix Final Project The OnlineVideoStreaming.rdl report contains the Customers Online Video Streamingdetails about a specific movies based on Customer ID. The report output the VideoStreaming Link and the Video details for customers requested movies as follow: 98 99. Block-Flix Final ProjectThis is the customer subscription scheduled report delivery of OnlineVideoStreaming.rdl report tobe delivered to shared destination folder. This is the customer subscription of the OnlineVideoStreaming.rdl already set up99 100. Block-Flix Final ProjectThis is the scheduled report delivered to a Shared Destination folder of OnlineVideoStreaming.pdfThis is the OnlineVideoStreaming.pdf report delivered and opened in the customer recipient100 101. Block-Flix Final Project The BlockFlix Final project part 3 consist of the following store procedures that willsupport the .Net applications to provides many functionalities to the project. Suchas Add New Customer, Update Customer, Add new Account, Update Account, AddAccountQueue, Add Customer Credit Card, Add Inventory, Buy Movie, Rent Movie,Return Movie, Update Lost Damaged, Update Monthly Fee Billing, UpdateMembership Types. The following store procedures were built to do functions such as:AddNewCustomer, UpdateCustomer, AddNewAccount, UpdateAccount,AddNewAccountQueue, UpdateAccountQueue, AddCustomerCreditCard,GetCustomerCreditCardInfo, AddInventory, BuyMovie, RentMovie, ReturnMovie,UpdateLostDamaged, UpdateMonthlyFeeBilling, besides those used in reportingservices. We displays the T-SQL Code and the result-set of the following procedures:AddCustomerCreditCard, GetCustomerCreditCardInfo, UpdateMonthlyFeeBilling,BuyMovie, RentMovie, ReturnMovie, UpdateLostDamaged. The rest of procedureswont be showed here, because they belong to normal store procedure routines.Those procedures were built to run under .Net applications such as Visual .Net,ASP.Net or other Object Oriented languages.101 102. Block-Flix Final ProjectThe RentMovie store procedure that update Movie data into Inventory, Account tables and others.102 103. Block-Flix Final ProjectThe BuyMovie store procedure update Movie data into Inventory, Account, Transactions tables 103 104. Block-Flix Final ProjectBlockFlix High Cost Hardware ProposalCentral Database: 4 Dell PowerEdge 2950 III Rack Server (Configured N+1 Clusters) 2 Quad-Core Intel Xeon Processors 5400 series at 3.33GHz 8GB 667MHz Dual Ranked DIMMs Microsoft Windows Server 2008 Datacenter x64 bit Microsoft SQL Server 2005 Enterprise Edition Dell PowerVault NX1950 6.75TB (450GB x 15 Serial Attached SCSI Hot Plug Hard Drives) RAID 1+0 ConfigurationStore Database: 3 Dell PowerEdge 840 (Configured for Database Mirroring) Implemented with High Safety Mode - Witness Server for AutomaticFailover104 105. Block-Flix Final ProjectBlockFlix High Cost Hardware ProposalCENTRAL DATABASE N + 1 Cluster STORE DATABASE - Database Mirroring High Safety mode with Automatic Failover105 106. Block-Flix Final Project106 Block-Flix database has a high availability to Protect the System? Application data stores Databases Files Other data repositories Database services DBMS availability for applications Application services Application availability for users and external systems. Databases are the heart of most information systems;they deserve the highest affordable protection.106 107. BlockFlix-Final Project107Service Recovery Strategies for Disaster-RecoveryStandby Mode Failover Behavior SQL Server FeatureCold Manual intervention required to restore Backup and restorestandbyoffline data copyWarm standby Data copy online and ready Transaction log shipping Manual failover required Database mirroringHot standby Automatic failover Database mirroring Failover clustering 107 108. Block-Flix Final ProjectData RecoveryTerminologyTerminology varies for source vs. copyHigh Availability Strategy Data Source Data CopyBackup and Restore DatabaseBackupLog Shipping Primary Secondary StandbyDatabase Mirroring Principal MirrorFailover ClusteringPrimary Secondary ActivePassive Standby Inactive 108 109. Block-Flix Final ProjectAn Overview of the BackUp Solution Based on stored procedures and functions Supports SQL Server 2005, SQL Server 2008 andSQL Server 2008 R2 Database Backup - Backups Database Integrity Check Integrity Check, anduser defined database integrity Index Optimize Index and Statistics by usingmaintenance plan to rebuilt fragmented indexes 109 110. Block-Flix Final ProjectSteps to Back Up DatabaseStep 1: Open your Microsoft SQL Server Management Studio, whichever you prefer, standard or express edition.Step 2: Using your Database Username and Password, simply login to your MS SQL server database.Step 3: Select the database >> Right-click >> Tasks >> Back Up [as shown in the image below]:Once you click on the Backup the following Backup Database window will appear 110 111. Block-Flix Final ProjectAdvanced DB Backup 111 112. Block-Flix Final ProjectHigh Availability112 Minimize or avoid service downtimeWhether planned or unplanned When components fail,service interruption is brief or non-existentAutomatic failover Eliminate single points of failure (as affordable)Redundant componentsFault-tolerant serversBusiness Case for AvailabilityHigh AvailabilityDisaster Recovery Keep business-critical Protect against loss of data centerapplications available Secondary: Secondary: Application upgrades Server maintenance Infrastructure upgrades 112 113. Block-Flix Final Project113 Data Availability ContinuumDegrees of protection for information systems: Business Risk SolutionData RecoveryData loss Redundant dataHigh Downtime of Redundant systemAvailability database servicecomponentsDisaster Downtime of Redundant systemsRecovery business operations and facilities113 114. Block-Flix Final Project114 Database Failure ScenariosPhysical InfrastructureFailuresLogical Data Failures Storage subsystem Operator errors Disk DBMS interruption Controller Drops / deletes Network Application defects Server DBMS defects Power Data corruption114 115. Block-Flix Final Project115Transaction Log Shipping Warm standby solution Duplicate user database Copy transaction logs to standby server & restore Database available for read-only access Users must disconnect for logs to be applied Two database licenses required if querying standby Manual application failover Supported on standard hardware Possible data loss (unapplied transactions)115 116. About Me I am Marino Mercedes, I posses an Associates of Occupational Studies(AOS) in Computer Information System(computer programminglanguages). Such as SQL Server 7.0/2000, ASP 3.0, and Visual Basic6.0 at VBScript, JavaScript at ASA College of Business andTechnologies, 10/2001, Brooklyn. I have successfully graduated of bachelor program in computer Science(Computer Information System and Programming Languages) at St.Joseph College 06/2006, Brooklyn, NY. I have a Certified Microsoft Professional (MS SQL Server 2000) and Ihave worked from 02/2008 to 09/2008 for Microsoft Corporation, atRedmond Seattle, WA as Database Administrator (Junior DBA) onSQL Server 2005. Actually I have successfully graduated from SetFocus SQL MasterProgram. I have achieved the knowledge and hand on training as SQLDeveloper as the projects have shown. I have solid hand on how to analyze, build, deploy, implement andtroubleshoot a SQL Server Project throughout the Life Cycle. I haveimplemented databases in SQL Server 2008 and 2008R2 for the manyprojects. I have created functions, stored procedures, triggers, andother database objects used as a back end of the projects databases tobe implemented by .Net applications. Such as Visual Studio, orASP.Net, I also have designed different forms and reports in MS SQL2008R2 as the front end application for those databases. I am actively looking for new opportunities in IT field. I havesuccessfully graduated from SetFocus and I am looking for a SQLDeveloper position where I can use my skills and hand on trainingwith SQL Sever 2008 and 2008R2 at SetFocus in combination with mytechnical background in Windows Systems. I have a passion for working as database developer and I am currentlypursuing a Master Program of Software Engineering at StrayerUniversity.Thank You 116