Relational DBMS (OLD) - Database Fundamentals

 CBSE Class 12 Informatics Practices

Revision Notes

What is Database: Database is a collection of related data and data is a collection of facts and figures that can be processed to produce information.

Database Transaction: A transaction can be defined as a group of tasks. A transaction is a logical unit of work(LUW) that must succeed or fail in its eternity. A user views a transaction as a logical sequence of read and write operations whereas The system views a transaction as a logical sequence of read and write operations. Let’s take an example of a simple transaction. Suppose a bank employee transfers Rs 500 from A's account to B's account.

Transaction Handling Issues:
A transaction can be handled in either of the following two ways:
i) Serially ie.Serial Execution of transactions.
ii) Concurrently ie.Simultaneous execution of transactions.

Transaction Properties:
To ensure data integrity, the database system maintains the following properties of a transaction termed as ACID properties.
a) Atomicity : This property states that a transaction must be treated as an atomic unit, that is, either all of its operations are executed or none.
b) Consistency : The database must remain in a consistent state after any transaction. No transaction should have any adverse effect on the data residing in the database.
c) Isolation : The database should be durable enough to hold all its latest updates even if the system fails or restarts.
d) Durability : In a database system where more than one transaction are being executed simultaneously and in parallel, the property of isolation states that all the transactions will be carried out and executed as if it is the only transaction in the system.

Data Communication and DBMS:

This refers to how a DBMS can accept different end user requests through different network environments. An example of this can be easily related to the internet. A DBMS can provide access to the database using the Internet through Web Browsers (Mozilla Firefox, Internet Explorer, Netscape).

What is Client /Server computing?

Add Image content-page-backlog/1247/
A client is any process that requests to the server for specific services. A server is a process that provides requests for the clients. Both clients and server can reside in the same computer or in different computers connected by a network.
The three components of Client/Server Architecture:
• The Client or The Front End application.
• The Server or The Back End Application.
• The Communication Layer or Middleware.

Add Image /1247

Network Protocol for Data Communication:
A protocol means the rules that are applicable for a network. Protocol defines the standardized formats for data packets, techniques for detecting and correcting errors and so on.
There are various protocols that work on the network. TCP/IP (Transmission Control Protocol/internet protocol) is the native protocol of Internet.
TCP/IP is called as a reliable delivery protocol. The TCP layer of TCP/IP is used to verify that whatever was sent by sending machine is received intact by the destination.
The IP layer of TCP/IP determines the route for sending packets from sending machine to the receiving machine. Also it packs the messages into small network transportable packets called datagrams. (A datagram is a collection of the data that is sent as a single message.)

Distributed Databases:
distributed database is a collection of multiple interconnected databases, which are spread physically across various locations that communicate via a computer network. A distributed database management system (DDBMS) is a centralized software system that manages a distributed database in a manner as if it were all stored in a single location.

Advantages of distributed databases:
• Sharing.
• Availability.
• Reliability.
• Incremental Growth.
• Distributed Query/Parallel Evaluation.
• Improved Performance.

Allocation of Data in Distributed Database:
A distributed database is broken up into logical units called fragments, which may be assigned for storage at various sites.also, certain data may be stored at more than one site ie.Replication of data.
In a distributed database there are various approaches of data allocation:
> Centralized data at one location.
> Partitioned or fragmented data.
> Complete replication.
> Selective replication.

Data Fragmentation:

Fragmentation is the task of dividing a table into a set of smaller tables. The subsets of the table are called fragments. Fragmentation can be of three types: horizontal, vertical, and hybrid (combination of horizontal and vertical).

• Horizontal Fragmentation.
• Vertical Fragmentation.
• Mixed Fragmentation(Hybrid)

Data Replication:
Data replication means storing some data at more than one site. Data replication is the process of storing separate copies of the database at two or more sites. It is a popular fault tolerance technique of distributed databases. Data can be replicated in any of the following ways:
• No replication.
• Partial replication.
• Full replication.

Add Image : content-page-backlog/1247

Advantages of distributed database:
• Organizational structure.
• Share ability.
• Improved availability.
• Improved reliability.
• Local autonomy.
• Improved performance.
• Incremental Growth.
• Local autonomy.

Disadvantages of distributed database:
• Complexity.
• Increased Cost.
• Increased Security requirements.
• Lack of Standards.

1. What is the concept of database transaction?
2. What is the function of redo and undo logs?
3. Explain the ACID properties of a transaction.
4. What is the role of TCP/IP protocol?
5. Discuss the problems that are encountered in concurrent execution of transactions.