Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Reynaldo Fadri’S Porfolio


Published on

Reynaldo Fadri Setfocus Portfolio

  • Be the first to comment

  • Be the first to like this

Reynaldo Fadri’S Porfolio

  1. 1. Reynaldo Fadri<br />SQL Server Portfolio<br />Phone: 818-373-9202<br />Email:<br /><br />1<br />
  2. 2. Table of Contents<br />Introduction. . . . . . 3<br />JungleBooks . . . . . 4<br />Library . . . . . . 8<br />PiggyBank . . . . . . 14<br />DBA Practicals . . . . . 19<br />Reporting Services. . . . . 22<br />BlockFlix . . . . . . 28<br />About Me. . . . . . . 34<br />2<br />
  3. 3. Introduction<br /><ul><li>This portfolio contains examples of my development skills in MS SQL Server. It is a result of my work during a 13-week hands-on experience with The SetFocus Master’s Program.
  4. 4. SetFocus utilizes Microsoft Official Curriculum in conjunction with its own materials to produce some of the following coursework:
  5. 5. RDBMS and XML
  6. 6. Querying using Transact SQL
  7. 7. Implementing and maintaining a MS SQL Server 2005 Database
  8. 8. Designing an MS SQL Server 2005 Infrastructure
  9. 9. Designing security for MS SQL Server 2005
  10. 10. Designing High Availability Database Solutions using MS SQL Server 2005
  11. 11. Troubleshooting and Optimizing Database Servers using MS SQL Server 2005
  12. 12. SQL Server Integration Services
  13. 13. SQL Server Reporting Services</li></ul>3<br /><ul><li>In addition to the coursework and programming labs, the program included challenging real-world projects where I have applied the skills experienced in class.</li></li></ul><li>Junglebooks is a book company which has a database consisting of books, authors, orders and customers.<br />In this project a database diagram is given and a database is created according to the diagram.<br />Fictitiously, we are working with an application programmer who is building a client application using .NET.<br />We are asked to create queries for different forms of the application.<br />For example, The Cheap Books form displays available books below a certain price. The user enters 15 in the txtUnitPrice form field. Return ISBN, title and publisher in order by title. <br />The sample code would be …<br />4<br />JungleBooks<br />
  14. 14. 5<br />JungleBooks Database Diagram<br />
  15. 15. 6<br />Large Orders page from JungleBooks<br />The Large Orders page is a report displaying the largest number of items sold per order. Display the Order ID, Customer ID and Name along with the total number of items they ordered. Display the record with the largest quantity first. Alias as: “Order ID’, ‘Cust ID’, ‘Customer’ and ‘# of items’.<br />
  16. 16. 7<br />Search for Customers by Credit Card page from JungleBooks<br />The Search For Customers by Credit Card page allows the user to search for Customers by the last four digits of their credit card number. The user inputs ‘’7889” in the txtLastFourDigits form field. Return all information from the Customer table. Alias as: ‘ID’, ‘Name’, ‘CurrentAddress’, ’CardType’, ‘CardNumber’, ‘Expires’. In case you have different customers using the same credit card, order by Customer ID in ascending order. <br />
  17. 17. 8<br />Library<br />The Library Database is created to support the principal functions of a lending library’s day-to-day operations.<br />This database has been used for a couple of projects:<br />Create queries against the Library Database that returns a number of results which uses string concatenations, different types of joins, UNION statements, CASE statements, Execution plan, date manipulation, and aggregate functions.<br />Design back-end stored procedures that satisfy some of the functionalities of Library operations such as Add Adult, Add Juvenile, Check in a Book, Check out a Book, Add Book, Renew Membership, Change Juvenile to Adult, Update Adult. The procedures incorporated input validations and provides adequate error handling using TRY/CATCH.<br />
  18. 18. 9<br />Library Database Diagram<br />
  19. 19. 10<br />Sample Library Query 1<br />Write and execute a query that returns member_no, firstname, lastname and sum of fine_paid for members who have paid the highest fines to date. Members should only appear once in the list. Display the highest fine first. If more than one member has paid the same amount display the records in order by member_no.<br />
  20. 20. 11<br />Sample Library Query 2<br />Using joins and a UNION clause, write a query to retrieve a single list of members both adult and juvenile, who have reserved ISBN number 288. The list must include the ISBN, title, member_no and name (i.e.: Smith, John) of each member who has the reservation. Additionally, the list should indicate whether the member is an adult or a juvenile. Output the records by name.<br />
  21. 21. 12<br />Sample Library Stored Procedure 1<br />Add A Juvenile member<br />
  22. 22. 13<br />Sample Library Stored Procedure 2<br />Check Out Item<br />
  23. 23. 14<br />PiggyBank<br />The PiggyBank Database simulates bank operations such as Overdraft Accounts, Customer and Accounts relationships, and Transactions.<br />This database has been used for a couple of projects:<br />Create an Entity Relationship Diagram given some specifications such as Overdraft Fees, Error Information when a transaction fails, Login Failures, and Customer/Account relationships.<br />Design back-end stored procedures, DDL/DML triggers, parameterized stored procedures that select from views. Some of the actions created are Create/Update Customer, Create Checking/Savings Accounts, Deposit/Withdrawal Procedures, Simulate ATM Balances, Customer Account History (bank statements) and Use of Overdraft Accounts.<br />
  24. 24. 15<br />PiggyBank Database Diagram<br />
  25. 25. 16<br />PiggyBank Stored Procedure Example<br />Create a Deposit<br />
  26. 26. 17<br />PiggyBank DDL/DML Example<br />
  27. 27. 18<br />PiggyBank Stored Procedure Selecting from a view Example<br />
  28. 28. 19<br />DBA Practicals<br />The DBA Practicals project are numerous examples and questions relating to Designing, Troubleshooting, Tuning and Optimizing Database Servers using Microsoft SQL Server 2005<br />Here are some of the topics that I have worked on<br /><ul><li> Snapshot Restore Scenario
  29. 29. Deleted Table Restore
  30. 30. Schemas
  31. 31. Statement Permissions
  32. 32. Ownership Chains
  33. 33. Execution Context
  34. 34. Data Partitioning
  35. 35. Developing an Archive Plan
  36. 36. Web Application using XML
  37. 37. Using Bulk Insert
  38. 38. Optimizing Queries
  39. 39. Securing SQL Server
  40. 40. Choosing Replication Types
  41. 41. Performance Counters & Alerts
  42. 42. XML, X-Queries
  43. 43. Case Studies</li></li></ul><li>20<br />DBA Practicals – Securing a SQL Server Solution<br /> <br />You can mitigate code-injection attacks by doing the following:<br /><ul><li>Constrain and sanitize input data - You can check for known good data by validating for type, length, format, and range.
  44. 44. Use type-safe SQL parameters for data access – For example, you can use parameters with stored procedures or dynamically constructed SQL command strings.
  45. 45. Use an account that has restricted permissions in the database – Grant execute permissions to stored procedures in the database and do not provide direct table access.
  46. 46. Avoid disclosing database error information – Do not disclose detailed error messages to the user.</li></ul>2. You can use SQL Server 2005 Surface Area Configuration tool to minimize the surface attack area for SQL services and components quickly.<br /> <br />3. You can secure the sa login by Using Windows Authentication Mode instead of Mixed Mode; disable the sa login (Status page under the Login Properties of sa); and assign a strong sa password.<br /> <br />4. To implement the principle of least privilege for Notification Services service accounts, a specific user account should be created with only the privileges that are needed to run Notification Services. If Notification Services is only running on the local server then use a local user account. If Notification Services is running on the network then use a domain user account. Using an administrator account, the Local Service account, or the Network Service account are not recommended.<br /> <br />5. When upgrading to SQL Server 2005, xp_cmdshell does not run anymore because it is disabled on new installations. It can be enabled from Surface Area Configuration for Features tool or by running sp_configure.<br />
  47. 47. 21<br />DBA Practicals – For XML Explicit Example<br />Results:<br />Results:<br />
  48. 48. 22<br />Reporting Services<br /> In the Reporting Services Project I have created SSRS Reports against the Library Database.<br />Here is a list of some of the reports created:<br /><ul><li>Complete List of Books
  49. 49. Number of Copies per Title
  50. 50. Most Active Members
  51. 51. List of Books on Loan
  52. 52. Adult Member Detail
  53. 53. ‘Kids Club’ Report
  54. 54. Expired Memberships
  55. 55. Reference and Special Collection Items
  56. 56. Current Fines for Overdue Books
  57. 57. Total Fines by Member</li></li></ul><li>23<br />Reporting Services – Most Active Members<br />Design a “Most Active Members” (# of checkouts/loans per member) with report parameters for calendar month and calendar year. Use just the loanhist table for this report- however if you include current loans (from the loan table), 1 point EC will be granted.<br />
  58. 58. 24<br />Reporting Services – Adult Member Detail, Part 1<br />“Adult Member Detail” report. Details about adult members: name, address, total number of active checkouts (loan table), with a drill down option for total fines assessed, total fines paid, total fines waived, and total due (for now- use loanhist only for this fine information). Please also include a hyperlink (drill through) to a second report showing any dependants and that displays each juvenile’s checkout/fine information (also via drill down). (Note: address information here is not necessary as it will be the same as the sponsoring adult in the Library database). <br />
  59. 59. 25<br />Reporting Services – Adult Member Detail, Part 2<br />
  60. 60. 26<br />Reporting Services – ‘Kids Club’ Report<br />Design a “Kids Club” report. There is a special reading club (among many other such efforts) for 7 year olds, 8 year old, and 9 year olds. Design a report that displays all juvenile library members that belong within these three groups. Please distinguish between the three groups on the report by utilizing conditional expressions to implement an appropriate color scheme, and be sure to explain this scheme to the user in a legend. Creativity in naming such groups, and decorating the report would be appreciated. Please be sure that this report calculates a birthday by the given date- and not the datetime of the given birthdate. <br />
  61. 61. 27<br />Reporting Services – Current Fines for Overdue Books<br />“Current Fines for Overdue Books.” A report for all overdue books, member name, and current fines due against books that have not been checked in (use the Loan table – don’t worry about fine information in the Loan History table) Calculate these fines as 25 cents per day. <br />
  62. 62. 28<br />BlockFlix<br /> BlockFlix is our Final Group Project where I was honored to be Project Manager. This database implemented almost all I have experienced in the program. A Presentation was conducted by the group upon Graduation. The following are some of the specifications for the project:<br />The Database will be used to track inventory of movies, customers and their membership types, and payments by customers.<br />Show a demo of inserting an XML file containing new releases into the database showing Title, Genre, Rating, up to 3 actors, 2 producers, etc.<br /> Each store has an individual database to keep track of local sales information which is uploaded to the central database nightly via snapshot replication.<br />Create reports for upper management and marketing department for lost/damaged movies, most rented movies, most active customers, list of customers in each membership type, etc.<br />Research details in how to stream online video rentals and propose how to implement this for SQL Server 2005 as well as SQL Server 2008.<br />Details on implementing partitioning, high availability, hardware considerations, users, groups, logins, permissions, roles, encryption, certificates, and application security features<br />
  63. 63. 29<br />BlockFlix Database Diagram<br />
  64. 64. 30<br />BlockFlix – Monthly Fee Stored Procedure<br />RESULTS<br />“Before”<br />“After”<br />
  65. 65. 31<br />BlockFlix – Credit Card Encryption Code<br />Sensitive Data Encryption:<br />Credit card number – Encrypted<br /> Real card number – Not Directly Stored<br /> Only BFManager role can get the real number<br /> Encrypted card number is stored with symmetric / asymmetric keys protection.<br />
  66. 66. 32<br />BlockFlix – High Cost Hardware Proposal<br />Central Database:<br />4 Dell PowerEdge 2950 III Rack Server (Configured N+1 Clusters)<br />2 Quad-Core Intel Xeon Processors 5400 series at 3.33GHz<br />8GB 667MHz Dual Ranked DIMMs<br />Microsoft Windows Server 2008 Datacenter x64 bit<br />Microsoft SQL Server 2005 Enterprise Edition<br />Dell PowerVault NX1950<br /> 6.75TB (450GB x 15 Serial Attached SCSI Hot Plug Hard Drives)<br />RAID 1+0 Configuration<br />Store Database:<br />3 Dell PowerEdge 840 (Configured for Database Mirroring)<br />Implemented with High Safety Mode - Witness Server for Automatic Failover<br />CENTRAL DATABASE – N + 1 Cluster<br />STORE DATABASE - Database Mirroring – High Safety mode with Automatic Failover<br />
  67. 67. 33<br />BlockFlix – Video Streaming<br />SQL Server 2005 supports standard binary large object (BLOB) through varbinary(max) datatype.<br />Issues with the varbinary(max) datatype in SQL Server 2005 was performance, maintaining transactional consistency between data, managing backup and restore and scalability issues.<br />In SQL Server 2008, they introduced a new feature called, filestream.<br />FILESTREAM:<br />An attribute/property to set on varbinary column so that the data is stored on the file system. (Binary data is stored as individual files outside the database.)<br />Transact SQL statements apply<br />Limitation of 2GB file size on the varbinary(max) column removed<br />Filestream data is secured like other data, by granting permissions at the table or column levels.<br />Filestreams stored in the filestream groups.<br /><ul><li>SQL Server 2005 supports standard binary large object (BLOB) through varbinary(max) datatype.
  68. 68. Issues with the varbinary(max) datatype in SQL Server 2005 was performance, maintaining transactional consistency between data, managing backup and restore and scalability issues.
  69. 69. In SQL Server 2008, they introduced a new feature called, filestream.
  70. 70. FILESTREAM:
  71. 71. An attribute/property to set on varbinary column so that the data is stored on the file system. (Binary data is stored as individual files outside the database.)
  72. 72. Transact SQL statements apply
  73. 73. Limitation of 2GB file size on the varbinary(max) column removed
  74. 74. Filestream data is secured like other data, by granting permissions at the table or column levels.
  75. 75. Filestreams stored in the filestream groups.</li></li></ul><li>34<br />About Me<br /> Graduated with a Bachelors in Electrical Engineering, I have pursued the Information Technology field in 1996. At the time, I have become a Certified Novell Engineer and worked with a CTS Group and Nat Sherman Inc. in the New York City.<br /> Since then, I moved to Los Angeles and joined VivoRx Inc. in 1999. During this time, I obtained MCSE status. As a Systems Administrator, I have been working for VivoRx, AmCyte, and ReNeuron for almost 9 years. In this position I acquired the necessary skills to manage an IT infrastructure of a small biotech company. Although my primary responsibilities include maintaining servers, backups, and workstations in a Windows environment, I have implemented databases in SQL Server for scientists to use in scientific analysis. I have created functions, stored procedures, triggers, and other database objects in the back end, and designed forms and reports in MS Access for the front end application.<br /> ReNeuron closed its Santa Monica branch in May of 2008 due to the economic slowdown. After looking for new opportunities in IT, I have decided to update my skills in SQL and enroll in the SetFocus SQL Masters Program.<br /> I am looking for a SQL Database Administrator position where I can use my skills I have experienced with SetFocus in combination with my technical background with Windows Systems. I have a passion of working as database developer and currently pursuing learning programming languages such as .NET, which goes hand-in-hand with SQL.<br />