Hi,
I've always wondered what are the pros and the cons of these ID naming styles in SQL:
CREATE TABLE cache (
id INT AUTO_INCREMENT,
PRIMARY KEY(id)
);
CREATE TABLE cache (
cid INT AUTO_INCREMENT,
PRIMARY KEY(id)
);
CREATE TABLE cache (
cache_id INT AUTO_INCREMENT,
PRIMARY KEY(id)
);
Why some developers use "id" in each table, some prefix it with one letter of the table name or with the entire table name along with one underscore?