LAB 2:  Creating the Investments Database

In this lab you are to create the MANAGER, PORTFOLIO and HOLDING tables in the Investments Database.  The STOCK table was created in Lab 1.
 
INVESTMENTS DATABASE
MANAGER

Manager Manager 
Number   Name    Salary

M1      Smith   45000.00
M2      Brown   62500.00
M3      Jones   43900.00

 

STOCK

Stock     Stock             Current
Symbol    Name              Price

JFM    Jetform              21.75
JDS    JDS Fitel            20.55
NTL    NorTel               54.10
COS    Corel                 3.16
MLT    Mitel Corp.          14.30
CSN    Cognos               27.50
RIM    Research In Motion   90.95
 

PORTFOLIO

Portfolio  Manager 
Number     Number   Cash

P001        M2     25000
P004        M3     10000
P005        M2     50000
P008        M3     37500
P011        M3      8000

 

HOLDING

Portfolio Stock Purchase Number Purchase
Number    Symbol  Date   Shares  Price

P001    JFM    10-1-1998   300   19.55
P004    NTL    10-2-1998   200   52.90
P001    CSN    10-5-1998   150   29.90
P005    MLT    10-6-1998   500   12.00
P001    JFM    9-30-1998   300   19.30
P008    COS    9-29-1998   800    4.50
P008    CSN    9-29-1998   500   25.00
P001    NTL    9-30-1998   250   56.40
P005    COS    9-30-1998  1200    3.60
P001    CSN    10-6-1998   250   29.75
P001    COS    10-7-1998   200    3.50
P001    JFM    10-2-1998   300   19.55
P004    MLT    10-13-1998  200   12.20
P005    MLT    10-13-1998  600   12.25
P008    JDS    10-28-1998  610   21.50
P008    JFM    10-14-1998  500   20.50
 


 
 
  1. Create the Manager, Portfolio and Holding tables.  Include a primary key clause for each table;  the foreign keys will be added in Lab 3.
  2. Insert the data shown for the Manager table.
  3. Run the script file:  portfoliodata.sql to load the data into the Portfolio table.
  4. Run the script file:  holdingdata.sql to load the data into the Holding table.