Simple SQLServer Table Design Question


Author
Message
Scott
Scott
StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)StrataFrame User (182 reputation)
Group: Forum Members
Posts: 176, Visits: 1.5K
I am not a SQLServer guy.  We are moving our current VFP->DBF system to .NET->SQLServer and I have some table degsin questions.  In our VFP system we had a transaction code table with a 4 character code key field and a transaction table with the the transaction code (key for the code in the transaction code table) and other transaction specific details.  I want to maintain that same design but am hearing arguments that I should use an integer key and have the integer key in the transaction table.  Now I realize that integer keys should be faster when doing joins but my logic is that I don't have to even do a join on the table to get the code.

I should mention that the transaction codes are not arbitrary,  the values are like "PAY,NOT,NC" and the action of the transaction is determined by these specific code values, so if integer keys are used, any time I want to process a transaction I would have to lookup the code to determine the appropriate action.

I have several other tables that are in a similar type situation, like schedule codes and appointments.  So am I wrong here or should I use the character keys in situations like these.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search