0% found this document useful (0 votes)
590 views6 pages

Workers Behind The Scene in Dbms in Detail

Uploaded by

sakshiiiiii0206
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
590 views6 pages

Workers Behind The Scene in Dbms in Detail

Uploaded by

sakshiiiiii0206
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

workers behind the scene in dbms in detail

Workers behind the scene in a Database Management System (DBMS) are


individuals who are instrumental in maintaining the database system
environment but are not actively interested in the database content itself.
These workers include DBMS system designers and implementers, tool
developers, and operators and maintenance personnel.
1. DBMS System Designers and Implementers: These
professionals design and implement the various modules and
interfaces of the DBMS software package. The DBMS is a complex
system with components for catalog implementation, query
language processing, data access, concurrency control, data
recovery, and security
2. Tool Developers: Tool developers design and implement software
packages that aid in database modeling, system design, and
performance enhancement. These tools, which are optional and
often purchased separately, include packages for database design,
performance monitoring, interfaces, prototyping, simulation, and
test data generation
3. Operators and Maintenance Personnel: These individuals, also
known as system administration personnel, are responsible for the
actual running and maintenance of the hardware and software
environment for the database system. They ensure the smooth
operation and upkeep of the database system for end users
In summary, workers behind the scene in a DBMS play crucial roles in
designing, developing, and maintaining the software and system
environment necessary for the functioning of a database system,
ensuring its availability and performance for end users
Advantages of Triggers: Data Alterations Automation: Triggers automate data
alterations, making it easier to manage changes in the database
Query Reusability: Triggers allow the reuse of queries once written, enhancing
efficiency in database operations
Data Integrity Check: Triggers provide a method to check the data integrity of
the database, ensuring data consistency and accuracy
Error Detection: Triggers help detect errors at the database level, aiding in
maintaining data quality and reliability
Auditing: Triggers facilitate easy auditing of data changes, enabling tracking and
monitoring of modifications for security and compliance purposes

Disadvantages of Triggers:
Increased Server Overhead: Triggers can increase the overhead costs on the
server, impacting performance and resource utilization
Limited Validations: Triggers provide only extended validations, not replacing
all validations, which can limit their effectiveness in certain scenarios
Troubleshooting Complexity: Debugging errors caused by triggers can be
challenging and time-consuming, consuming development resources
Potential for Logical Errors: Even minor mistakes in trigger queries can lead to
logical errors in the application, affecting data integrity and functionality
Risk of Data Loss: Incorrectly setting triggers can lead to the loss of original
data, highlighting the importance of careful trigger implementation and
management
timestamp ordering protocol------The timestamp ordering protocol is a
mechanism used in database management systems to order transactions based
on their timestamps. This protocol assigns a unique timestamp to each
transaction, which helps in determining the order of execution and resolving
conflicts. Timestamp ordering protocols ensure that conflicting read and write
operations are executed in timestamp order, maintaining the serializability of
schedules. The protocol compares timestamps of transactions to ensure correct
order and prevent deadlock situations. While this protocol offers benefits like
avoiding deadlock and ensuring serializability, it also has drawbacks such as
potential unnecessary aborts that can impact system efficiency. There are two
main types of timestamp ordering protocols: basic timestamp ordering (BTO)
and optimistic concurrency control (OCC), each suitable for different system
characteristics and requirements
inference rule-------The inference rule is a fundamental concept in artificial
intelligence and logic that serves as a template for generating valid arguments.
In artificial intelligence, inference involves creating new logic from existing logic
or evidence to draw conclusions. There are various types of inference rules,
each with its specific function:
Modus Ponens: This rule states that if P and P → Q are true, then Q can be
inferred as true.
Modus Tollens: It states that if P → Q is true and ¬Q is true, then ¬P will also be
true.
Hypothetical Syllogism: This rule asserts that if P → R is true whenever P → Q is
true, and Q → R is true.
Disjunctive Syllogism: It states that if P∨Q is true, and ¬P is true, then Q will be
true.
Addition: This rule indicates that if P is true, then P∨Q will be true.
Simplification: It states that if P∧Q is true, then Q or P will also be true.
Resolution: This rule asserts that if P∨Q and ¬P∧R are true, then Q∨R will also
be true.
These rules play a crucial role in logical reasoning and are essential tools in
artificial intelligence for deriving conclusions from given premises.
schema instance database state
The concepts of schema, instance, and database state are fundamental in
database management systems (DBMS).
Schema: The schema is the blueprint or design of the database, defining the
structure and layout of how data will be stored. It includes the attributes and
relationships within the database. Schemas are of three types: Logical Schema,
Physical Schema, and View Schema. The schema remains relatively constant
and represents the database's structure
Instance: An instance, also known as a database state, refers to the actual data
stored in the database at a specific moment in time. It is a snapshot of the
database containing the current set of occurrences or "instances." Instances
change frequently as data is added, deleted, or updated in the database. For
example, if a table initially has 50 records and then 50 more are added, the
instance will have a total of 100 records
Database State: The database state is synonymous with the instance,
representing the content of the database at a particular moment. It includes all
the data stored in the database at that specific time. The database state
changes every time the database is updated, reflecting the dynamic nature of
the data within the database
In summary, the schema is the static design of the database, the instance is the
dynamic data stored in the database at a specific time, and the database state
refers to the content of the database at a particular moment, capturing the
current set of data occurrences or instances.
different types of recovery techniques in dbms-----
Database recovery techniques are used in database management systems
(DBMS) to restore a database to a consistent state after a failure or error has
occurred. The main goal of recovery techniques is to ensure data integrity and
consistency and prevent data loss. There are mainly two types of recovery
techniques used in DBMS
 Rollback/Undo Recovery Technique
