File System vs DBMS

Mujahida Joynab - Feb 9 - - Dev Community
  • File System: Follows a hierarchical structure for data storage.
  • Client-Server Model (DBMS): A database management system (DBMS) operates on a client-server architecture, ensuring efficient data management and retrieval.

Why DBMS?

  • Fast Data Search: Searching in DBMS is faster due to indexing and optimized query execution.
  • Efficient Memory Utilization: DBMS optimizes memory usage, reducing redundancy and improving performance.
  • Location Independence: DBMS abstracts data location, making it independent of physical storage constraints.

Concurrency

  • Concurrent Access: Multiple users can access and manipulate data simultaneously.
  • Example: Multiple customers can place orders on an e-commerce website at the same time.
  • Concurrency Control Scenarios:
    • Read-Read (RR): Multiple users reading the same data without conflicts.
    • Read-Write (RW): One user reading while another writes, requiring synchronization.
    • Write-Read (WR): A write operation followed by a read, ensuring consistency.
    • Write-Write (WW): Two users attempting to write simultaneously, requiring conflict resolution.

Security

  • Role-Based Access Control (RBAC): Access is granted based on user roles (e.g., admin, editor, viewer).
  • Hierarchical Security: Different levels of access permissions ensure controlled data access.

Redundancy & Constraints

  • Redundancy Reduction: DBMS minimizes data duplication using normalization.
  • Constraints for Data Integrity:
    • Primary Key: Ensures each record has a unique identifier.
    • Foreign Key: Maintains referential integrity between tables.
    • Unique & Not Null Constraints: Ensure data validity and consistency.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .