Little brother. What is the purpose of the Design table field is not empty when we are building a database
Source: Internet
Author: User
What is the role of the Design table field when we are building the database?
Like this, when is the design null, and when does it have to be not null? Solving
------to solve the idea----------------------
If it is not empty, it means that the field must have a value.
As to when the design is null, when does it have to be not null? It depends on the demand.
------to solve the idea----------------------
Null empty value, indicating nothing
If the value of a field is optional in the business, then it can be set to NULL
Another use for NULL is that it can be used for input to a data item. This is important in situations where it takes more than one operation to form a complete record.
------to solve the idea----------------------
Not empty, in MSSQL if the field does not have data to insert failure, MySQL seems to be strict mode will also fail. It is mainly used to constrain the integrity of the data.
------to solve the idea----------------------
Mainly based on business scenarios, such as some field information is required, the user must fill in, otherwise it will prompt the operation failed.
------to solve the idea----------------------
As if large data volume search, the field is not NULL search efficiency will improve, please God confirmed
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.