2. BOOKS
• Text Books
– 1. S. Lipschutz, “Data Structures”, Mc-Graw Hill
International Editions.
– 2. Robert L Kruse, Bruce P. Leung, Clovis L. Tondo,
“Data Structure and Program Design in C”, PHI.
– 3. Ellis Horowitz, S. Sahni, D. Mehta,
Fundamentals of Data Structures in C++”, Galgotia
Book Source, New Delhi.
4/24/2023 2
3. Books
• Reference Books
– 1. Y. Langsam, M. Augenstin and A. Tannenbaum,
“Data Structures using C and C++”, Pearson
Education Asia.
– 2. Jean-Paul Tremblay, Paul. G. Soresan, “An
introduction to data structures with Applications”,
Tata Mc-Graw Hill International Editions.
– 3. Elmasri, Navathe, ”Fundamental of Database
systems”, Pearson Education.
5. Topic to be discussed
• Introduction
• Data Structure Operations
• Basic Terminology
• Elementary Data Organization
6. Data Structure
• DATA
– Anything in real world
– Data are simply values or sets of values.
• STRUCTURE
– Organization of data
• using mathematical & logical model
4/24/2023 6
7. Data Structure
• Data may be organized in many different ways; the
logical or mathematical model of a particular
organization of data is called data structure.
– A logical data model (LDM) is a representation of an
organization's data, organized in terms of entities and
relationships and is independent of any particular data
management technology.
– A mathematical model is a description of a system (set of
interacting or interdependent components) using
mathematical concepts and language.
4/24/2023 7
8. Type of DS
• Primitive Data Structures
– Primitive Data Structures are the basic data
structures that directly operate upon the machine
instructions. they have different representations on
different computers.
• Non-primitive Data Structures
– Non-primitive data structures are more complicated
data structures and are derived from primitive data
structures. They emphasize on grouping same or
different data items with relationship between each
data item.
Arrays, Lists and Files come under this category.
4/24/2023 8
10. Data Structure
• Data structure are classified in the following
two categories:
– Linear Data structure
– Non linear Data structure
4/24/2023 10
11.
12. Linear Data structure
• In the Linear Data structures processing of
data items is possible in linear fashion i. e.
data can be processed one by one
sequentially.
• Linear Data structures includes following types
of data structures:
– Array
– Linked List
– Stack
– Queues
4/24/2023 12
13. Non linear Data structure
• A data structure in which insertion and
deletion is not possible in a linear fashion is
called Non linear Data structure.
• In this category of data structures:
– Tree
– Graph
4/24/2023 13
14. Data Structure Operations
• Traversing: accessing each record exactly once so that certain
items in the record may be processed.
• Searching: finding the location of the record with a given key
value, or finding the location of all records which satisfy one
or more conditions.
• Insertion: adding a new record to the structure.
• Deletion: remove a record from the structure.
• Sorting: arrange the record ascending or descending order.
• Merging: combining the records in two different sorted files
into a single sorted file.
• Update: change in the record.
4/24/2023 14
15. Basic terminology
• Elementary Data Organization
–Data are simply values or sets of values.
–A data items refers to a single unit of values.
• Examples student name, employee name etc
–Data items that are divided into sub-items
are called group items.
• For example, an employee’s name may be
divided into three subitems- first name, middle
name & last name.
• But ID number would normally be treated as a
single item.
16. Elementary Data Organization
• An entity is something that has certain
attributes or properties which may be
assigned values. The values themselves may
be either numeric or nonnumeric.
• Example1: Entity:-Person
– Attributes: Name Age Sex id Number
– Values: James 20 M 3030307
• Example2: Entity:- Chair
– Attributes: length width height foldable
– Values: 2feet 2 feet 2.5feet yes
17. Elementary Data Organization
• Collection of data are frequently organized into a
hierarchy of fields, records and files (tabular form).
• Field :
– A field is a single elementary unit of information
representing an attribute of an entity.
• Record :
– A record is the collection of field values of a given entity.
• File :
– A file is the location of records of the entities in a given
entity set.
• Example
– Suppose an automobile dealership maintains an inventory
file where each record contains the following data:
• Serial no. type year price Accessories
18. File : student
Field (Name) Field (age) Field
(address)
Field (state)
james 34 gzb up
tom 45 roorkee uk
ram 32 delhi delhi
Data/entity/file: Student
Attribute/Field: Name, Age, address and state
Values/record: james, 34, gzb, up…….
19. Elementary Data Organization
• Records may also be classified according to
length.
– Fixed-length records:
• all records contain the same data items with the same
amount of space assigned to each data items. Like
image
– Variable-length records:
• file records may contain different length.
– For example:
• Student records usually have variable length, since
different students take different numbers of courses.