The rollback/undo recovery technique is based on the principle of backing out
or undoing the effects of a transaction that has not been completed
successfully due to a system failure or error. This technique is accomplished by
undoing the changes made by the transaction using the log records stored in
the transaction log. The transaction log contains a record of all the transactions
that have been performed on the database. The system uses the log records to
undo the changes made by the failed transaction and restore the database to
its previous state.
 Commit/Redo Recovery Technique
The commit/redo recovery technique is based on the principle of reapplying
the changes made by a transaction that has been completed successfully to the
database. This technique is accomplished by using the log records stored in the
transaction log to redo the changes made by the transaction that was in
progress at the time of the failure or error. The system uses the log records to
reapply the changes made by the transaction and restore the database to its
most recent consistent state.
Checkpoint Recovery is a technique used to reduce the recovery time by
periodically saving the state of the database in a checkpoint file. In the event of
a failure, the system can use the checkpoint file to restore the database to the
most recent consistent state before the failure occurred, rather than going
through the entire log to recover the database.
different type of end users in dbms----
The different types of end users in a Database Management System (DBMS)
can be categorized based on their interaction with the databases. Here are the
main categories:
Casual End Users: These users access the database occasionally and use
sophisticated database query language to retrieve data. An example is high-
level managers who access data on a weekly basis.
Parametric End Users: Parametric end users spend most of their time querying
and updating the database using standard types of queries. They include
individuals like bank tellers who perform these activities during their shift.
Sophisticated End Users: These users access the database to implement their
own applications to meet specific goals. They are familiar with the system
capabilities and interact with the system without writing programs. Examples
include business analysts, engineers, and scientists.
Standalone Users: Standalone end users maintain their own databases by
creating them using ready-made program packages with graphical user
interfaces.
These categories reflect the varying levels of knowledge and interaction that
end users have with a DBMS, from occasional users to those who develop their
own applications and maintain personal databases.

Triggers
Triggers are the SQL statements that are automatically
executed when there is any change in the database. The
triggers are executed in response to certain
events (INSERT, UPDATE or DELETE) in a particular table.
These triggers help in maintaining the integrity of the
data by changing the data of the database in a systematic
fashion.

Syntax
create trigger Trigger_name
(before | after)
[insert | update | delete] on [table_name] [for each row]
[trigger_body]

1. CREATE TRIGGER: These two keywords specify that


a triggered block is going to be declared.
2. TRIGGER_NAME: It creates or replaces an existing
trigger with the Trigger_name. The trigger name
should be unique.
3. BEFORE | AFTER: It specifies when the trigger will
be initiated i.e. before the ongoing event or after the
ongoing event.
4. INSERT | UPDATE | DELETE : These are the DML
operations and we can use either of them in a given
trigger.
5. ON[TABLE_NAME]: It specifies the name of the
table on which the trigger is going to be applied.
6. FOR EACH ROW: Row-level trigger gets executed
when any row value of any column changes.
7. TRIGGER BODY: It consists of queries that need to
be executed when the trigger is called.

Advantages of Triggers

1. Triggers provide a way to check the integrity of the data.


When there is a change in the database the triggers can
adjust the entire database.
2. Triggers help in keeking User Interface lightweight.
Instead of putting the same function call all over the
application you can put a trigger and it will be executed.

Disadvantages of Triggers

1. Triggers may be difficult to troubleshoot as they execute


automatically in the database. If there is some error then
it is hard to find the logic of trigger because they are
fired before or after updates/inserts happen The triggers
may increase the overhead of the database as they
are executed every time any field is updated.

You might also like