Kamis, 19 Desember 2013

[MS_AccessPros] Question on AutoNumber as Primary Key and Foreign Key on 2 large tables

 

Would any of you please educate me on this issue?


I have two tables in Access. Each table contains about 3000 rows and 100 columns. Currently the primary key for each table is the Stock Tickers.

For example, within Table 1, column A is Ticker, col B is Company Name, col C is stock price,....
Within Table 2, col A is Ticker, col B is Current Year EPS, col C is Next Year EPS.....

A friend told me that since I use the tickers (text) as primary key for both tables, my queries will by very slow, which they are. He suggested that I use Autonumber as primary key in table 1 and as foreign key in table 2.

My question are:

Since I have to delete Table 1 weekly and append it with new data, would the auto number in table 1 be "messed up" after each delete/append?

Secondly, if I use Autonumber in Table 1, how can I set up the foreign key in table 2 to make sure it matches the same numbers in table 1?

If any of you help to answer or send me where to study this subject, I would be much appreciative!

Thanks!
Tim

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar