Unit 4 5 6 to Be Studied
Unit 4 5 6 to Be Studied
Oriented DBMS
An Overview of Replication, Mobile
Databases, and OODBMS Concepts &
Standards
Introduction to Database Replication
• Process of copying and maintaining database objects across multiple databases.
• Database Replication Overview:
– Process of copying and synchronizing database objects across multiple databases.
– Ensures consistency, availability, and fault tolerance in distributed systems.
• Steps in Database Replication:
– Identify Source and Target Databases:
• Choose the primary (master) database.
• Select the replica (slave) databases where data will be copied.
– Determine Replication Strategy:
• Synchronous Replication: Ensures real-time data consistency.
• Asynchronous Replication: Reduces latency by allowing delayed synchronization.
– Configure Replication Components:
• Publisher: Sends updates from the primary database.
• Subscriber: Receives and applies updates.
• Distributor: Manages data transfer.
– Data Transfer Mechanisms:
• Snapshot Replication: Copies entire dataset at intervals.
• Transactional Replication: Applies real-time changes.
• Merge Replication: Combines updates from multiple sources.
– Monitor and Maintain Replication:
• Implement error handling and conflict resolution.
• Optimize performance by indexing and load balancing.
• Benefits:
– High availability, disaster recovery, and load balancing.
– Reduces downtime and enhances scalability.
Benefits of Database Replication
• 1. Improves performance & availability
• 2. Enhances fault tolerance & disaster
recovery
• 3. Supports data distribution & load balancing
Applications of Replication
• 1. Enterprise data synchronization
• 2. E-commerce & banking applications
• 3. Cloud-based and distributed databases
Basic Components of Database
Replication
• 1. Publisher
• 2. Subscriber
• 3. Distributor
• 4. Replication Agents
Database Replication Environments
• 1. Single-Master Replication
• 2. Multi-Master Replication
• 3. Snapshot Replication
• 4. Transactional Replication
Synchronous vs. Asynchronous
Replication
• Synchronous: Immediate consistency but may
cause latency
• Asynchronous: Allows temporary
inconsistencies, better performance
Introduction to Mobile Databases
• Designed for mobile computing, challenges include limited resources, connectivity issues, and security concerns.
• Mobile Databases: Design and Challenges
• Introduction to Mobile Databases:
– Designed to support mobile computing environments.
– Enables data access and management on portable devices like smartphones, tablets, and laptops.
– Provides real-time synchronization between mobile and central databases.
• Key Features:
– Supports offline access with local data storage.
– Synchronizes data with remote servers when connected.
– Handles frequent disconnections due to mobility.
• Challenges in Mobile Databases:
– Limited Resources:
• Lower processing power compared to traditional servers.
• Limited battery life affects continuous operations.
• Storage constraints restrict large datasets.
– Connectivity Issues:
• Unstable network conditions (e.g., poor Wi-Fi, slow mobile data).
• Data loss risks due to sudden disconnections.
• Latency problems affecting real-time access.
– Security Concerns:
• Data breaches due to weak encryption.
• Unauthorized access through lost or stolen devices.
• Vulnerabilities in wireless communication protocols.
• Solutions:
– Efficient data compression to reduce storage needs.
– Adaptive synchronization for seamless offline/online transitions.
– Strong encryption and authentication mechanisms for security.
Advanced Database Applications
• Need for advanced databases beyond RDBMS.
• Emerging fields: AI, IoT, and cloud computing.
Weaknesses of RDBMSs
• 1. Poor support for complex data types
• 2. Limited flexibility in evolving applications
Object-Oriented Concepts
• 1. Encapsulation
• 2. Inheritance
• 3. Polymorphism
Storing Objects in a Relational
Database
• Object-Relational Mapping (ORM) and challenges in integrating objects into relational models.
• Object-Relational Mapping (ORM) and Challenges
• Introduction to ORM
• ORM is a technique for converting data between relational databases and object-oriented programming languages.
• It bridges the gap between relational models (tables, rows, columns) and object-oriented concepts (classes, objects, inheritance).
• Allows developers to interact with databases using high-level programming objects instead of SQL queries.
• Key Features of ORM
• Automates SQL query generation, reducing manual coding.
• Supports object-oriented principles, such as encapsulation and inheritance.
• Improves maintainability by separating database logic from application code.
• Popular ORM frameworks: Hibernate (Java), Django ORM (Python), Entity Framework (C#).
• Challenges in Integrating Objects into Relational Models
• Impedance Mismatch
– Different data representations: Objects use references, while relational databases use foreign keys.
– Inheritance complexity: Relational databases do not natively support inheritance structures.
• Performance Issues
– Query optimization difficulties: ORM-generated queries may be less efficient than hand-written SQL.
– Lazy vs. eager loading: Incorrect handling can lead to performance bottlenecks.
• Schema Evolution
– Difficulties in handling database migrations when object structures change.
• Complex Relationships
– Mapping many-to-many relationships efficiently requires additional join tables.
• Solutions
• Hybrid approaches: Combining ORM with raw SQL for performance-critical operations.
• Optimized query strategies: Using caching, indexing, and batch fetching.
• Schema design best practices: Ensuring flexibility while maintaining normalization.
Object-Oriented Database Design
• Object identity, object persistence, schema evolution, and inheritance hierarchies.
• Object Identity, Object Persistence, Schema Evolution, and Inheritance Hierarchies
• 1. Object Identity
• Definition: Each object in an Object-Oriented Database Management System (OODBMS) has a unique identity, independent of its attribute values.
• Types of Object Identity:
– OID (Object Identifier): System-generated unique identifier for an object.
– Value-Based Identity: Objects identified by attribute values (e.g., primary keys in RDBMS).
– Reference-Based Identity: Objects linked through direct references (e.g., pointers).
• Challenges: Managing identity consistency across distributed systems and ensuring uniqueness across sessions.
• 2. Object Persistence
• Definition: The ability of objects to outlive the execution of a program by being stored in a database.
• Persistence Mechanisms:
– Serialization: Converting objects into a storable format (e.g., JSON, XML).
– Persistence by Reachability: If an object is reachable from a persistent root, it is automatically stored.
– Explicit Persistence: Objects are manually marked for storage using database APIs.
• Challenges: Maintaining consistency, transaction management, and object-relational mapping.
• 3. Schema Evolution
• Definition: The ability to modify the database schema without losing existing data.
• Schema Evolution Operations:
– Adding/Removing Attributes: Updating object definitions dynamically.
– Changing Data Types: Altering attribute types while preserving object integrity.
– Versioning: Maintaining multiple versions of an object class.
• Challenges: Backward compatibility, handling large datasets, and migration complexities.
• 4. Inheritance Hierarchies
• Definition: Objects can inherit properties and behavior from parent classes, following object-oriented principles.
• Types of Inheritance in OODBMS:
– Single Inheritance: Objects inherit from one superclass.
– Multiple Inheritance: Objects inherit from multiple superclasses (more complex to manage).
• Storage Strategies:
– Table-per-Class: Each class gets its own table.
– Table-per-Hierarchy: One table stores all objects in the hierarchy.
– Table-per-Subclass: Each subclass has a separate table storing its specific attributes.
• Challenges: Query performance, complex joins, and redundancy in hierarchical storage.
Comparison of Object-Oriented Data
Modeling
• Traditional ER modeling vs. Object-Oriented
Data Modeling, improved semantic
representation in OODBMS.
Conceptual Data Modeling & UML
• Use of UML for object modeling, entity-
relationship diagrams vs. UML class diagrams.
Introduction to Object-Oriented Data
Models & OODBMS
• OODBMS integrates object-oriented
programming with database technology.
OODBMS Perspectives
• 1. Persistent Objects
• 2. Object Identity
• 3. Query Processing in OODBMS
Persistence in OODBMS
• Objects retain state beyond execution, storage
mechanisms: object serialization &
persistence managers.
Issues in OODBMSs
• 1. Query Optimization
• 2. Concurrency Control
• 3. Schema Evolution
Advantages & Disadvantages of
OODBMSs
• Advantages: Enhanced modeling, seamless
object integration.
• Disadvantages: Complexity, lack of
standardization.
Object-Oriented DBMS Standards &
Systems
• Need for standardization in OODBMS.
Object Management Group (OMG)
• Sets standards for OODBMS, promotes
interoperability.
Object Data Standard (ODMG)
• Ensures compatibility among object-oriented
databases, defines standards for object
querying & persistence.
Object Store
• Example of an object-oriented database
system, features and use cases.
Conclusion
• Summary of key topics covered, importance of
database replication & OODBMS in modern
applications, future trends in database
management.
Q&A
• Thank you! Open floor for questions &
discussion.