Questions tagged [naming-convention]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
12 votes
2 answers
2k views

Should I call my UUID primary key column ID or not?

I'm working on a database design that extensively uses UUIDs for PRIMARY KEYs. However, this confronts me with a very consequential choice. How do I name these columns? I would call them uuid, except ...
user avatar
  • 267
1 vote
1 answer
77 views

Naming conventions for views and materialized views: "*_v", "v_*", "*_mv", "mv_*" or none? [closed]

My view stores quality metrics for various gizmos1 in the database. Today I designed it to be a view. In a few years, as we produce more gizmos, it may need to be changed to a materialized view. I was ...
user avatar
0 votes
1 answer
53 views

Best practice for SQL table names when using sub namespaces that exceed maximum table name length

I have a MySQL database that includes many tables named according to a namespace that uses sub names and underscores (_ as in a_b_c), such as the following: life_domain_kingdom_phylum ...
user avatar
  • 124
-1 votes
1 answer
112 views

What does the "wi" stand for in SQL Azure Automatic Index Naming? [closed]

I have a SQL Database on Azure that is giving me a performance recommendation for an index. What does the "wi" part of the name? I'm guessing something to do with the include part of the ...
user avatar
0 votes
1 answer
60 views

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 (...
user avatar
  • 113
0 votes
1 answer
43 views

How to name tables which are responsible for storing dictionaries and configuration?

Below I attached diagram which corresponds to part of my database : My questions: In your opininon Do I have to divide ServiceInsance and ConfServiceInstance ? I did it like that because I would ...
user avatar
  • 91
1 vote
0 answers
557 views

How to properly name a database table

First of all, I understand this question may seem opinion-based, but I know there are some standards for naming conventions and I would like to know which is the best and why. It's not so complex ...
user avatar
  • 111
0 votes
1 answer
283 views

created_at vs meaningful db column name , or both? [closed]

I need often to store the datetime of an action. For example, for a customer order, "processed_at" would be a right name. However I need all my tables to have a created_at/updated_at fields for ...
user avatar
  • 378
0 votes
0 answers
28 views

Is it possible to have SQL server look for entities under other schemas than DBO when the schema name isn't specified in the query? [duplicate]

Not sure if this is a thing, and I understand it's better practice to write your queries using the two-part naming convention, but it would be cool if SQL Server had a way to setup a schema priority ...
user avatar
  • 24.1k
2 votes
1 answer
136 views

Can we change Log Shipping backup file naming convention

Seems the Log Shipping backup files naming convention (especially the date-time stamp in the name) is followed by UTC time, i believe that is default and standard. I would like to clarify on ...
user avatar
  • 2,291
8 votes
2 answers
14k views

Should I not use camelCase in my column names?

I am creating a GraphQL API using Node.js, which foces me to return all the field names in camelCase. In my PostgreSQL database, I currently have all my columns named following a camelCase convention,...
user avatar
1 vote
3 answers
62 views

Best name to name a table [closed]

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 ...
user avatar
  • 111
0 votes
2 answers
68 views

Is there a good reason to put the company name at the beginning of the table names? [closed]

When developing a new system, for a big corporation. Technologies: Web, Java, Spring Boot, Rest Api, Postgres, Hibernate Company: Bank System: Promissory control, and all others Company name: ...
user avatar
  • 103
4 votes
2 answers
12k views

PostgreSQL naming conventions

Maybe double post but I could not find any answer here. I saw couple of posts how to name my tables and I understood that (semi-officially) it should contain lower cases, should be underscored and ...
user avatar
1 vote
0 answers
33 views

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)...
user avatar
  • 141
3 votes
2 answers
723 views

SQL table with same name as catalog view

When naming tables in SQL I try to stay away from SQL reserved keywords, but today a colleague questioned the use of Events as a table name. They said, anything that turns green in SSMS shouldn't be ...
user avatar
  • 133
0 votes
0 answers
73 views

Schema Master, Schema, Scheme - table name/design help

I’m stuck! 3 table names. Schema Master, Schema, Scheme. They are too confusing for me I always get them mixed up.... Any ideas on how to name better? I also maybe designing this database ...
user avatar
2 votes
1 answer
1k views

Naming Convention for Login, User and Roles? [closed]

What are the Naming Conventions for a Login, A database User and a Database role? Is there any best practice to follow?
user avatar
  • 131
