- Data organized in a tree-like structure.
- Each record (entity) has only one parent but can have** multiple child records**.
- Suitable for one-to-many relationships.
- Parent-child relationships are established.
- Example Structure: An organizational chart where each employee has one direct manager (parent) and can have multiple subordinates (children).
- Extends the hierarchical model by allowing records to have multiple parent and child relationships.
- Utilizes pointers to connect records in a graph-like structure.
- More flexible than the hierarchical model, handling many-to-many relationships better.
- Example Structure: A university course registration system where a student can take multiple courses, and each course can have multiple students. A course may also have multiple instructors, and each instructor can teach multiple courses.
- Organizes data into tables, each representing an entity with rows and columns.
- Uses keys (primary and foreign keys) to establish relationships between tables.
- SQL (Structured Query Language) used to interact with the database.
- Provides a clear separation between logical data structures and physical storage.
- Example Structure: Employee Management System with tables for "Employees" and "Departments" with relationships established using foreign keys. Each employee belongs to a department based on the department's ID.
- A conceptual model to visualize the relationships between entities in a database.
- Represents real-world objects as entities and their attributes.
- Relationships show how entities are connected and interact with each other.
- Example Structure: An Online Shopping Platform with entities like "Customer," "Product," and "Order" represented, along with relationships like "Customer places Order" and "Order contains Product."
- Extends the relational model to handle complex data types like objects, classes, and inheritance relationships.
- Useful for applications where data and behavior are closely tied together.
- Example Structure: Library Catalog System with objects representing "Books," "Authors," and "Genres" with methods and properties for each. Inheritance relationships could be defined, such as "FictionBook" and "NonFictionBook" inheriting from "Book."
- Combines features of both the relational and object-oriented models.
- Allows storage of objects, classes, and inheritance while maintaining compatibility with the relational model.
- Aims to bridge the gap between the relational and object-oriented paradigms.
- Example Structure: A Human Resources System similar to the relational model but with additional object-oriented features. Tables representing "Employees" and "Departments" could have object-like attributes or methods associated with them.
- Stores and retrieves data in the form of documents (e.g., JSON or BSON format).
- Each document can have a varying number of fields and data types.
- Schema-less and flexible, suitable for handling semi-structured or unstructured data.
- Often used for web applications and content management systems.
- Example Structure: A Blogging Platform with documents representing blog posts with varying fields like "title," "content," "author," and "tags." Each blog post may have different attributes, and there is no strict schema for all documents.
- Stores data as simple key-value pairs.
- Efficient for high-volume, low-latency data access.
- Lacks the ability to query data based on complex relationships but offers high scalability.
- Example Structure: A User Preferences Storage where data is stored as key-value pairs. For example, a user ID could be the key, and their preferences (e.g., theme, language, notifications) are stored as values associated with that key.
- Organizes data into column families, each containing rows with multiple columns.
- Suitable for handling large amounts of distributed data.
- Provides high scalability and performance advantages for certain use cases.
- Example Structure: Time Series Data Management where data is organized into column families, with each row representing a timestamp. Columns could represent different data points measured at that timestamp.
- Represents data as nodes, edges, and properties.
- Designed for managing highly interconnected data.
- Well-suited for applications such as social networks, recommendation engines, and complex relationship representations.
- Example Structure: A Social Network where users are represented as nodes, and their relationships (e.g., friendship, following) are represented as edges between nodes. Additional properties can be associated with nodes and edges to capture additional information.