Why is the platform database name and table name unified in uppercase?

Source: Internet
Author: User

Today's customers, database naming in the name of a variable, with the first letter capitalized, followed by lowercase to distinguish the word, in fact, this practice may have some problems, the program is difficult to write. Today, let's talk about why we need to capitalize on the rapid development of the platform design database.
In Oracle and SQL Server, there are different ways to handle the case of database table names and field names.

Starting with Oracle, Oracle's table and field names are automatically converted to uppercase if they are not quoted (the role of "" in Oracle is to enforce case sensitivity, and when keywords do Fields "").
So, is there any problem with this practice in our practical application?
In fact, when we write the SQL statement query, we write a query statement:

Select

So, in this case, Oracle is usually converted to uppercase automatically, that is, the data table field is capitalized: ID, NAME, SEX. This allows the programmer to uniformly bind the program to size without having to determine the name of the binding based on the case in the SQL statement. In fact, it's good for programming.
In SQL Server, if the SQL statement is lowercase, the DataTable data field name that is read is also lowercase (even if our database field is uppercase). So there is a problem, we will write SQL statement time is certainly more, if the SQL statement can change the column name of the DataTable case, for case-sensitive data binding is a very distressing thing, it may give your program "Endless Trouble", May cause data to be unbound in many places.
In SQL Server, when you write a lowercase name in Query Analyzer, SQL Server automatically converts you to uppercase, so SQL Server is also a good practice for us to develop uppercase table names and field names in SQL statements.
With the use of SQL Server and Oracle for many years, I think Oracle is more rigorous in this respect, so at the beginning of the platform design, we force the database table name and field name must be capitalized, uniform rules are more conducive to the stability of the platform, so when the table is built, it will be cast to uppercase.
This is handled on the platform's business surface, so the business table is case-sensitive. But with VS development, you have to use uppercase.

Some people think that Oracle is not case-sensitive, in fact, it is because Oracle is strictly case-sensitive, it will be unified to the non-quoted converted to uppercase, to facilitate processing.
and SQL Server based on the case of SQL statements to form a different case header, strictly speaking, there is no problem, but the actual use will cause a lot of trouble, because it defaults to all programmers understand its rules, if you do not understand the rules, write SQL statements, there will be a lot of trouble.

Original address: http://plat.delit.cn/thread-150-1-1.html

Reprint please specify the source:

Author: metric Technology www. Delit. cn

Why is the platform database name and table name unified in uppercase?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.