0 votes
2 answers
808 views

Column names - (created, modified) vs. (creation, modification) [closed]

I have a database schema where all the tables are required to have a column to hold the timestamp for the initial INSERT and another column that holds the timestamp of the last UPDATE. Initially this ...
user avatar
  • 107
0 votes
2 answers
1k views

Can any database table name support double quotes "?

I need to know whether any database supports double quotes as a part of their table name. I am especially interested in JDBC compliant databases. And if they do, can I please know how?
user avatar
0 votes
1 answer
715 views

How to name tables such as "Suppliers Categories" [closed]

I am refactoring a very old DB (< 2001) migrating from MyISAM to InnoDB and I experience some issues with the CamelCase notation. I don't know why but with the use of MySQL Workbench, sometime, my ...
user avatar
  • 123
0 votes
1 answer
149 views

How do I fix the naming of columns in Metabase?

Metabase currently imports the column names and tries to figure out the wording. This convention is fundamentally broken in my schema. For example, when it scans my PostgreSQL database it'll bring in ...
user avatar
  • 55.7k
0 votes
0 answers
28 views

What is the naming convention where column names are prefixed by chars indicating the data type?

I work on a database where column names are prefixed by a character representing the datatype of the column. I quite like this, because it's easy to see at a glance what type of data each column holds....
user avatar
  • 2,212
0 votes
1 answer
209 views

Comparing SQL binary data types

I am curious if there are any major differences with performance and/or conventionality regarding which binary data types one chooses. Let's say I have a table of metallic objects and I am considering ...
user avatar
0 votes
0 answers
17 views

Name of attributes that are indirectly related to entity

If I have a set of data that relate to an entity directly and some that do not, is there a standard name for these two types of attributes? example, Employee: employeeID firstname lastname manager ...
user avatar
1 vote
0 answers
116 views

ERD mostly in text

In LaTeX I can replicate database tables similar to the ones in the diagram below, but I do not want to deal with figuring out how to nicely draw the relation diagrams between the tables. Is there an ...
user avatar
  • 111
1 vote
1 answer
766 views

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 ...
user avatar
  • 113
7 votes
2 answers
12k views

MySQL database naming convention?

Is there any convention for database names in MySQL/MariaDB? I've searched Google and this Stack Exchange and haven't been able to find anything. Not even a "Nope, there's no official convention." Is ...
user avatar
  • 73
2 votes
1 answer
212 views

Does the SQL-1992 standard restrict naming identifiers to 18 characters?

In this draft of SQL:1992, I found… Section 5.2 Leveling Rules .... The following restrictions apply for Entry SQL in addition to any Intermediate SQL restrictions: a) No <...
user avatar
2 votes
1 answer
236 views

Data modelling for specific units of measurement

I am currently adding a feature in our software where we save a timeout in the database to initialize cronjobs which get active after that timeout. To model this I see different ways but can't say ...
user avatar
  • 121
6 votes
3 answers
6k views

What is the significance of the trailing dollar sign `$` on identifiers in SQL Server?

Dumping some internal views, such as sys.system_objects as done in this question I see that some identifiers end with a dollar-sign $ CREATE VIEW sys.system_objects AS -- cutout FROM sys....
user avatar
  • 55.7k
5 votes
2 answers
452 views

Is there a name for the class of characters represented by [] in SQL Server?

I am interested in the terminology for the characters you can put around table names, column names, etc. when referencing them in a query. A name that in Microsoft SQL Server would be for []s and in ...
user avatar
3 votes
4 answers
6k views

MySQL similar name for status or type column

As status and type is reserved key in MySQL, I need a column name similar to status to identify the status of a row. I know there is way to ignore this problem but in different language and different ...
user avatar
0 votes
1 answer
52 views

What's the recommended way to handle naming collisions with the PK column? [closed]

I have a data field "Shipment ID" which is a VARCHAR(18) from a number of different vendors. This is going into a table shipment with a surrogate PK shipment_id. I'm trying to figure out the best way ...
user avatar
  • 105
10 votes
1 answer
436 views

Issue with Table Naming Conventions and Policy Management in SQL Server 2016

In SQL Server 2012, I had a policy set to not allow spaces in a table name. However, when I use the same policy in SQL Server 2016, I get an error. Here is the code for the condition: DECLARE @...
user avatar
  • 461
