0% found this document useful (0 votes)
7 views

Untitled document.

about data

Uploaded by

71762305075
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)
7 views

Untitled document.

about data

Uploaded by

71762305075
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/ 7

Date: 13/1/2025

What is Data Model?


A data model is a conceptual framework or structure that defines how data is organized, stored, managed, and
manipulated within a database or system. It provides a standardized way to represent relationships between
data elements and ensures consistency in how data is accessed and used.

The types of data models are:

● Hierarchical Data Model


● Network Data Model
● Relational Data Model
● Entity-Relationship (ER) Model
● Object-Oriented Data Model
● Document Data Model
● Columnar Data Model
● Key-Value Data Model
● Graph Data Model
● Flat Data Model
● Dimensional Data Model
● Multi-Model
● Semantic Data Model
● semi-structured database

1. Hierarchical Data Model


○ Organizes data in a tree-like structure.
○ Represents parent-child relationships.
2. Network Data Model
○ Allows complex relationships by using graph structures with nodes and edges.
○ Represents many-to-many relationships.
3. Relational Data Model
○ Stores data in tables (relations) with rows and columns.
○ Ensures data integrity and supports SQL queries.
4. Entity-Relationship (ER) Model
○ Visually represents entities and their relationships.
○ Helps in database design and structure understanding.
5. Object-Oriented Data Model
○ Combines object-oriented programming concepts with databases.
○ Supports complex data types and encapsulation.
6. Document Data Model
○ Stores data in document formats like JSON or XML.
○ Ideal for semi-structured data and NoSQL databases.
7. Columnar Data Model
○ Stores data by columns instead of rows.
○ Optimized for analytical queries and big data workloads.
8. Key-Value Data Model
○ Simple structure with key-value pairs.
○ Used in caching, configurations, and fast lookups.
9. Graph Data Model
○ Represents entities as nodes and relationships as edges.
○ Ideal for social networks, recommendation engines, and relationship analysis.
10. Flat Data Model
● Represents data in a single, two-dimensional table.
● Simple but lacks scalability for complex applications.
11. Dimensional Data Model
● Designed for data warehousing and OLAP systems.
● Uses fact and dimension tables for analytical queries.
12. Multi-Model
● Supports multiple types of models (e.g., relational, graph, document) within one system.
● Offers flexibility for various application needs.
13. Semi-Structured Databases
● Semi-structured databases allow data storage without a fixed schema, making them adaptable
to changes
● Semi-structured databases allow data storage without a fixed schema, making them adaptable
to changes.

—------------------------------------------------------------------------------------------------------------------------------------------------

Semi-Structured Database: Detailed Explanation


A semi-structured database is designed to handle data that doesn’t fit neatly into a rigid schema, such as
rows and columns in a relational database. Instead, it stores data in a flexible format like JSON, XML, or YAML,
where each piece of data is self-describing through tags or keys.

How Data is Stored


1. Flexible Format:
Data is stored in document-like formats such as:

JSON (JavaScript Object Notation):


code
{

"name": "John Doe",

"age": 30,

"skills": ["Python", "SQL"],

"address": {

"city": "New York",

"zip": "10001"

XML (Extensible Markup Language):


code
<person>

<name>John Doe</name>

<age>30</age>

<skills>

<skill>Python</skill>

<skill>SQL</skill>

</skills>

<address>

<city>New York</city>

<zip>10001</zip>

</address>

</person>
○ These formats allow for variable fields, hierarchies, and nesting.
2. Storage in Documents:
○ Data is stored as documents in collections (in NoSQL databases like MongoDB).
○ Documents are self-contained and may have different structures within the same collection.
3. Self-Describing:
○ Each document includes metadata (keys/tags) describing the stored data, so there is no need
for a rigid schema.

How Data is Retrieved


1. Query Languages:
Semi-structured databases use specialized query languages for retrieving data:
○ MongoDB Query Language (MQL) for JSON documents.
○ XPath or XQuery for XML documents.
2. For example:

code:
db.users.find({ age: { $gt: 25 } });

3. Indexes:
○ Indexes can be created on fields (e.g., name, age) to improve query performance.
4. APIs:
○ Data is often accessed through APIs (e.g., REST or GraphQL), which return data in JSON
format.

Key Features
● Dynamic Schema: New fields can be added to documents without affecting the database structure.
● Nested Data: Hierarchical data can be easily stored, such as arrays or objects.
● Scalability: These databases are optimized for distributed and scalable storage systems.

Examples of Semi-Structured Databases


1. MongoDB: Stores data in BSON (binary JSON) format.
2. CouchDB: A document-based database using JSON for storage.
3. Amazon DynamoDB: Supports key-value and document-based storage.
4. MarkLogic: Primarily designed for XML documents.
Use Cases:
1. Web Applications: Flexible user profiles where fields may vary by user.
2. IoT Data: Storing sensor data with diverse formats.
3. Content Management: Articles or multimedia with variable metadata.

Comparison with Other Models


● Relational Databases: Require a fixed schema; suited for structured data.
● Semi-Structured Databases: No fixed schema; adaptable to changes, ideal for dynamic and
hierarchical data.
● Unstructured Data (e.g., files, images): No inherent structure; typically stored in object stores, not
databases.

Semi-structured databases bridge the gap between structured and unstructured data, offering flexibility and
scalability for modern applications.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy