DFS 1 Introduction

download DFS 1 Introduction

of 16

Transcript of DFS 1 Introduction

  • 7/30/2019 DFS 1 Introduction

    1/16

    Data Structure

    Data Structure:Structure:

    Way/Method to store something so that,The stored thing can be accessed quickly and efficiently.

    Examples:Room of your house:

    To store your belongings.Cupboard / Cabinet in your room:

    To store your important accessories such as clothesetc.

    Hardbound Box files:

    To store your bills etc.

    Class:To store students.

    Data:Collection of facts and figures.

  • 7/30/2019 DFS 1 Introduction

    2/16

    Data Structure

    No Name Gender English Maths Total

    1 Sachin M 50 60 110

    2 Sunita F 50 40 90

    3 Virat M 40 60 100

    Entity SetDomain

    Marksheet

    Students DataEntity: Student

    Whose Data?For which Entity?

    Attributes

    Row / Record / Tuple

    (Gender) = {M, F}

    Domain (English) = {x / x varies from 0 to 100}

    Question:What is the importance of this data to a particular person?

  • 7/30/2019 DFS 1 Introduction

    3/16

    Data Structure

    Data:Importance of data to a person depends on the:

    Person who is trying to see/analyze the data.

    Example:Importance of TYBCA marksheet data to a TYBBA student?

    Nothing.

    Importance of TYBCA marksheet data to a TYBCA student?Wants to know his own record.Might want to know his friends record.

    Importance of TYBCA marksheet to a BCA faculty?Wants to know the result of his subject.

    Importance of TYBCA marksheet to a Director?Wants to know the overall result of his college.

    Conclusion:Same data can have,

    Different meaning/importance to different people.

    This data / part of data with some meaning is called:Information

  • 7/30/2019 DFS 1 Introduction

    4/16

    Data Structure

    Information:Information is:Processed Data / Meaningful Data which can be used totake,

    Important decisions.

    Example:After seeing the information of his result, a student mighttake a decision whether to:

    Continue studies,

    Continue in same college,

    Join some business.After seeing the information, a director might take adecision whether to:

    Change subject faculty,

    Remove that faculty altogether.

  • 7/30/2019 DFS 1 Introduction

    5/16

    Data v/s Information

    Data & Information:

    There is a major difference between these2 things.

    However many a times, both the words

    Data & Information are used

    interchangeably.

    Procedure

    to

    Process

    Data

    Data

    Information-1

    Information-2

    Information-n

  • 7/30/2019 DFS 1 Introduction

    6/16

    Data Structure

    Data Structure:Way/Method to store data so that,

    Various processes (Searching, Filtering etc)

    can be applied on that data and,

    Information from that stored data can be

    accessed quickly and efficiently.

  • 7/30/2019 DFS 1 Introduction

    7/16

    Tell the Structure?Data: Books

    Randomly arranged on top of each other

    Properly arranged by subject, author etc.

  • 7/30/2019 DFS 1 Introduction

    8/16

    Tell the Structure?Data: Light Bills, Phone Bills, Water Bills of different months

    Everything in a

    single file.

    Everything in a single file with markers.

    In 3 different files

    sorted by month etc.

  • 7/30/2019 DFS 1 Introduction

    9/16

    Data Structure

    Data Structure:Way/Method to store data so that,

    Various processes (Searching, Filtering etc) can be applied onthat data and,

    Information from that stored data can be accessed quickly andefficiently.

    ORIt is a triplet consisting of:

    D: (What is stored?)

    Data that can be stored in the structure.

    F: (Why it is stored?)

    Functions / Operations that can be done on the stored data.A: (How is it stored?)

    Axioms (Rules) to be applied when storing the data.

    So,

    Data Structure (DS) = (D, F, A)

  • 7/30/2019 DFS 1 Introduction

    10/16

    Data Structure

    Data Structure:We are already aware about,

    The advantages of,Storing the same data in a computer than,

    Storing in a physical file / physical world.

    Example:

    Students marksheet stored on physical paper compared tothe same marksheet stored in some software (Excel) ofComputer.

    Advantages of storing data in a computer:More accessing speed and hence less time consuming.

    More accuracy.

    Changes / Modifications could be easily done.

    No problem of concentration.Not tempted and does not use Facebook.

    Will not get tired.Does not require food, drinks apart from electricity.

  • 7/30/2019 DFS 1 Introduction

    11/16

    Data Structure

    Data Structure:How to store data in a computer?

    Examples:Student Marksheet:

    Microsoft Excel

    Letters:

    Microsoft Word

    Music Files:In different folders according to Genre.

    3D designs:

    3D Home Architect / AutoCad

    Dates:

    Excel, Database, ?

    Mathematical Equations such as Polynomials:

    ?

    Family Tree of a Person:

    ?

    Route / Path of a Flight:

    ?

  • 7/30/2019 DFS 1 Introduction

    12/16

    Data Structure

    Data Structure Using C:How to store data in a computer?

    By instructing the computer,

    By commanding the computer,

    By programming the computer using,

    Any programming language such as:

    C, C++, Java

  • 7/30/2019 DFS 1 Introduction

    13/16

    Data Structure

    Data Structure Using C:Examples:

    34:

    int

    99.50:

    float

    a:

    char

    List of roll numbers / List of marks:

    ArrayFamily Tree:

    Tree

    Path / Route of a Flight:

    Graph

  • 7/30/2019 DFS 1 Introduction

    14/16

    Data Structure

    int

    char

    float

    Array Tree

    9 7 3 0 5 9

    7

    3

    0

    5

    V/S V/S

    Built-InCreated

    LinearNon-

    Linear

  • 7/30/2019 DFS 1 Introduction

    15/16

    Classification of Data Structures

    Primitive Non-Primitive Non-Non-Primitive

    Basic Classic Complex

    int

    char

    float

    boolean

    Lattice

    Petri Nets

    Neural Nets

    Search Graphs

    Semantic Nets

    Data Structures

  • 7/30/2019 DFS 1 Introduction

    16/16

    Classification of Data Structures

    Linear Non-Linear

    Array Linked List Stack Queue Trees Graphs Tables Sets

    Non-Primitive / Classic Data Structures