Software Data Structure
A Software Data Structure is a software component that organizes data items (through storage formats and access operations).
- AKA: Data Structure, Program Data Structure, Computational Data Structure.
- Context:
- It can (typically) store Data Values through memory organization.
- It can (typically) support Data Operations through access methods.
- It can (typically) enable Data Modification through write operations.
- It can (typically) maintain Data Relationships through structure connections.
- ...
- It can (often) optimize Data Access through efficiency patterns.
- It can (often) manage Data Volumes through storage strategy.
- It can (often) implement Algorithm Support through operation design.
- It can (often) facilitate Data Management through structure organization.
- ...
- It can range from being an Unpopulated Data Structure to being a Populated Data Structure, depending on its content state.
- It can range from being a Short-Lived Data Structure Instance to being a Long-Lived Data Structure Instance, depending on its lifetime duration.
- It can range from being a Simple Data Structure to being a Complex Data Structure, depending on its structure complexity.
- It can range from being a Mutable Data Structure to being an Immutable Data Structure, depending on its update capability.
- It can range from being a Read-Optimized Data Structure to being a Write-Optimized Data Structure, depending on its operation focus.
- It can range from being a Deterministic Data Structure to being a Probabilistic Data Structure, depending on its behavior type.
- It can range from being a Distributed Data Structure to being a Local Data Structure, depending on its location scope.
- It can range from being a Structured Data Structure to being a Semi-Structured Data Structure, depending on its organization type.
- ...
- It can integrate with Data Models for structure definition.
- It can utilize Built-In Data Types for basic storage.
- It can incorporate Abstract Data Types for interface definition.
- ...
- Examples:
- Basic Structures, such as:
- Collection Types, such as:
- Linear Structures, such as:
- Sequential Types, such as:
- Fixed Types, such as:
- Complex Structures, such as:
- Advanced Types, such as:
- ...
- Basic Structures, such as:
- Counter-Examples:
- Data File, which lacks runtime structure.
- Unstructured Data Object, which lacks organization pattern.
- Software Program Thread, which performs execution flow.
- Data Structure Representation, which describes rather than implements.
- See: Software Object, Dataset, Structured Data, Metadata, Data Model.
References
2018
- (Wikipedia, 2018) ⇒ https://en.wikipedia.org/wiki/data_structure Retrieved:2018-8-13.
- In computer science, a data structure is a data organization and storage format that enables efficient access and modification. [1] [2] More precisely, a data structure is a collection of data values, the relationships among them, and the functions or operations that can be applied to the data.
2018
- https://www.zdnet.com/article/zen-and-the-art-of-data-structures-from-self-tuning-to-self-designing-data-systems/
- QUOTE: Data structures are how we store and access data. A data structure design, as defined by Idreos and his team in a recent publication, consists of 1) the data organization, 2) an optional index, and 3) the algorithms that support basic operations (such as put, get, update). ...
...
Each data structure design is a compromise between the read, update and memory amplification trade-offs. Image: DASlab / Harvard...
- QUOTE: Data structures are how we store and access data. A data structure design, as defined by Idreos and his team in a recent publication, consists of 1) the data organization, 2) an optional index, and 3) the algorithms that support basic operations (such as put, get, update). ...
2014
- (Wikipedia, 2014) ⇒ https://en.wikipedia.org/wiki/Structure#Data Retrieved:2014-9-21.
- In computer science, a data structure is a way of storing data in a computer so that it can be used efficiently. Often a carefully chosen data structure facilitates using the most efficient algorithm. The choice of the data structure often begins from the choice of an abstract data type. A well-designed data structure supports a variety of critical operations using as few resources (execution time and memory space) as possible. Data structures are implemented in a programming language as data types and the references (e.g. relationships, links and pointers) and operations that are possible with them. For structure tables and structure functions, see data structure.
2013a
- (Wikipedia, 2013) ⇒ http://en.wikipedia.org/wiki/Data_structure
- In computer science, a data structure is a particular way of storing and organizing data in a computer so that it can be used efficiently.[3][4]
Different kinds of data structures are suited to different kinds of applications, and some are highly specialized to specific tasks. For example, B-trees are particularly well-suited for implementation of databases, while compiler implementations usually use hash tables to look up identifiers.
Data structures provide a means to manage large amounts of data efficiently, such as large databases and internet indexing services. Usually, efficient data structures are a key to designing efficient algorithms. Some formal design methods and programming languages emphasize data structures, rather than algorithms, as the key organizing factor in software design. Storing and retrieving can be carried out on data stored in both main memory and in secondary memory.
- In computer science, a data structure is a particular way of storing and organizing data in a computer so that it can be used efficiently.[3][4]
- ↑ Black (ed.), Paul E. (2004-12-15). Entry for data structure in Dictionary of Algorithms and Data Structures. Online version. U.S. National Institute of Standards and Technology, 15 December 2004. Retrieved on 2009-05-21 from http://xlinux.nist.gov/dads/HTML/datastructur.html.
- ↑ Encyclopædia Britannica (2009). Entry data structure in the Encyclopædia Britannica (2009). Retrieved on 2009-05-21 from http://www.britannica.com/EBchecked/topic/152190/data-structure.
- ↑ Paul E. Black (ed.), entry for data structure in Dictionary of Algorithms and Data Structures. U.S. National Institute of Standards and Technology. 15 December 2004. Online version Accessed May 21, 2009.
- ↑ Entry data structure in the Encyclopædia Britannica (2009) Online entry accessed on May 21, 2009.
2013b
- (Wikipedia, 2013) ⇒ http://en.wikipedia.org/wiki/Thread_(computing)#Concurrency_and_data_structures Retrieved:2013-11-30.
- Threads in the same process share the same address space. This allows concurrently running code to couple tightly and conveniently exchange data without the overhead or complexity of an IPC. When shared between threads, however, even simple data structures become prone to race conditions if they require more than one CPU instruction to update: two threads may end up attempting to update the data structure at the same time and find it unexpectedly changing underfoot. Bugs caused by race conditions can be very difficult to reproduce and isolate.
To prevent this, threading APIs offer synchronization primitives such as mutexes to lock data structures against concurrent access. On uniprocessor systems, a thread running into a locked mutex must sleep and hence trigger a context switch. On multi-processor systems, the thread may instead poll the mutex in a spinlock. Both of these may sap performance and force processors in SMP systems to contend for the memory bus, especially if the granularity of the locking is fine.
- Threads in the same process share the same address space. This allows concurrently running code to couple tightly and conveniently exchange data without the overhead or complexity of an IPC. When shared between threads, however, even simple data structures become prone to race conditions if they require more than one CPU instruction to update: two threads may end up attempting to update the data structure at the same time and find it unexpectedly changing underfoot. Bugs caused by race conditions can be very difficult to reproduce and isolate.
2013c
- http://en.wikibooks.org/wiki/Data_Structures/Introduction
- Computers can store and process vast amounts of data. Formal data structures enable a programmer to mentally structure large amounts of data into conceptually manageable relationships.
Sometimes we use data structures to allow us to do more: for example, to accomplish fast searching or sorting of data. Other times, we use data structures so that we can do less: for example, the concept of the stack is a limited form of a more general data structure. These limitations provide us with guarantees that allow us to reason about our programs more easily. Data structures also provide guarantees about algorithmic complexity — choosing an appropriate data structure for a job is crucial for writing good software.
Because data structures are higher-level abstractions, they present to us operations on groups of data, such as adding an item to a list, or looking up the highest-priority item in a queue. When a data structure provides operations, we can call the data structure an abstract data type (sometimes abbreviated as ADT). Abstract data types can minimize dependencies in your code, which is important when your code needs to be changed. Because you are abstracted away from lower-level details, some of the higher-level commonalities one data structure shares with a different data structure can be used to replace one with the other.
Our programming languages come equipped with a set of built-in types, such as integers and floating-point numbers, that allow us to work with data objects for which the machine's processor has native support. These built-in types are abstractions of what the processor actually provides because built-in types hide details both about their execution and limitations.
For example, when we use a floating-point number we are primarily concerned with its value and the operations that can be applied to it. Consider computing the length of a hypotenuse: :[math]\displaystyle{ let c := sqrt(a * a + b * b) }[/math] The machine code generated from the above would use common patterns for computing these values and accumulating the result. In fact, these patterns are so repetitious that high-level languages were created to avoid this redundancy and to allow programmers to think about what value was computed instead of how it was computed.
Two useful and related concepts are at play here:
- Encapsulation is when common patterns are grouped together under a single name and then parameterized, in order to achieve a higher-level understanding of that pattern. For example, the multiplication operation requires two source values and writes the product of those two values to a given destination. The operation is parameterized by both the two sources and the single destination.
- Abstraction is a mechanism to hide the implementation details of an abstraction away from the users of the abstraction. When we multiply numbers, for example, we don't need to know the technique actually used by the processor, we just need to know its properties.
A programming language is both an abstraction of a machine and a tool to encapsulate-away the machine's inner details. For example, a program written in a programming language can be compiled to several different machine architectures when that programming language sufficiently encapsulates the user away from any one machine.
- In this book, we take the abstraction and encapsulation that our programming languages provide a step further: When applications get to be more complex, the abstractions programming languages become too low-level to effectively manage. Thus, we build our own abstractions on top of these lower-level constructs. We can even build further abstractions on top of those abstractions. Each time we build upwards, we lose access to the lower-level implementation details. While losing such access might sound like a bad trade off, it is actually quite a bargain: We are primarily concerned with solving the problem at hand rather than with any trivial decisions that could have just as arbitrarily been replaced with a different decision. When we can think on higher levels, we relieve ourselves of these burdens.
Each data structure that we cover in this book can be thought of as a single unit that has a set of values and a set of operations that can be performed to either access or change these values. The data structure itself can be understood as a set of the data structure's operations together with each operation's properties (i.e., what the operation does and how long we could expect it to take).
- Computers can store and process vast amounts of data. Formal data structures enable a programmer to mentally structure large amounts of data into conceptually manageable relationships.
2009a
- (WordNet, 2009) ⇒ http://wordnetweb.princeton.edu/perl/webwn?s=data%20structure
- S: (n) data structure ((computer science) the organization of data (and its storage allocations in a computer))
2009b
- http://en.wiktionary.org/wiki/data_structure
- An organization in software of data that allows more optimal searching, categorizing, or storage of information
2004
- Paul E. Black (ed.), entry for data structure in Dictionary of Algorithms and Data Structures. U.S. National Institute of Standards and Technology. 15 December 2004. http://www.itl.nist.gov/div897/sqg/dads/HTML/datastructur.html Accessed 2009-05-21.</ref>
- Definition: An organization of information, usually in memory, for better algorithm efficiency, such as queue, stack, linked list, heap, dictionary, and tree, or conceptual unity, such as the name and address of a person. It may include redundant information, such as length of the list or number of nodes in a subtree.
- Specialization: external memory data structure, passive data structure, active data structure, persistent data structure, recursive data structure.