0 votes
2 answers
261 views

Change naming conventions in SQL Server

In SQL Server 2014 we need to change naming convention for indexes and keys. The old naming convention is not following any standards. My questions are: How can we change the naming convention for ...
user avatar
  • 135
1 vote
1 answer
70 views

Naming convention for automated table outputs (processed with Python)

I have several tables that I process nightly with Python. For example, I have read-only access to an incidents table. I process the table with a specialized Python library called ArcPy. The script ...
user avatar
  • 1,373
1 vote
1 answer
123 views

Dependency management by decoupling table name from table key

If I share a Google Spreadsheet with someone, I will share a link like this: https://docs.google.com/spreadsheets/d/1UL0Aii1aaErbUm6pdmZ_D9dsqx2p3BPZ5GHxz7TH37M/edit This means that I am free to ...
user avatar
  • 1,145
3 votes
1 answer
6k views

CREATE VIEW as join between tables with identically named columns

As the title says, I'd like to create a view from a join between tables which have columns with identical names (surprisingly "id"). Postgres doesn't prepend the table name to the result, but for ...
user avatar
  • 135
102 votes
18 answers
37k views

Is adding the ‘tbl’ prefix to table names really a problem?

I’m watching some Brent Ozar videos (like this one, for instance) and he suggests not prefixing tables with ‘tbl’ or ‘TBL’. On the internet I found some blogs saying it adds nothing to documentation,...
user avatar
  • 7,100
1 vote
2 answers
729 views

How to Apply a Title-Case RegEx Condition for Object Names with Policy Based Management

I'm implementing PBM on a SQL Server 2014 instance and want to enforce a condition that all objects are created outside the dbo schema and all object names are created in title-case (i.e., OrderDetail)...
user avatar
  • 1,913
2 votes
3 answers
2k views

Best name for link table [closed]

I was wondering what the best name for a linked table in this situation (or any) would be. I've searched for this, but could not find any concrete examples. For example, I have the following tables (...
user avatar
  • 133
1 vote
1 answer
172 views

Standard naming for a credential systems

Is there a standard naming convention in regards to credential oriented systems? (Logins) The only one I could really come up with (in a shorthand form) is using the word "Gateway". Representing a ...
user avatar
19 votes
2 answers
7k views

Naming conflict between function parameter and result of JOIN with USING clause

Given this setup in current Postgres 9.4 (from this related question): CREATE TABLE foo (ts, foo) AS VALUES (1, 'A') -- int, text , (7, 'B'); CREATE TABLE bar (ts, bar) AS VALUES (3, 'C') ...
user avatar
1 vote
1 answer
1k views

How do I open an ERwin Naming Standards file (.nsm) in Excel?

I have a Naming Standards file in ERwin (.nsm format) that I want to be able to open up in Excel (for example, in order to compare 2 .nsm files). How would I be able to do that?
user avatar
1 vote
1 answer
94 views

Comparing the contents of 2 .nsm (naming standards) files

I have 2 naming standards files from ERwin (.nsm extension), and I want to compare them to see if they contain the same rules. Is there some sort of automated way to check this? If there isn't a way ...
user avatar
0 votes
1 answer
87 views

Naming a second additional column referencing another table column?

I'm working with a table in database that references to a column in another table. Such as: Product Table ------------ Id Description Currencies_Code Currencies ------------ Id Code Description We ...
user avatar
3 votes
1 answer
3k views

What problems would using the reserved keywords DATE and TIME as column names cause in Oracle?

DATE is an SQL Reserved Word and TIME is a PL/SQL Reserved Word in Oracle (listed in SQL> HELP RESERVED WORDS). What problems would using them as column names cause in Oracle? The database server ...
user avatar
1 vote
1 answer
1k views

Which terms are used to refer a row in database?

I am creating a Java application, in which I want to create a class that will relate to a row in database. I decided to use Entity while naming the class with a prefix/suffix. But, This page says: ...
user avatar
  • 113
0 votes
1 answer
161 views

How to reference a table called `\` (simply just backslash character) in MySQL in a query?

Through some unknown circumstances I have a table called "\" in a database. mysql> show tables like '\\'; +-----------------------------+ | Tables_in_in_realestate (\) | +--------------------------...
user avatar
  • 123