dbTalk Databases Forums  

Re: Out for Advice - and possibly a programmer...

comp.database.ms-access comp.database.ms-access


Discuss Re: Out for Advice - and possibly a programmer... in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Johnny Meredith
 
Posts: n/a

Default Re: Out for Advice - and possibly a programmer... - 04-01-2004 , 11:42 PM






Here's how I would set it up:

Tables: Description:
Positions Holds new positions
PositionTypes Look up for position types
Transactions Holds transactions on positions
TransactionTypes Look up for transaction types

Here's the fields in each table:
Positions:
pkPositionID (Primary key, autonumber)
fldPositionType
positionDescription

PositionTypes:
pkPositionTypeID (Primary key, autonumber)
fldPositionType

Transactions:
pkTransactionID (Primary key, autonumber)
fkPositionID (Foreign key to Positions table)
fldDate
fldTransactionType
fldQuantity
fldPricePerUnit

TransactionTypes:
pkTransactionTypeID (Primary key, autonumber)
fldTransactionType

Relationships:
One Position has many Transactions

I actually set this database up, so email me and I'll send it to.
The basic idea is to divide the data up into its logic relationships (e.g. 1
position has 10 transactions so have separate tables for positions and
transactions.) This avoids repeating everything about a position when you
buy it and when you sell it (this is what you would have to do if you kept all
the information in a spreadsheet.)

Add as many fields as you can think of now or add fields later as you need
them. Remember, you can query/sort/sum etc. on those fields later with ease.
Everything in you post is possible, though, with the above table structure.

Later,
Johnny

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.