Data Type - Pointer (Locator)

Card Puncher Data Processing

About

A pointer is the address location at which a value is stored.

The pointer is a value that refers directly to (or “points to”) another value stored elsewhere in the computer memory using its address.

A pointer value is the address of a variable. Not every value has an address, but every variable does. With a pointer, we can read or update the value of a variable indirectly, without using or even knowing the name of the variable, if indeed it has a name.

Pointer

  • A pointer references a location in memory.
  • Obtaining the value at the location a pointer refers to is known as dereferencing the pointer.
  • A pointer is a simple, less abstracted implementation of the more abstracted reference data type.
  • Pointers are also used to hold the addresses of entry points for called subroutines in procedural programming and for run-time linking to dynamic libraries.
  • In Object-oriented programming, pointers to functions are used for binding methods, often using what are called virtual method tables.

In some languages, notably C, pointers are relatively unconstrained. In other languages, pointers are disguised as references and there’s not much that can be done with them except pass them around.

Performance

Pointers to data significantly improve performance for repetitive operations such as:

  • traversing strings,
  • lookup tables,
  • control tables
  • and tree structures.

In particular, it is often much cheaper in time and space to copy and dereference pointers than it is to copy and access the data to which the pointers point.

Arithmetic - Data structures

While “pointer” has been used to refer to references in general, it more properly applies to data structures whose interface explicitly allows the pointer to be manipulated (arithmetically via pointer arithmetic) as a memory address, as opposed to a magic cookie or capability where this is not possible.

Pointers aren't necessary for the creation of complex data structures and algorithms. In fact, eliminating pointers makes such code not only easier to write and to understand but more secure and less prone to error as well.

Documentation / Reference





Discover More
Card Puncher Data Processing
Data Type - (Primitive|Native|Built-in)

A primitive data type is the basic data type that a language offers. A primitive type is a type without any substructure. It is then data: that is not an class/object and has built-in operation...
Card Puncher Data Processing
Data Type - Reference Type

A reference type is a lightweighted pointer where there’s not much that can be done with them except pass them around. When a reference is passed to a function, the function receives a copy of the reference,...
Card Puncher Data Processing
Go - Pointer

in Go In Go, Pointers are explicitly visible. The & operator yields the address of a variable, and the operator retrieves the variable that the pointer refers to but there is no pointer arithmetic....
Jdbc Class Architecture
JDBC - Resultset (SELECT|SQL query)

The java/sql/ResultSetResultSet interface encapsulates the results of an SQL query and implements a cursor API. Statements may also be batched, allowing an application to submit multiple updates to a data...
Java Conceptuel Diagram
Java

Why has become so popular among application developers? Primarily because makes application developers more productive. It is a modern, robust, object-oriented language. ’s unprecedented popularity...
Java Conceptuel Diagram
Java - Random access file

A java/io/RandomAccessFilerandom access file behaves like a large array of bytes stored in the file system. There is a kind of cursor, or index into the implied array, called the file pointer. A Random...
Card Puncher Data Processing
Oracle - LOB Datatype

LOB in Oracle In Oracle, a LOB is simply a pointer that points to an index that is stored in a LOBINDEX segment. The index points to the chunks that make up the LOB that are stored in LOBSEGMENT segment....
Card Puncher Data Processing
PL/SQL - Pointer (REF)

In SQL, a pointer has the data type REF x, where REF is short for REFERENCE and x represents the entity being referenced A ref is a pointer to: an object. a cursor (a cursor is then an object ?)...
Data System Architecture
RDBMS - Cursor (Iterator)

A cursor represents data returned by a query. In computer science, a database cursor is a control structure that enables traversal over the records in a database. A cursor: contains tabular data ...
Data System Architecture
SQL - Data Type

The Data Type of a column in SQL. They are defined in the ANSI/ISO SQL standard but may vary from sql engine (database) to another. The below table shows you the history of the data type in the ANSI...



Share this page:
Follow us:
Task Runner