Demo Data

The following data is for the demo of your online stock trading. You should also use this data to test the SQL DML statements you write for Project Assignment No. 2. Please input the data into your relational database system according to the schema design you produced for Project Assignment No. 1. As for the actual demo, please ensure that by the time of your scheduled demo, you have initialized your database with the data provided below, and that everything is ready to go, including the machine you will use and your SQL/HTML/Javascrip/JSP code.
 

Important!

Please note that, for the demo, you should provide the interface that will allow the user of your system to execute an order to buy or sell stock. As specified in the Requirements Specification Document, this will involve the implementation of manager-level transaction to set the share price of a stock in order to simulate market fluctuations in a stock's share price. This transaction should also set the date/time anytime a share price is updated, so that the date/time an order is executed can be recorded.

Your user interface should also allow one to determine the broker (customer representative) for any particular stock order.

Clients

ClientId LastName FirstName Address City State ZipCode Telephone Email CreditCard Rating
111-11-1111 Yang Shang 123 Success Street Stony Brook NY 11790 516-632-8959 syang@cs.sunysb.edu 1234-5678-1234-5678 1
222-22-2222 Du Victor 456 Fortune Road Stony Brook NY 11790 516-632-4360 vicdu@cs.sunysb.edu 5678-1234-5678-1234 1
333-33-3333 Smith John 789 Peace Blvd. Los Angeles CA 93536 315-443-4321 jsmith@ic.sunysb.edu 2345-6789-2345-6789 1
444-44-4444 Philip Lewis 135 Knowledge Lane Stony Brook NY 11794 516-666-8888 pml@cs.sunysb.edu 6789-2345-6789-2345 1

Accounts

ClientId Account# AcctCreatDate Stock NumShares
444-44-4444 1 10-1-06 GM 250
444-44-4444 1 10-1-06 Ford 100
222-22-2222 1 10-15-06 IBM 50

Employees

SSN LastName FirstName Address City State Zipcode Telephone StartDate HourlyRate
123-45-6789 Smith David 123 College road Stony Brook NY 11790 516-215-2345 11-1-05 $60
789-12-3456 Warren David 456 Sunken Street Stony Brook NY 11794 631-632-9987 2-2-06 $50

*David Warren is the Manager of the company.
 

Stocks

Symbol Name Type SharePrice NumShares
GM General Motors automotive 34.23 1,000
IBM IBM computer 91.41 500
F Ford automotive 9.0 750

 

Orders

OrderId Stock OrderType NumShares ClientAcct PriceType
1 GM buy 75 444-44-4444 1 market
2 IBM sell 10 222-22-2222 1 trailing stop 10%
2 IBM sell 10 222-22-2222 1 $90

The last row of the above table indicates that order no. 2 was executed at a share price of $90 after the share price of IBM climbed to $100 and, for the first time since the order was placed, dropped down 10% below this maximum value. Again, you should provide the underlying transaction and underlying interface to allow the manager of your system to carry out such a trailing-stop stock transaction.



Good luck!