Data truncation
   HOME

TheInfoList



OR:

In
database In computing, a database is an organized collection of data stored and accessed electronically. Small databases can be stored on a file system, while large databases are hosted on computer clusters or cloud storage. The design of databases spa ...
s and
computer networking A computer network is a set of computers sharing resources located on or provided by network nodes. The computers use common communication protocols over digital interconnections to communicate with each other. These interconnections ar ...
data truncation occurs when
data In the pursuit of knowledge, data (; ) is a collection of discrete values that convey information, describing quantity, quality, fact, statistics, other basic units of meaning, or simply sequences of symbols that may be further interpret ...
or a
data stream In connection-oriented communication, a data stream is the transmission of a sequence of digitally encoded coherent signals to convey information. Typically, the transmitted symbols are grouped into a series of packets. Data streaming has ...
(such as a
file File or filing may refer to: Mechanical tools and processes * File (tool), a tool used to ''remove'' fine amounts of material from a workpiece ** Filing (metalworking), a material removal process in manufacturing ** Nail file, a tool used to g ...
) is stored in a location too short to hold its entire length. Data truncation may occur automatically, such as when a long
string String or strings may refer to: *String (structure), a long flexible structure made from threads twisted together, which is used to tie, bind, or hang other objects Arts, entertainment, and media Films * ''Strings'' (1991 film), a Canadian anim ...
is written to a smaller buffer, or deliberately, when only a portion of the data is wanted. Depending on what type of
data validation In computer science, data validation is the process of ensuring data has undergone data cleansing to ensure they have data quality, that is, that they are both correct and useful. It uses routines, often called "validation rules", "validation cons ...
a program or operating system has, the data may be truncated silently (i.e., without informing the user), or the user may be given an
error message An error message is information displayed when an unforeseen occurs, usually on a computer or other device. On modern operating systems with graphical user interfaces, error messages are often displayed using dialog boxes. Error messages are us ...
. For example, sometimes instead of rounding off a numerical value obtained from a calculation, some of the digits might just be removed i.e. truncated


References


See also

* Fixed-point arithmetic -> Precision loss and overflow *
Data loss Data loss is an error condition in information systems in which information is destroyed by failures (like failed spindle motors or head crashes on hard drives) or neglect (like mishandling, careless handling or storage under unsuitable conditions) ...
Data quality {{Comp-sci-stub