Professional Documents
Culture Documents
TASK PLAN
Mr. Ram runs a business on stock advisory service. Some of his clients trade stocks at a
loss by buying at a high price and selling at a low price. So he is in need of very simple
trading models with comparative results to show clients how they can grow the value of
their investment accounts with his stock picks.
The following are the attributes.
Task1: CO1, S3
1. Create the table using the following schemas.
Investor Table:
Allow null
Column name Data type Description Size
value
The serial number of the
AccountID int default no
account. (PK)
Name Varchar Name of account holder 15 no
Fund account associated with
Fund char 10 no
the account
Exchange Table:
Allow null
Column name Data type Description Size
value
The serial number of the
ExchangeID int default No
exchange (PK)
Name varchar Name of exchange 15 No
Market _Day Table:
Allow null
Column name Data type Description Size
value
Time when orders are
Day_Date timestamp default No
executed (PK)
Event:Table:
Allow null
Column name Data type Description Size
value
The serial number of the stock
StockID int default No
(PK)
The time when event is
Time timestamp default No
released
Event varchar Description of event 100 yes
Company Table:
Allow null
Column name Data type Description Size
value
The serial number of the stock
StockID int default No
(PK)
Name of the stock/company's
Name varchar 15 No
name
Ticker varchar Stock symbol 15 No
Limit int The stock can be traded default No
Percentage change of the
Valid float 10 No
stock
Allow null
Column name Data type Description Size
value
OpeningPrice decimal The price today at open (PK) (10,3) No
Time when orders are
Day_Date timestamp Default No
executed (FK)
Allow null
Column name Data type Description Size
value
ClosingPrice decimal The price today at close (PK) (10,3) No
Time when orders are
Day_Date timestamp Default No
executed (FK)
Market_Quote Table:
Allow null
Column name Data type Description Size
value
The serial number of the
StockID int Default No
stock (PK)
The serial number of the
MarketQuoteID int Default No
market quote ( FK)
OpeningPrice decimal The price today at open ( FK) (10, 2) No
Trade Table:
Allow null
Column name Data type Description Size
value
The serial number of the
StockID int Default No
market quote (PK)
The serial number of the
AccountID int Default No
account (FK)
The serial number of the No
ExchangeID int Default
exchange (FK)
TradingVolume int Number of stock being traded Default No