Dbms H.A 4
Dbms H.A 4
1. Key-Value Databases
Characteristics:
o Stores data as pairs of keys and values, where each key
is unique, and the corresponding value can be any type
of data (e.g., string, integer, JSON, binary).
o Simple data model and highly efficient for fast lookups
using the key.
o Schema-less, meaning the structure of the value is not
enforced by the database.
Strengths:
o High performance for simple read and write
operations due to direct access via keys.
o Scalable horizontally, often used in distributed
systems to handle large amounts of data.
Limitations:
o Lack of structure in the values makes complex queries
(like searching or filtering based on fields within
values) difficult.
o Not ideal for relational or complex data queries.
Example: Redis is a popular key-value store used for
caching, session management, and real-time analytics.
Use Case:
o Session storage in web applications, where each user
session is stored as a key (session ID) and a value
(session data).
o Caching frequently accessed data for quick retrieval,
such as web page content
2. Document Databases
Characteristics:
o Stores data as documents, usually in JSON, BSON, or
XML format, where each document is self-contained
and can have a different structure (schema flexibility).
o Documents are identified by a unique key, but the
values (documents) are typically structured and can
contain nested fields.
Strengths:
o Supports semi-structured data with varying schemas,
making it ideal for applications where data models
evolve frequently.
o Provides powerful querying capabilities, allowing
queries on specific fields within documents.
o Suitable for hierarchical data due to its ability to nest
objects within documents.
Limitations:
o Not as efficient for complex relationships (like joins)
between entities compared to relational databases or
graph databases.
o May require denormalization of data, leading to
potential redundancy.
Example: MongoDB is a widely used document database
that stores data in BSON format (a binary representation of
JSON).
1. User Authentication
Mechanisms: