Design the perfect table: Name the domain appropriately

Source: Internet
Author: User

The name of a domain can reflect the purpose of a domain and describe the data it stores. Domains named with last name, first name, and ZIP code can be documented and manageable. There is no doubt about it. You will be able to know exactly what type of data should be in this domain. But when you choose a domain name, there are some rules to follow:

The name of a field can consist of 64 characters, but it can only be letters, numbers, and spaces.

Do not use reserved words to name fields, or any interfaces that are set for an event. To know which are reserved words, you can get them by searching for "reserved words."

If you are bound by an internal naming convention, consider creating a rule of your own.

3, do not use space in the domain name

Although you may want to use spaces in the name of a domain, do not do so. Spaces are hard to work with, especially when you encounter SQL statements and VBA code. If you use them, you must remember to include the relevant content in parentheses, which is an annoying operation. In addition, if you upgrade your database to a SQL Server or use it in other applications after you export it, these whitespace characters will basically cause problems.

If you want the title of the field and subsequent objects to be displayed in more normal text, you can use the Caption property of the field. For example, if you name a field "Last Name", you can use the Title property to display the last name. All you need to remember is that the title attribute is only relevant to the display. When associating with this domain, you must always use the real name of the domain.

The title attribute also brings up some of its own behavioral problems. If you intend to use the title attribute, note the following potential pitfalls:

Access ignores the AS keyword in the SQL statement if the field below it has a caption setting.

The Caption property setting cannot produce the results of the CREATE TABLE query.

The DAO (data Access object) and the object of the ADO domain return the Caption property of the field, and it is not placed under the name of the domain.



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.