0% found this document useful (0 votes)
14 views

Module 1

The document introduces basic data structure terminology including data, records, files, entities, and primary keys. It defines data structures as logical or mathematical models for organizing data to facilitate storage and manipulation. Data structures can be primitive, like basic data types, or non-primitive, like linked lists and trees. Non-primitive structures are further divided into linear structures that store elements sequentially, like arrays and linked lists, and non-linear structures like trees and graphs that do not store elements sequentially. Arrays are introduced as an example data structure that stores similar data elements in consecutive memory locations referenced by an index.

Uploaded by

aarzu qadri
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Module 1

The document introduces basic data structure terminology including data, records, files, entities, and primary keys. It defines data structures as logical or mathematical models for organizing data to facilitate storage and manipulation. Data structures can be primitive, like basic data types, or non-primitive, like linked lists and trees. Non-primitive structures are further divided into linear structures that store elements sequentially, like arrays and linked lists, and non-linear structures like trees and graphs that do not store elements sequentially. Arrays are introduced as an example data structure that stores similar data elements in consecutive memory locations referenced by an index.

Uploaded by

aarzu qadri
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

DATA STRUCTURES AND APPLICATIONS [BCS304]

Module 1
INTRODUCTION TO DATA STRUCTURES

Basic Terminology

Data: The term data means a value or set of value. (e.g., marks of students, name of an employee).

i. Elementary Item:Data that cannot be divided further. (e.g,. USN of a student).

ii. Group Item: Data items that can be divided into sub-items. (name can be divided into firstname,
lastname and middle name).

Record: A record is a collection of data items. (e.g., the name, address, course, and marks of a
student forms a record ).

File: A file is a collection of related records. For example, if there are 60 students in a class, then
there are 60 records of the students. All these related records are stored in a file.

Entity: An object that has certain attributes or properties.

Primary key: Data item that uniquely identifies a record in a file. (e.g., USN of a student).

Organization and Hierarchy of data.

Data Structures

Definition:
The logical or mathematical model of a particular organization of data is called Data Structure.

Need for data structures: To store and manipulate the data easily.
Two considerations while choosing a Data Structure:

 Must be rich enough in structure to mirror the real-world relationships.


 On the other hand, it must be simple enough to process the data stored in them, whenever
necessary.
Classification of Data Structures:

1. Primitive: Primitive data structures are the fundamental data types which are supported by a
programming language. Ex. integer, real, character, and boolean.
2. Non-Primitive: Non-primitive data structures are those data structures which are created using
primitive data structures. Examples inked lists, stacks, trees, and graphs.
Are of two types:
i. Linear Structures: The elements of a data structure are stored in a linear or sequential order.
Ex. arrays, linked lists, stacks, and queues.
ii. Non-Linear: The elements are not stored in a sequential order, then it is a non-linear data
structure. Ex. Trees, Graphs.
Types of data structures: Examples:
1. Arrays
An array is a collection of similar data elements. These data elements have the same data type.
The elements of the array are stored in consecutive memory locations and are referenced by an
index (also known as the subscript). It starts from 0(zero).
In C, Syntax: type name[size];
example, int marks[10];

The

above statement declares an array marks that contains 10 elements.


Uses: Arrays are generally used when we want to store large amount of similar type of data.
Limitations:
 Arrays are of fixed size.
 Data elements are stored in contiguous memory locations which may not be always
available.
 Insertion and deletion of elements can be problematic because of shifting of elements from
their positions.

You might also like