Hi all,
(warning - long post ahead)
I have been tasked with designing a database for my company which will
store trade information (it is a financial firm). It will need to
export this info into an excel file while converting some of the data
into an export format (example - we use B for buy, the firm we export
to uses BY). Eventually, accounting will also need reports from the
data.
I am inclined to use Access for this project since I am more familiar
with it. Would it be better to try and do it with SQL server? If I do
create it in Access, will it be hard to port to SQL server later?
Assuming I do it in Access, here's what I had in mind. The data will
consist of info about the trades which will be entered in by one
trader. This table will contain the following fields:
tblTrades
-AcctNum - the client's account number - should autofill client name
field - this info will be taken from a separate Accounts table, but
used should have option of adding new records.
-Price - price trade is made at
-TradeNum - the trade's "serial #" which is the primary key of this
table
-TradeDate - date trade is made - defaults to current day
-Quantity - number of shares
-SecurityType - user will choose from a list - this list will be
maintained in a separate SecurityType table
-Client name - will be autofilled after choosing the acct number
-CUSIP - a standard code for the trade - 9 char alphanumeric code -
user will fill in info in the next four fields which will be used to
compute the CUSIP. The CUSIP and associated info should be written to
a separate CUSIP table
-(four fields associated with the CUSIP)
Now, the Accounts table will be related to tblTrades by the acctnum
field (which is the pri key for tblAccounts). The SecurityType table
is related to tblTrades through the SecurityType field which is the
pri key for SecType. The same for tblCUSIP, which is linked to
tblTrades with it's pri key, CUSIP. Should I define these
relationships in the Access rel manager? I'm inclined to base my form
on a query which would relate the data and leaving them unrelated
otherwise - is this bad? Does anyone see any fatal design flaws here?
It's not a terribly complex db...
Assuming the basic premise is OK, my next thoughts go to form design,
which I'm not very familiar with. I created the above db and created a
data entry form for the user - tabular format, one line across to
enter data in (so UI is close to excel) and a continuous form since
the user needs to see all the previous trades entered. Would i be
better off using a subform to display the previous data?
I based the form I created off a query that pulls all the fields I
need on the form. In that query I defined the relationships. I used
unbound combo boxes to get the data for acctnum, sectype, and CUSIP.
Choosing the acct number fills in the client name. Everything was
working well until I added the CUSIP table and field - now when I
enter a number in the CUSIP (which should add that number to the CUSIP
table) the db tells me "cannot find a record in tblCUSIP with key
matching field CUSIP" - I got around it with an "after update" code
which adds the record, but is the basic premise here wrong?
I have tons of other questions, but I'll research them myself. If some
gurus out there could just let me know if I'm way off track, I'd
really appreciate it.
Cheers,
Jim
(warning - long post ahead)
I have been tasked with designing a database for my company which will
store trade information (it is a financial firm). It will need to
export this info into an excel file while converting some of the data
into an export format (example - we use B for buy, the firm we export
to uses BY). Eventually, accounting will also need reports from the
data.
I am inclined to use Access for this project since I am more familiar
with it. Would it be better to try and do it with SQL server? If I do
create it in Access, will it be hard to port to SQL server later?
Assuming I do it in Access, here's what I had in mind. The data will
consist of info about the trades which will be entered in by one
trader. This table will contain the following fields:
tblTrades
-AcctNum - the client's account number - should autofill client name
field - this info will be taken from a separate Accounts table, but
used should have option of adding new records.
-Price - price trade is made at
-TradeNum - the trade's "serial #" which is the primary key of this
table
-TradeDate - date trade is made - defaults to current day
-Quantity - number of shares
-SecurityType - user will choose from a list - this list will be
maintained in a separate SecurityType table
-Client name - will be autofilled after choosing the acct number
-CUSIP - a standard code for the trade - 9 char alphanumeric code -
user will fill in info in the next four fields which will be used to
compute the CUSIP. The CUSIP and associated info should be written to
a separate CUSIP table
-(four fields associated with the CUSIP)
Now, the Accounts table will be related to tblTrades by the acctnum
field (which is the pri key for tblAccounts). The SecurityType table
is related to tblTrades through the SecurityType field which is the
pri key for SecType. The same for tblCUSIP, which is linked to
tblTrades with it's pri key, CUSIP. Should I define these
relationships in the Access rel manager? I'm inclined to base my form
on a query which would relate the data and leaving them unrelated
otherwise - is this bad? Does anyone see any fatal design flaws here?
It's not a terribly complex db...
Assuming the basic premise is OK, my next thoughts go to form design,
which I'm not very familiar with. I created the above db and created a
data entry form for the user - tabular format, one line across to
enter data in (so UI is close to excel) and a continuous form since
the user needs to see all the previous trades entered. Would i be
better off using a subform to display the previous data?
I based the form I created off a query that pulls all the fields I
need on the form. In that query I defined the relationships. I used
unbound combo boxes to get the data for acctnum, sectype, and CUSIP.
Choosing the acct number fills in the client name. Everything was
working well until I added the CUSIP table and field - now when I
enter a number in the CUSIP (which should add that number to the CUSIP
table) the db tells me "cannot find a record in tblCUSIP with key
matching field CUSIP" - I got around it with an "after update" code
which adds the record, but is the basic premise here wrong?
I have tons of other questions, but I'll research them myself. If some
gurus out there could just let me know if I'm way off track, I'd
really appreciate it.
Cheers,
Jim
Comment