About
A data structure is a single data instance that:
- cannot be compared/represented by a single value
- have operations that follows rules
- represents an entity, a relationship or both.
- has two representations:
- a logical one (that you can draw)
- a physical one build from computer primitive data type.
Data Type vs Structure:
All complex data type have at minimal a structure whereas primary data type have no structure.
The two may be used as synonym but they are not.
Bad programmers worry about the code. Good programmers worry about data structures and their relationships.
Example
Every data structure represents a logical model element such as:
- an entity
- and/or a relationship
or any corresponding set (entity set, relationship set)
Relation
A relation (table) is a logical data structure composed:
- of row (entity)
- and columns (attributes) and column where each rows must have the same number of columns.
that may be physically represented by:
- an array of columns
- or an array of rows
A matrix is also a rows and columns structure.
Nodes and edges
A graph is a logical data structure composed of:
- node (entity)
- and edges (relation)
that are represented as set: more … see Graph - Data Structure (Physical Representation)
Structure Name: Media Type
The media type (or mime) is the name of the structure.
Example: text/csv means that the data (string, file content) represents a CSV structure.
Primitive
All physical data structures are implemented with three basic type primitives:
- Data Type - (Primitive|Native|Built-in) (number, characters)
A type showing a structure (created from this primitive type) is called a complex type
In computer science, a data structure is a particular way of organizing data in a computer so that it can be used efficiently.
Schema
Every data has a structure that is expressed through a schema