New database

D

desai.rohit27

hi. i have multiple stocks for which i want to keep a track. each day
i will enter the opening price, closing price, etc for each stock for
that day. please suggest an appropriate database design. please note
that i would also like to perform calculations on this data. thanks.
 
A

Arvin Meyer [MVP]

hi. i have multiple stocks for which i want to keep a track. each day
i will enter the opening price, closing price, etc for each stock for
that day. please suggest an appropriate database design. please note
that i would also like to perform calculations on this data. thanks.

Unless, there's after-hours trading, the opening price for today will always
be the closing price from yesterday, so you'll only need to track closing
prices. You'll also need 3 tables:

Table 1 will define the stock
Table 2 will define the purchase and sale
Table 3 will track the price

You may need other lookup tables like brokers, referrals, etc. Table 2 will
work only if you sell your stock in the same lots that you buy it (most
people do, but large investors may not)
 
Top