









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
An overview of database management systems (dbms), covering key concepts such as data models, database components, and database access languages. It delves into the different types of databases, including centralized, distributed, relational, and nosql databases, highlighting their characteristics and use cases. The document also explores the critical topic of concurrency control, which ensures the consistent and reliable execution of concurrent transactions in a dbms. It discusses the acid properties, lock-based concurrency control, and timestamp-based concurrency control protocols. This comprehensive coverage of dbms fundamentals and advanced topics makes this document a valuable resource for students and professionals seeking to understand the principles and mechanisms underlying modern database systems.
Typology: Study notes
1 / 16
This page cannot be seen from the preview
Don't miss anything!
Unit - 1 Database The database is a collection of inter-related data which is used to retrieve, insert and delete the data efficiently. It is also used to organize the data in the form of a table, schema, views, and reports, etc. For example: The college Database organizes the data about the admin, staff, students and faculty etc. Using the database, you can easily retrieve, insert, and delete the information. Database Management System o Database management system is a software which is used to manage the database. For example: MySQL, Oracle, etc. are a very popular commercial database which is used in different applications. o DBMS provides an interface to perform various operations like database creation, storing data in it, updating data, creating a table in the database and a lot more. o It provides protection and security to the database. In the case of multiple users, it also maintains data consistency. DBMS allows users the following tasks: o Data Definition: It is used for creation, modification, and removal of definition that defines the organization of data in the database. o Data Updation: It is used for the insertion, modification, and deletion of the actual data in the database. o Data Retrieval: It is used to retrieve the data from the database which can be used by applications for various purposes. o User Administration: It is used for registering and monitoring users, maintain data integrity, enforcing data security, dealing with concurrency control, monitoring performance and recovering information corrupted by unexpected failure. Characteristics of DBMS o It uses a digital repository established on a server to store and manage the information. o It can provide a clear and logical view of the process that manipulates data. o DBMS contains automatic backup and recovery procedures. o It contains ACID properties which maintain data in a healthy state in case of failure. o It can reduce the complex relationship between data. o It is used to support manipulation and processing of data.
o It is used to provide security of data. o It can view the database from different viewpoints according to the requirements of the user. Advantages of DBMS o Controls database redundancy: It can control data redundancy because it stores all the data in one single database file and that recorded data is placed in the database. o Data sharing: In DBMS, the authorized users of an organization can share the data among multiple users. o Easily Maintenance: It can be easily maintainable due to the centralized nature of the database system. o Reduce time: It reduces development time and maintenance need. o Backup: It provides backup and recovery subsystems which create automatic backup of data from hardware and software failures and restores the data if required. o multiple user interface: It provides different types of user interfaces like graphical user interfaces, application program interfaces Disadvantages of DBMS o Cost of Hardware and Software: It requires a high speed of data processor and large memory size to run DBMS software. o Size: It occupies a large space of disks and large memory to run them efficiently. o Complexity: Database system creates additional complexity and requirements. o Higher impact of failure: Failure is highly impacted the database because in most of the organization, all the data stored in a single database and if the database is damaged due to electric failure or database corruption then the data may be lost forever. Data Models in DBMS A Data Model in Database Management System (DBMS) is the concept of tools that are developed to summarize the description of the database. Data Models provide us with a transparent picture of data which helps us in creating an actual database. It shows us from the design of the data to its proper implementation of data. Types of Relational Models
The advantage of using a Representational data model is to provide a foundation to form the base for the Physical model
ii. Online Users iii. Sophisticated Users iv. Specialized Users v. Application Users vi. DBA - Database Administrator There are various types of databases used for storing different varieties of data:
Each table in the database carries a key that makes the data unique from others. Examples of Relational databases are MySQL, Microsoft SQL Server, Oracle, etc. Properties of Relational Database There are following four commonly known properties of a relational model known as ACID properties, where: A means Atomicity: This ensures the data operation will complete either with success or with failure. It follows the 'all or nothing' strategy. For example, a transaction will either be committed or will abort. C means Consistency: If we perform any operation over the data, its value before and after the operation should be preserved. For example, the account balance before and after the transaction should be correct, i.e., it should remain conserved. I means Isolation: There can be concurrent users for accessing data at the same time from the database. Thus, isolation between the data should remain isolated. For example, when multiple transactions occur at the same time, one transaction effects should not be visible to the other transactions in the database. D means Durability: It ensures that once it completes the operation and commits the data, data changes should remain permanent.
a. Key-value storage: It is the simplest type of database storage where it stores every single item as a key (or attribute name) holding its value, together. b. Document-oriented Database: A type of database used to store data as JSON-like document. It helps developers in storing data by using the same document-model format as used in the application code. c. Graph Databases: It is used for storing vast amounts of data in a graph-like structure. Most commonly, social networking websites use the graph database. d. Wide-column stores: It is similar to the data represented in relational databases. Here, data is stored in large columns together, instead of storing in rows. Advantages of NoSQL Database o It enables good productivity in the application development as it is not required to store data in a structured format. o It is a better option for managing and handling large data sets. o It provides high scalability. o Users can quickly access data from the database through key-value. 5 ) Object-oriented Databases The type of database that uses the object-based data model approach for storing data in the database system. The data is represented and stored as objects which are similar to the objects used in the object-oriented programming language. 6 ) Hierarchical Databases It is the type of database that stores data in the form of parent-children relationship nodes. Here, it organizes data in a tree-like structure.
In the protocol, transactions gain locks on data items to control their access and prevent conflicts between concurrent transactions. This article will look deep into the Lock Based Protocol in detail. What is a Lock? A Lock is a variable assigned to any data item to keep track of the status of that data item so that isolation and non-interference are ensured during concurrent transactions. Lock Based Protocols A lock is a variable associated with a data item that describes the status of the data item to possible operations that can be applied to it. They synchronize the access by concurrent transactions to the database items. It is required in this protocol that all the data items must be accessed in a mutually exclusive manner. Let me introduce you to two common locks that are used and some terminology followed in this protocol. Types of Lock
Efficient: The technique is efficient and scalable, as it does not require locking and can handle a large number of transactions. No Deadlocks: Since there are no locks involved, there is no possibility of deadlocks occurring. Improved Performance: By allowing transactions to execute concurrently, the overall performance of the database system can be improved. Disadvantages of Timestamp Ordering Protocol Limited Granularity: The granularity of timestamp-based concurrency control is limited to the precision of the timestamp. This can lead to situations where transactions are unnecessarily blocked, even if they do not conflict with each other. Timestamp Ordering: In order to ensure that transactions are executed in the correct order, the timestamps need to be carefully managed. If not managed properly, it can lead to inconsistencies in the database. Timestamp Synchronization: Timestamp-based concurrency control requires that all transactions have synchronized clocks. If the clocks are not synchronized, it can lead to incorrect ordering of transactions. Timestamp Allocation: Allocating unique timestamps for each transaction can be challenging, especially in distributed systems where transactions may be initiated at different locations.