Sql portfolio piggy_bank

513 views
436 views

Published on

Published in: Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
513
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
12
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Sql portfolio piggy_bank

  1. 1. <ul><li>.SQL Portfolio </li></ul><ul><li>Name </li></ul><ul><li>Email </li></ul>
  2. 2. <ul><li>Introduction: Create a banking database to handle 2 account types at this time, savings and checking. </li></ul><ul><li>Project Goals: Process transactions (withdraw, deposit, interest, fees), open, suspend, and reactivate accounts. Track customer information. </li></ul>
  3. 3. <ul><li>Create ERD Diagram </li></ul><ul><li>Shred in XML data </li></ul><ul><li>Stored Procedures to handle processes </li></ul>
  4. 5. <ul><li><Customer ID=&quot;1&quot; FirstName=&quot;John&quot; LastName=&quot;Doe&quot; Street=&quot;123 Fake Street&quot; City=&quot;Anytown&quot; State=&quot;NY&quot; zipcode=&quot;11280&quot; HomePhone=&quot;555-123-4567&quot; WorkPhone=&quot;555-456-7890&quot; MobilePhone=&quot;555-111-2345&quot; EMail=&quot;jDoe@someweb.com&quot;> </li></ul><ul><li><Accounts> </li></ul><ul><li><Saving ID=&quot;100000&quot; Balance=&quot;548.25&quot; AccountStatusId=&quot;1&quot;> </li></ul><ul><li><Transaction> </li></ul><ul><li> <Transaction ID=&quot;1&quot; TransactionTypeID=&quot;Initial Deposit&quot; Date=&quot;4/01/2007&quot; TransactionAmount=&quot;500.00&quot; NewBalance=&quot;500.00&quot; /> </li></ul><ul><li> <Transaction ID=&quot;5&quot; TransactionTypeID=&quot;Deposit&quot; Date=&quot;4/01/2007&quot; TransactionAmount=&quot;50.00&quot; NewBalance=&quot;550.00&quot; /> </li></ul><ul><li> <Transaction ID=&quot;9&quot; TransactionTypeID=&quot;Withdraw&quot; Date=&quot;4/01/2007&quot; TransactionAmount=&quot;1.75&quot; NewBalance=&quot;548.25&quot; /> </li></ul><ul><li> </Transaction> </li></ul><ul><li></Saving> </li></ul><ul><li><Checking ID=&quot;100001&quot; Balance=&quot;650.00&quot; AccountStatusId=&quot;1&quot; OverdraftAccount=&quot;100000&quot;> </li></ul><ul><li><Transaction> </li></ul><ul><li> <Transaction ID=&quot;4&quot; TransactionTypeID=&quot;Initial Deposit&quot; Date=&quot;4/01/2007&quot; TransactionAmount=&quot;450.00&quot; NewBalance=&quot;450.00&quot; /> </li></ul><ul><li> <Transaction ID=&quot;6&quot; TransactionTypeID=&quot;Deposit&quot; Date=&quot;4/01/2007&quot; TransactionAmount=&quot;50.00&quot; NewBalance=&quot;500.00&quot; /> </li></ul><ul><li> <Transaction ID=&quot;44&quot; TransactionTypeID=&quot;Deposit&quot; Date=&quot;4/01/2007&quot; TransactionAmount=&quot;150.00&quot; NewBalance=&quot;650.00&quot; /> </li></ul><ul><li> </Transaction> </li></ul><ul><li></Checking> </li></ul><ul><li></Accounts> </li></ul><ul><li></Customer> </li></ul><ul><li>-- Insert Customer information into Cust.Customer table </li></ul><ul><li>set identity_insert dbo.Customer on -- allow insert into identity column </li></ul><ul><li>Insert into dbo.Customer (CustomerID, FirstName, LastName, Address1, City, State, ZipCode, HomePhone, WorkPhone, CellPhone, EMail) </li></ul><ul><li>Select * from </li></ul><ul><li>OPENXML (@docHandle, '/Bank/Customer', 1) </li></ul><ul><li>with (ID int, </li></ul><ul><li>FirstName nvarchar(15), </li></ul><ul><li>LastName nvarchar(20), </li></ul><ul><li>Street nvarchar(30), </li></ul><ul><li>City nvarchar(20), </li></ul><ul><li>State nchar(2), </li></ul><ul><li>zipcode nchar(5), </li></ul><ul><li>HomePhone nvarchar(13), </li></ul><ul><li>WorkPhone nvarchar(13), </li></ul><ul><li>MobilePhone nvarchar(13), </li></ul><ul><li>EMail nvarchar(30) </li></ul><ul><li>) </li></ul><ul><li>set identity_insert dbo.Customer off -- Turn off identity insert after insert has been completed </li></ul>
  5. 6. <ul><li>Add General Overdraft </li></ul><ul><li>Add New Customer </li></ul><ul><li>Add Overdraft Account </li></ul><ul><li>Close Account </li></ul><ul><li>Create Checking Account </li></ul><ul><li>Create Savings Account </li></ul><ul><li>Deactivate Account </li></ul><ul><li>Deposit </li></ul><ul><li>Get Account Balance </li></ul><ul><li>Get Transfer for Last Month </li></ul><ul><li>Reactivate Account </li></ul><ul><li>Transfer </li></ul><ul><li>Update Account </li></ul><ul><li>Update Customer </li></ul><ul><li>Update Interest Rate </li></ul><ul><li>Withdraw </li></ul>
  6. 11. <ul><li>Account History Any Month </li></ul><ul><li>Account History Current Month </li></ul><ul><li>Account History Past Month </li></ul><ul><li>Account Details </li></ul>

×