Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mixing Data Types

Status
Not open for further replies.

lizray

Programmer
May 14, 2008
126
AU
I have a main table with a field "NameID" which is an Index and is Autonumber, thereby becomes a LONGINTEGER type. I only need up to 20,000 names and would like to use the INTEGER as the type for field in other tables (to reduce the size) that link to this main table. It seems to work ok, but can anyone tell me if there is any long term danger (or confusion) in doing this ?
 
Although each table may have up to 20000 names, there are many many tables
 
many many tables" with names sounds like a normalization issue. I would just use long integer. Have you done the math to determine how much file space you would save?

Duane
Hook'D on Access
MS Access MVP
 
I would have to think even with millions of names, any savings going from a 4 byte data type to a 2 byte data type, would be drastically overshadowed by the cost of additional tables.
 
You are looking for efficiencies in the wrong places. If anything slows down your database are takes up a lot of room, I can guarantee you it has nothing to do with using long integers.

I encourage you just to use long integer types and don't give a second thought about it. You may think it will always be 20000 names, but believe things always change. And it's not going to affect your database one bit.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top