Field (computer science)

Field (computer science)

In computer science, data that has several parts can be divided into fields. Relational databases arrange data as sets of database records, also called rows. Each record consists of several fields; the fields of all records form the columns.

In object-oriented programming, field (also called data member or member variable) is the data encapsulated within a class or object. In the case of a regular field (also called instance variable), for each instance of the object there is an instance variable: for example, an Employee class has a Name field and there is one distinct name per employee. A static field (also called class variable) is one variable, which is shared by all instances.[1]

Contents

Fixed length

Fields that contain a fixed number of bytes are known as fixed length fields. A four byte field for example may contain a 31 bit binary integer plus a sign bit (32 bits in all). A 30 byte name field may contain a persons name typically padded with blanks at the end. The disadvantage of using fixed length fields is that some part of the field may be wasted but space is still required for the maximum length case. Also, where fields are ommitted, padding for the missing fields is still required to maintain fixed start positions within a record for instance.

Variable length

A variable length field may sometimes consist of two components:-

  • a length prefix (such as a two byte unsigned binary field) followed by
  • the actual variable length data itself (maximum length 32,765)

Processing variable fields of this type is generally much faster than other formats since it is not necessary to parse the input to determine the beginning of the next field.

Alternatively, fields of variable length may, for instance, be separated by commas (see Comma-separated values) when the end of each individual field must be determined by scanning for the delimiter "one byte at a time". Missing fields can be identified by two or more consecutive commas. It is not possible to use comma separated fields for exclusively binary fields since particular binary strings may be misinterpreted as a comma delimiter although unique binary values could be used instead, provided they do not occur naturally within the string.

See also

References

http://www.sliccware.com/WebHelp/Load_Definition/Definitions/Data_Fields/Data_Fields.htm


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать курсовую

Look at other dictionaries:

  • Computer science — or computing science (abbreviated CS) is the study of the theoretical foundations of information and computation and of practical techniques for their implementation and application in computer systems. Computer scientists invent algorithmic… …   Wikipedia

  • computer science — computer scientist. the science that deals with the theory and methods of processing information in digital computers, the design of computer hardware and software, and the applications of computers. [1970 75] * * * Study of computers, their… …   Universalium

  • Computer science in sport — is an interdisciplinary discipline that has its goal in combining the theoretical as well as practical aspects and methods of the areas of informatics and sport science. The main emphasis of the interdisciplinarity is placed on the application… …   Wikipedia

  • COMPUTER SCIENCE — The term Computer Science encompasses three different types of research areas: computability, efficiency, and methodology. General Introduction Computability deals with the question of what is mechanically computable. The most natural way to… …   Encyclopedia of Judaism

  • Computer graphics (computer science) — This article is about the scientific discipline of computer graphics. For other uses see Computer graphics (disambiguation). A modern render of the Utah teapot, an iconic model in 3D computer graphics created by Martin Newell in 1975. Computer… …   Wikipedia

  • computer science — noun the branch of engineering science that studies (with the aid of computers) computable processes and structures • Syn: ↑computing • Topics: ↑computer, ↑computing machine, ↑computing device, ↑data processor, ↑electronic computer, ↑ …   Useful english dictionary

  • Portal:Computer science — Wikipedia portals: Culture Geography Health History Mathematics Natural sciences People Philosophy Religion Society Technology …   Wikipedia

  • computer science — field which studies the performance and function of computers …   English contemporary dictionary

  • Theoretical computer science — is the collection of topics of computer science that focuses on the more abstract, logical and mathematical aspects of computing, such as the theory of computation, analysis of algorithms, and semantics of programming languages. Although not… …   Wikipedia

  • String (computer science) — In formal languages, which are used in mathematical logic and theoretical computer science, a string is a finite sequence of symbols that are chosen from a set or alphabet. In computer programming, a string is traditionally a sequence of… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”