Questions tagged [naming-convention]
The naming-convention tag has no usage guidance.
83
questions
0
votes
2
answers
47
views
Why should I manually name foreign key constraints?
I see people talking about the best way to name foreign key constraints. I have never manually named them, I just get whatever my RDBMS gives it, like tableName_ibfk_1. If I've never seen a need to ...
-1
votes
1
answer
41
views
Is there any pattern behind the naming conventions of PostgreSQL Table-Level Locks?
I know that PostgreSQL has 8 level of table locks which are, from least restrictive to most:
ACCESS SHARE
ROW SHARE
ROW EXCLUSIVE
SHARE UPDATE EXCLUSIVE
SHARE
SHARE ROW EXCLUSIVE
EXCLUSIVE
ACCESS ...
18
votes
2
answers
8k
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 ...
2
votes
1
answer
3k
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 ...
0
votes
1
answer
957
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
...
1
vote
1
answer
735
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 ...
1
vote
1
answer
185
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 (...
0
votes
1
answer
269
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 ...
1
vote
0
answers
757
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 ...
0
votes
1
answer
1k
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 ...
0
votes
0
answers
29
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 ...
3
votes
1
answer
317
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 ...
14
votes
2
answers
30k
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,...
1
vote
3
answers
205
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 ...
0
votes
2
answers
121
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:
...
7
votes
2
answers
18k
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 ...
1
vote
0
answers
42
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)...
3
votes
2
answers
1k
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 ...
0
votes
0
answers
162
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 ...
2
votes
1
answer
2k
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?
1
vote
2
answers
2k
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 ...
0
votes
2
answers
2k
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?
0
votes
1
answer
910
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 ...
0
votes
1
answer
212
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 ...
0
votes
1
answer
357
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 ...
0
votes
0
answers
23
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 ...
1
vote
0
answers
163
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 ...
1
vote
1
answer
1k
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 ...
7
votes
2
answers
14k
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 ...
2
votes
1
answer
278
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 <...
2
votes
1
answer
303
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 ...
6
votes
3
answers
9k
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....
5
votes
2
answers
461
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 ...
3
votes
4
answers
8k
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 ...
0
votes
1
answer
57
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 ...
11
votes
1
answer
494
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 @...
0
votes
2
answers
330
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 ...
1
vote
1
answer
82
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 ...
1
vote
1
answer
144
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 ...
3
votes
1
answer
8k
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 ...
104
votes
18
answers
42k
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,...
1
vote
2
answers
998
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)...
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 (...
1
vote
1
answer
313
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 ...
19
votes
2
answers
9k
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')
...
1
vote
1
answer
2k
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?
1
vote
1
answer
108
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 ...
0
votes
1
answer
93
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 ...
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 ...
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:
...