UNIT I:Introduction To Algorithm & Program Design
UNIT I:Introduction To Algorithm & Program Design
Program
Design
Topic 1: Basic
Terminology
By: Prof G R Patil
AIT Pune
Elementary Data Organisation
Data are simply Values or sets of Values
Data Item is Single unit of values
Group Items Data items which can be divided
into subitems
Elementary Items are the data items which can
not be divided into subitems
Collection of data organised as fields, records
and files
Entity is something which has certain attributes
which may be assigned values
Attribute Name Age Sex
Value Lalu Prasad 66 M
Elementary Data Organisation
Entity Set Entities with similar attributes
Information is data with given attributes
(Meaningful data)
Field Elementary unit of information
representing attribute
Record collection of Field values of a given
entity
File Collection of records of entities in a given
entity set
Primary Key A field which uniquely determines
a record in a file
Elementary Data Organisation
Records Fixed length and Variable length
Organisation of data can be more complex
Study of data structure
Logical or Mathematical description of the
structure
Implementation of structure on computer
i
The concept of abstraction means:
1. We know what a data type can do.
2. How it is done is hidden.
Definition
Let us now define an ADT. An abstract data type is a data
type packaged with the operations that are meaningful for the
data type. We then encapsulate the data and the operations
on the data and hide them from the user.
i
Abstract data type:
1. Definition of data.
2. Definition of operations.
3. Encapsulation of data and operation.
Model for an abstract data type
The ADT model is shown in Figure 1. Inside the ADT are
two different parts of the model: data structure and
operations (public and private).