Data values are what actually take place in the data variable set aside by the data entities and all its attributes. It consists of facts and figures of data items, data attribues and data characteristcs.
From the data model whose structural part includes collection of data structures used in creating objects and entities modeled by the database, to the integrity part defining rules that govern constraints placed on the data structures, to the manipulation part which defines the collection of operations that can be applied to the data structures to update and query, data values are the concrete entities for all those abstract models.
For example, a database may have a table called "employee" with employee attributes such as first name, family name, address, age, address, email address, marital status, job title, monthly salary and many others. All these mentioned terms are simply descriptions about the entity any they are the building blocks of the whole database table structure.
They do not yet have value until somebody inserts real value into them. In the next step, an end user may add a record about a new employee so the following data values may be entered into the database table:
JOHN (first name),
SMITH (family name),
15 OAK AVENUE, BRONX, NEW YORK, USA (address – in most cases, the address is broken down into street number, state, zip code, country, etc);
SINGLE (marital status);
CEO (job title);
$4000 (monthly salary).
Because every column within the database table is assigned a certain data type, it can only be expected that each data attribute should have to draw its value from a certain very specific set of values allowed as being defined by the data type.
For instance, if a column is defined to accept only integer data values, it can never accept any letter or a string of letters. In the above example, the age attribute may be defined to be of integer data type, which generally accepts a range of 0-255 for an 8-bit unsigned integer. So, no data user can enter the value "thirty two" into the age field.
A data value domain refers to the definition of an explicit set of restrictions on a set of values within a data type and is very useful for data validation. A set of semantic rules are also an addition to the restrictions set on the set of valid values for an attribute that are expressed as a subset of the allowed structural values.
For example, let us take the case of US Social Security numbers. In the database table, the data type for Social Security number maybe character or VARCHAR(11) aside from the structural restrictions and semantic restrictions for the data. The structural restriction may take the form of 3 digits (0-9) followed by a hyphen (-), followed by 2 digits, a hyphen, then 4 digits. The semantic restrictions on the other hand specify the rules about the number itself.
In actual implementation, the first 3 digits would refer to the state or area. The next 2 digits would refer to the group number which is issued in a certain given order such as odd numbers from 01 through 09, followed by even numbers from 10 though 98.
All these definitions and restriction ensures that the data value entered into the database table is always correct and consistent structurally. The only problem that would arise could only come from the data entry but the structure will always be correct.
Data values need to be clean all the time as they are the source of information that can give an organization a better picture of itself and can come up with wide decisions and moves.