A data structure is a
way of organizing data that considers not only the items stored, but also their
relationship to each other. Advance knowledge about the relationship between
data items allows designing of efficient algorithms for the manipulation of
data.
The study of data structure includes the following steps.
1. Logical or mathematical descriptions of the structure.
2. Implication of the structure on computer memory.
3. Quantitative analyses of structure, which include determining the
amount of memory which needed to, store the data and time required for processing.
A data
structure is a way of storing data in a computer so that it can be used efficiently. A data
structure is a collection of data organized in some fashion.
DATA STRUCTURE =
ORGANIZED DATA + ALLOWED OPERATIONS
Often a
carefully chosen data structure will allow a more efficient algorithm
to be used. The choice of the data structure often begins from the choice of an
abstract data structure. A well-designed data
structure allows a variety of critical operations to be performed, using as
little resources, both execution time and memory space, as possible.
Different kinds of data structures are
suited to different kinds of applications, and some are highly specialized to
certain tasks. For example, B-trees are particularly well-suited for implementation of
databases, while routing tables rely on
networks of machines to function.
Data structures are not really algorithms
that you can find and plug into your application. Instead, they are the
fundamental constructs for you to build your program around. Becoming fluent in
what data structures can do for you is essential to get full value from them.
Data structures are abstractions we use
to manage large amounts of information and the relationships different pieces
of information have with each other. 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 to
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.
In the design of many types of programs, the
choice of data structures is a primary design consideration, as experience in
building large systems has shown that the difficulty of implementation and the
quality and performance of the final result depends heavily on choosing the
best data structure. After the data structures are chosen, the algorithms
to be used often become relatively obvious. Sometimes things work in the
opposite direction - data structures are chosen because certain key tasks have
algorithms that work best with particular data structures. In either case, the
choice of appropriate data structures is crucial.
Simple Data structure can be used as
building blocks of complex data structure, Array is type of Data structure
using which we can build more complex data structure.
Basic Terminology (Data, Field, Record)
Data: Data is derived from a Latin word
“Datum” which means collection. So data can be defined as collection of facts
and figures. Data is classified into two types.
Field : Field is the collection of related character. For example, Name, Roll
No, Class etc. A single field cannot provide full information about any entity.
Record :Record is the collection of related fields. For example, the record of
student includes its Roll No, Name, Class, and Registration No. etc
Table/ Relation/ File
For example
Basic Terminology (Data, Field, Record)
Data: Data is derived from a Latin word
“Datum” which means collection. So data can be defined as collection of facts
and figures. Data is classified into two types.
(a) Group Data
Item :Data
item that can be subdivided into different segments is called group data
item.For example, name is a group data item because it can be subdivided into
different segments i.e. First name, middle name, last name.
(b)
Elementary Data Item :The data
item that cannot be subdivided into different segments is called elementary
data item For example, Account No, ID Number etc.
Field : Field is the collection of related character. For example, Name, Roll
No, Class etc. A single field cannot provide full information about any entity.
Record :Record is the collection of related fields. For example, the record of
student includes its Roll No, Name, Class, and Registration No. etc
Table/ Relation/ File
Collection
of related records is called a file or table.
For example
Rno
|
Name
|
Class
|
1
|
Muhammad
|
3rd Year
|
2
|
Imran
|
3rd Year
|
3
|
Hussain
|
3rd Year
|
No comments:
Post a Comment