General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>My PK field is always name TableId, so in a Customer table, it would be CustomerID. That fieldname flows through to all other tables that use it. Also, I never, ever use underscore. Too difficult to type. I can use upper/lower case to differentiate enough.
Right, thats what I said I use, only it would be:
id_cust
Why the under score? Lets do an experiment, barley glancing through, tell me how many PKs or FKs (like you and I agree, the fieldname will flow through all the tables) are in this list:
GSDFG
SDFG
OIYID
HGHW
GIUIUID
JHGJQID
WQQVB
DVBSWQ
YUYJN
FGJID
Now how many in mine:
GSDFG
SDFG
ID_OIY
HGHW
ID_GIUIU
ID_JHGJQ
WQQVB
DVBSWQ
YUYJN
ID_FGJ
While the ability to point out ID fields in gibberish isn't much of an advantage, I think it doesn't hurt.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only