Questions tagged [naming-convention]

83 questions
87
votes
13 answers

How should I best name my timestamp fields?

When I am looking to create some timestamp fields (or other date/time style fields), what is the best way to name them? Should I just put record_timestamp?
garik
  • 6,722
  • 10
  • 43
  • 56
23
votes
9 answers

Is there a reason to use extremely abbreviated table names?

We're using a database setup from a vendor's application that has horrifically hard to read database table names, and no documentation on what is stored where. I can see why one might want to obfuscate their table structure in a proprietary app, but…
Ben Brocka
  • 2,063
  • 6
  • 28
  • 38
4
votes
4 answers

Should I use a Column naming convention or rely on column descriptions?

Frankly I am stunned that after some basic (very basic) internet searches I have not been able to find a comprehensive naming convention or guideline or SQL object and column naming. The parallel I'm used to is in the .NET development world where…
kingdango
  • 177
  • 1
  • 1
  • 8
3
votes
1 answer

Lookup table naming convention?

Is there a naming convention for lookup tables? I cannot see any declaration by oracle or anything consistent on google. However I assume some of you professional DBAs follow a convention? Perhaps there is a convention which occurs the most when you…
cecilli0n
  • 305
  • 1
  • 4
  • 9
3
votes
2 answers

Including the substring "_id" in column names

I have a table of Teams. Each Team has an ID. I have another table that holds Players. Each Player is assigned to a team. So my tables might look something like CREATE TABLE players ( id INTEGER PRIMARY KEY name STRING team_id…
MxLDevs
  • 339
  • 1
  • 4
  • 10
3
votes
0 answers

Naming the parts of a supertype/subtype pattern

I am doing more extensive work with supertyping and subtyping as it solves some problems in a very useful way. In particular, I am enhancing a web application where many things need to be subject to security—pages, reports, actions, menus, and so…
ErikE
  • 4,305
  • 4
  • 28
  • 39
2
votes
1 answer

What is the correct name for "relational role"?

If I want to describe a column as one of the following: Surrogate key Natural key Foreign key Attribute etc. then what do I call this list? Relational roles? I don't think "column type" quite cuts it due to confusion with "data type".
jl6
  • 805
  • 7
  • 15
2
votes
1 answer

Do shorter names exist for "one-to-many", "one-to-one", "many-to-many" relationships?

In terms of generic variable naming or even everyday geek discussion, do shorter and "cleaner" terms exist for one-to-one, one-to-many, and many-to-many relationships. For example, in discussion of religion, one can say "relating to many…
Charles Burns
  • 251
  • 2
  • 9
2
votes
2 answers

Case style of tables and field (Naming Conventions)

What is best practice for naming dbs, tables (collections) and fields among DBMSs? I mean casing style, for example AaaBaa,aaa-bbb, aaa_bbb, AAA-BBB, aaaBbb, ... I think if one exists it should be applicable to all DBMSs (MySQL, MongoDB, Oracle,…
Real Dreams
  • 261
  • 1
  • 4
  • 12
2
votes
1 answer

Recommended user ID column names to use

I use user IDs a lot in tables, and I would like to find out when naming these columns, what's the best way to go about naming them. Should you be specific to what the user ID is, or should you keep using the same column name(s) to keep it…
Andrew S
  • 133
  • 1
  • 5
1
vote
1 answer

How should I entitle date columns?

Is there any convenience in name date-time related columns? created and delivered, … or createdTS, deliveredTS or createdAt, deliveredAt or…
Real Dreams
  • 261
  • 1
  • 4
  • 12
1
vote
0 answers

Naming convention for columns with same name (but different logically)?

How do I name columns in my database tables which have the same name in outside world but are logically separated? Lets say an example Company Share: 100% of 50% Now I have two company shares: 100 percent and 50 percent. I could rename them as…
Zo Has
  • 111
  • 3
1
vote
1 answer

Proper name for reference tables in OLTP

I know this might be a silly question. But I really appreciate accepting and answering this question. When I have an OLTP database with some big tables like orders and items. I have other tables (similar to dimension tables in OLAP) where we store…
Lamar
  • 123
  • 2
1
vote
3 answers

Best name to name a table

The project I am currently working request me to name the tables to something like: df_cmn_aum_xx_typ_cur instead of something like courses. Are there some known standards or best practices to recommend my bosses to abandon this convention?
Raul Luna
  • 111
  • 3
1
vote
0 answers

Redundancy in table names / Table naming convensions

I am creating some templates in my database that users would be able to use to help set up some of their data. For example, I have the following tables (simplified of course): store (id, store_name) product (id, product_name) product_template(id,…
kojow7
  • 151
  • 1
  • 10
1
2