DATA STRUCTURE UNIT I LECTURE HOUR 2 Dr .M.UMADEVI ASSISTANT PROFESSOR DEPARTMENT OF CS SACWC, CUMBUM
Elementary Data Organization
ELEMENTARY DATA ORGANIZATION 3 S.NO TERMINOLOGY DESCRIPTION 1 DATA A Single Value Or Set Of Values. ( e.x ) a=5, name = ram 2 ELEMENTARY DATA ITEM Data Items That Cannot Be Subdivided. ( e.x ) age of a person 3 GROUP DATA ITEM Data Items That Can Be Subdivided ( e.x ) DOB of a person. 4 ENTITY A noun that has certain attributes or properties. ( e.x ) a person, a thing, a place e.t.c 5 ATTRIBUTE A set of properties representing an entity. Each attribute has a set of values. ( e.x ) Attribute : Name Name : Ram, Raj…
ELEMENTARY DATA ORGANIZATION 4 S.NO TERMINOLOGY DESCRIPTION 6 FIELD Represents A Column Of Values In A Table. ( i.e ) One Attribute Information About Many Entities 7 RECORD Represents Values In A Row In A Table ( i.e ) Many Attribute Information About One Entity. 8 FILE Collection of records of the entities in a given entity set 9 FIXED LENGH RECORDS Same data item with same memory space for each item and same length for all records. ( e.x ) personal details of a student 10 VARIABLE LENGTH RECORDS Each data item with variable memory space and variable length records. ( e.x ) course details of a student.
Outline Data, Entity and Information Primitive data types Non primitive data Types Data structure Definition Classification Data structure operations.
Data, Entity and Information Data represents a single value or a set of values assigned to entities. Data item refers a single or group of values with in the data An entity is a thing that has some properties which can take values. Processed or meaningful data is called information. This is used for taking some action.
Primitive data types These are the data structures which are directly supported by the machine.i.e. Any operations can be performed in these data items. The different primitive data types are Integer Float Double Character boolean
Non Primitive data types These Data structures do not allow any specific instructions to be performed on the Data items directly. The different non primitive data types are Arrays Structures Unions Class etc .
Data structure A data structure is an arrangement of data in a computer's memory or even disk storage. An example of several common data structures are arrays, linked lists, queues, stacks, binary trees, and hash tables. Algorithms , on the other hand, are used to manipulate the data contained in these data structures as in searching and sorting. Many algorithms apply directly to a specific data structures.
Data structure When working with certain data structures you need to know how to insert new data, search for a specified item, and deleting a specific item. Commonly used algorithms include are useful for: Searching for a particular data item (or record). Sorting the data. There are many ways to sort data. Simple sorting, Advanced sorting Iterating through all the items in a data structure. (Visiting each item in turn so as to display it or perform some other action on these items)
Data structure operations Operation means processing the data in the data structure. The following are some important operations. Traversing Searching Inserting Deleting Sorting Merging
operations Traversing To visit or process each data exactly once in the data structure Searching To search for a particular value in the data structure for the given key value. Inserting To add a new value to the data structure
operations Deleting To remove a value from the data structure Sorting To arrange the values in the data structure in a particular order. Merging To join two same type of data structure values
OPERATIONS ON DATA STRUTURES 14 Data appearing in Data Structure are processed by means of certain operation Operations Actions Traversing Algorithm to move along the items in a data structure. Search Algorithm to search an item in a data structure. Sort Algorithm to sort items in certain order. Insert Algorithm to insert item in a data structure. Update Algorithm to update an existing item in a data structure. Delete Algorithm to delete an existing item from a data structure.
15 Examples Customer Salesperson Adams Smith Brown Ray Clark Jones Drew Ray Evans Smith Farmer Jones Geller Ray Hill Smith
16 Customer Pointer Adams 3 Brown 2 Clark 1 Drew 2 Evans 3 Farmer 1 Geller 2 Hill 3 Salesperson Jones Ray Smith
INTRODUCTION ( Data Structures And Algorithms) 17 Customer Pointer Adams 3 Brown 2 Clark 1 Drew 2 Evans 3 Farmer 1 Geller 2 Hill 3 Salesperson Pointer Jones 3,6 Ray 2,4,7 Smith 1,5,8
INTRODUCTION ( Data Structures And Algorithms) 18 Customer Pointer Adams 5 Brown 4 Clark 6 Drew 7 Evans 8 Farmer Geller Hill Salesperson Pointer Jones 3 Ray 2 Smith 1