0% found this document useful (0 votes)
12 views2 pages

24CSR1R01 DSF Assignment 6

Uploaded by

Stutee Pradhan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views2 pages

24CSR1R01 DSF Assignment 6

Uploaded by

Stutee Pradhan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

National Institute of Technology Warangal

Department of Computer Science and Engineering


CS 16035: DATA SCIENCE FUNDAMENTALS
Class Assignment Name: Smaraki Bhaktisudha
PhD 1st Yr. 1st Sem. Roll No: 24CSR1R01

Assignment 6

 Which Data Structure does SQL Tables use to stores Data?

1. B-trees/B+ Trees
 Usage: Primarily used for indexing in SQL databases.
 Purpose: Allows efficient searching, insertion, deletion, and sequential access of records.
2. Heaps
 Usage: Used for storing tables without a clustered index.
 Purpose: Provides unsorted data storage, where records are placed in no particular order.
3. Hash Tables
 Usage: Used for hash indexes.
 Purpose: Provides very fast access to data based on a hash key, but is less efficient for range queries.
4. Linked Lists
 Usage: Sometimes used internally for managing free space or handling overflow pages.
 Purpose: Efficiently manages sequential data or chains of pages that overflow.
5. Arrays
 Usage: Utilized internally for storing fixed-size records or managing small datasets.
 Purpose: Provides efficient storage and access to small collections of data.
6. Graphs
 Usage: Used in certain database systems for managing relationships (e.g., in graph databases).
 Purpose: Manages and queries highly interconnected data.
7. Bitmaps
 Usage: Used in bitmap indexes.
 Purpose: Efficiently represents boolean data, particularly useful for columns with a limited number
of distinct values.
8. Queue Data Structure
 Usage: Used internally for managing processes like transaction logs.
 Purpose: Helps manage sequential processing in operations like log management.

 Which data structures are good for storing raw (unstructured) data?

1. Heaps
 Description: A heap is an unordered collection of data.
 Usage: Ideal for storing unstructured data because it allows for fast insertion of new records without
requiring any specific order. However, retrieval is less efficient since the data is not sorted.
 Example: Heap tables in databases where data is stored as-is without any indexing.
2. Linked Lists
 Description: A linked list is a linear collection of elements, where each element points to the next.
 Usage: Suitable for scenarios where you need to store unstructured data in a sequence but need
flexibility in insertion and deletion. It’s also good for data that might be sparsely distributed.
 Example: Managing log files or streaming data where order matters but the structure doesn't.
3. NoSQL Databases (Document Stores)
 Data Structure: Often based on tree-like structures or key-value pairs.
 Usage: Ideal for storing raw, unstructured data like JSON, BSON, XML documents, etc. These
structures allow for flexible schemas, meaning the data doesn't need to follow a strict structure.
 Example: MongoDB uses a flexible document model that can store varied data structures in the
same collection.
4. Key-Value Stores
 Description: Stores data as key-value pairs.
 Usage: Excellent for unstructured data where you need quick lookups by a unique key, but the value
can be completely unstructured.
 Example: Redis or DynamoDB, where the value can be a simple string, JSON, or binary data.
5. Graphs
 Description: A collection of nodes connected by edges, representing relationships.
 Usage: Graphs are powerful for storing unstructured data where the relationships between data
points are important. This is often the case in social networks, recommendation engines, etc.
 Example: Neo4j stores and queries graph data, handling unstructured data with complex
relationships.
6. Queues
 Description: A linear structure that follows the FIFO (First In, First Out) principle.
 Usage: Suitable for storing unstructured data that needs to be processed in order, like messages in a
messaging system.
 Example: Message queues like RabbitMQ or Kafka for processing streams of unstructured data.

Flexibility of Data Structures-

Some data structures are used in both the cases as we can see. Some data structures are flexible because of
the following reasons:

 Abstract Nature: Data structures like linked lists and graphs are abstract enough to store any type of
data. They don't inherently enforce data constraints, which means they can be adapted to both structured
and unstructured data storage.
 Data Handling: The difference in usage comes from how the data is handled rather than the structure
itself. When using these structures for unstructured data, the emphasis is on storing and linking data
without worrying about its internal organization.
 Operations: The basic operations (like insertion, deletion, traversal) provided by linked lists and graphs
are applicable to both structured and unstructured data. The underlying mechanism (e.g., how nodes are
linked or how edges connect nodes) remains the same, but the content and usage of the data can vary
greatly.

You might also like