Choice of right Data Structure

Need of Data Structures

VIDEO : - TYPE OR CLASSIFICATION OF DS

    As applications are getting complexed and amount of data is increasing day by day, there may arise the following problems:

Processor speed: To handle very large amount of data, high speed processing is required, but as the data is growing day by day to the billions of files per entity, processor may fail to deal with that much amount of data.

Data Search: Consider an inventory size of 106 items in a store, If our application needs to search for a particular item, it needs to traverse 106 items every time, results in slowing down the search process.

Multiple requests: If thousands of users are searching the data simultaneously on a web server, then there are the chances that a very large server can be failed during that process

in order to solve the above problems, data structures are used. Data is organized to form a data structure in such a way that all items are not required to be searched and required data can be searched instantly.

Why are data structures important?

    Typical base data types, such as integers or floating-point values, that are available in most computer programming languages are generally insufficient to capture the logical intent for data processing and use. Yet applications that ingest, manipulate and produce information must understand how data should be organized to simplify processing. Data structures bring together the data elements in a logical way and facilitate the effective use, persistence and sharing of data. They provide a formal model that describes the way the data elements are organized.

    Data structures are the building blocks for more sophisticated applications. They are designed by composing data elements into a logical unit representing an abstract data type that has relevance to the algorithm or application. An example of an abstract data type is a "customer name" that is composed of the character strings for "first name," "middle name" and "last name."

    It is not only important to use data structures, but it is also important to choose the proper data structure for each task. Choosing an ill-suited data structure could result in slow runtimes or unresponsive code. Five factors to consider when picking a data structure include the following:

  1. What kind of information will be stored?
  2. How will that information be used?
  3. Where should data persist, or be kept, after it is created?
  4. What is the best way to organize the data?
  5. What aspects of memory and storage reservation management should be considered?

How are data structures used?

    In general, data structures are used to implement the physical forms of abstract data types. Data structures are a crucial part of designing efficient software. They also play a critical role in algorithm design and how those algorithms are used within computer programs.

    Early programming languages -- such as Fortran, C and C++ -- enabled programmers to define their own data structures. Today, many programming languages include an extensive collection of built-in data structures to organize code and information. For example, Python lists and dictionaries, and JavaScript arrays and objects are common coding structures used for storing and retrieving information.

    Software engineers use algorithms that are tightly coupled with the data structures -- such as lists, queues and mappings from one set of values to another. This approach can be fused in a variety of applications, including managing collections of records in a relational database and creating an index of those records using a data structure called a binary tree.

Some examples of how data structures are used include the following:

  • Storing data. Data structures are used for efficient data persistence, such as specifying the collection of attributes and corresponding structures used to store records in a database management system.
  • Managing resources and services. Core operating system (OS) resources and services are enabled through the use of data structures such as linked lists for memory allocation, file directory management and file structure trees, as well as process scheduling queues.
  • Data exchange. Data structures define the organization of information shared between applications, such as TCP/IP packets.
  • Ordering and sorting. Data structures such as binary search trees -- also known as an ordered or sorted binary tree -- provide efficient methods of sorting objects, such as character strings used as tags. With data structures such as priority queues, programmers can manage items organized according to a specific priority.
  • Indexing. Even more sophisticated data structures such as B-trees are used to index objects, such as those stored in a database.
  • Searching. Indexes created using binary search trees, B-trees or hash tables speed the ability to find a specific sought-after item.
  • Scalability. Big data applications use data structures for allocating and managing data storage across distributed storage locations, ensuring scalability and performance. Certain big data programming environments -- such as Apache Spark -- provide data structures that mirror the underlying structure of database records to simplify querying.

Why Are Data Structures Useful?


    One of the most important things to learn when you seek the answer to your question — what is data structure? Why is data structure useful?

    Data structures offer many advantages to IT-related processes, especially as applications get more complex and the amount of existing data keeps growing. Here are some reasons why data structures are essential.

  • They facilitate greater processing speeds. Large amounts of data require faster processing, and data structures help organize the data into forms that are easier to work with and process.
  • They make it easier to search for data. Data structures organize information into workable forms that are easier to conduct required searches for.
  • They are reusable. Once you implement a given data structure, it can be used anywhere. There is no need to make a new structure. This function saves time and resources.
  • They make it easy to handle multiple requests. You rarely find a single user accessing a database. Instead, it’s common to have hundreds, if not thousands, of users searching and interacting with a database. Data structures arrange information so that users don’t have to search every item — they can instantly search just the required data.

Some factors are considered for choosing the data structure:

  • What type of data needs to be stored?: It might be a possibility that a certain data structure can be the best fit for some kind of data.
  • Cost of operations: If we want to minimize the cost for the operations for the most frequently performed operations. For example, we have a simple list on which we have to perform the search operation; then, we can create an array in which elements are stored in sorted order to perform the binary search. The binary search works very fast for the simple list as it divides the search space into half.
  • Memory usage: Sometimes, we want a data structure that utilizes less memory.
VIDEO : - OVERVIEW OF VARIOUS DS

Popular posts from this blog

DATA STRUCTURES-II

DATA STRUCTURES FOR B.TECH

DATA STRUCTURES FOR BCA