I have a database design question that i'm trying to think through. If I have a stock portfolio application, what would the database look like? I know I'd have the following: Transaction Table - transid - stocksymbol - stockprice - transactiondate - numberofshares - ownerid (fk) - transactiontype (buy or sell) Owner Table - ownerid - email - password Put how would I query the transactions to bring up a portfolio of stocks they own? Or would I have to create a new portfolio table? And if so, what would the fields in that table be and how would it work? Thanks for any help in advance!
stock lookup table user table user portfolio table transaction table select * from userportfolio where userid = <id of user> Code (markup): to get a list of a users stocks