Datastruct Note#1
Datastruct Note#1
DEFINITIONS
Data – means value or set of values.
Data item – a single unit of value.
o A collection of data may be organized
into fields, records, or file.
Entity – is something that has attributes
or properties which maybe grouped
together to form an entity set.
Field – a single elementary unit of
information representing an attribute of
an entity.
Record – the collection of field values of
a given entity.
File – a collection of records of the
entities in a given entity set.
o Primary key – a value in a certain
field which may uniquely determine
the record in the file.
DATA STRUCTURE
– is a logical or mathematical model of a
particular organization of data.
– It is a collection of related data and set of
values for organizing and accessing it.
– Note!!
o The choice of a particular data
model depends on the following:
1. It must be rich in structure to
mirror the actual relationships
of the data in the real world
2. It must be enough that one can
effectively process the data
when necessary.
ALGORITHM
– Is a procedure in terms of the action to
be executed and the order in which these
actions are to be executed.
– According to Niklaus Wirth,
DATA STRUCTURE + ALGORITHMS =
PROGRAM
COMPLEXITY OF ALGORITHMS
1. Time complexity – the no. of steps
executed by an algorithm.
2. Memory complexity – the amount of
memory needed in the execution of an
algorithm.