Re: A newbie paradox: is this a PK-FK (relationship) problem, or programming problem?
Date: Sun, 23 Dec 2007 18:13:53 GMT
you're welcome; as i said, it should give you a solid core guideline. just stick to the normalization rules and you'll be fine. :)
"raylopez99" <raylopez99_at_yahoo.com> wrote in message news:43c5d36b-e576-4ad0-b207-d4e43ce1d7dc_at_i3g2000hsf.googlegroups.com... On Dec 22, 4:38 pm, "tina" <nos..._at_address.com> wrote:
Thanks Tina! I like your solution, it seems to make sense and even be in Third Normal Form or somesuch...very nice!
I will model it and if I have any problems will report back.
> PersonID (pk)
> <other fields that describe the person only.>
> StockSymbol (pk)
> <other fields that identify the stock only.>
> BrokID (pk)
> AcctID (pk)
> PersonID (fk)
> BrokID (fk)
> <other fields that describe a specific account for a specific person.>
> AcctStockID (pk)
> AcctID (fk)
> StockSymbol (fk)
> TransID (pk)
> AcctStockID (fk)
> <other fields that describe a specific transaction of a specific stock in
> specific account.>
> the relational structure is
> tblPersons.PersonID 1:n tblAccounts.PersonID
> tblBrokerages.BrokID 1:n tblAccounts.BrokID
> tblAccounts.AcctID 1:n tblAccountStocks.AcctID
> tblStocks.StockSymbol 1:n tblAccountStocks.StockSymbol
> tblAccountStocks.AcctStockID 1:n tblTransactions.AcctStockID
> tblAccounts is a junction (linking) table between tblPersons and
> tblAccountStocks is a junction (linking) table between tblAccounts and
> and tblTransactions is a simple child table of tblAccountStocks.
> so you can trace each transaction record back to a specific stock in a
> specific account belonging to a specific person.
> i don't know a thing about stock markets and trading, so i imagine this is
> simplified structure,
Received on Sun Dec 23 2007 - 19:13:53 CET