Hnd2 Database
Hnd2 Database
28
Introduction to
2.2.4 Disadvantages of Triggers .............................................. 29
DATABASE MODELLING & 2.3 A Database Report ................................................................ 29
v 1
single unit which in turn provides data abstraction by 1.1.2. Object Classes:
hiding the implementation details from the user. An object which is a real-world entity is an instance of a
The object structure is further composed of three types of class. Hence first we need to define a class and then the
components: Messages, Methods, and Variables. These are objects are made which differ in the values they store but
explained below. share the e class definition. The objects in turn correspond
to various messages and variables stored in them.
1. Messages –
Example
A message provides an interface or acts as a
class CLERK
communication medium between an object and the
outside world. A message can be of two types: { //variables
Read-only message: If the invoked method does not
char name;
change the value of a variable, then the invoking
message is said to be a read-only message. string address;
Update message: If the invoked method changes the
int id;
value of a variable, then the invoking message is
said to be an update message. int salary;
//Messages
2. Methods –
When a message is passed then the body of code that is char get_name();
executed is known as a method. Whenever a method is
string get_address();
executed, it returns a value as output. A method can be
of two types: int annual_salary();
Read-only method: When the value of a variable is
};
not affected by a method, then it is known as the
read-only method. In the above example, we can see, CLERK is a class that
Update-method: When the value of a variable holds the object variables and messages.
change by a method, then it is known as an update
An OODBMS also supports inheritance in an extensive
method.
manner as in a database there may be many classes with
similar methods, variables and messages. Thus, the concept
3. Variables
of the class hierarchy is maintained to depict the
It stores the data of an object. The data stored in the
similarities among various classes.
variables makes the object distinguishable from one
another.
2 3
1.2 Relational Database and Object-Oriented
// Class 2
This is the last phase that comes after the designing is done.
// Department class
It implements the design using any OO languages like C++,
// Department class contains list of Students
Java, etc. class Department {
// Java program to illustrate // Attributes of Department class
// Concept of Aggregation private String deptName;
private List<Student> students;
// Importing required classes
import java.io.*; // Constructor of Department class
6 7
public Department(String deptName,
List<Student> students) public void addDepartment(Department
{ department)
this.deptName = deptName; {
this.students = students; departments.add(department);
} }
12 13
2.1.1.2 Unbound Forms 2.1.2 Form Design
These forms are not connected to an underlying record or When designing forms in an object-oriented database
data source. Unbound forms could be dialog boxes, switch (OODB), there are a few key considerations to keep in mind.
boards, or navigation forms. In other words, unbound forms The principles of object-oriented design, encapsulation, and
are typically used to navigate or interact with the database at inheritance can be applied to create efficient and reusable
large, as opposed to the data itself. form components. Here's a step-by-step guide for designing
forms in an object-oriented database:
Types of Bound Forms
Identify the Entities: Start by identifying the entities or
There are many types of bound forms you can create in objects that you want to represent in your form. These could
Access. Let us understand the types be real-world entities like customers, products, or
employees.
Single Item Form
This is the most popular one and this is where the records Define Classes: Create classes to represent each entity. Each
are displayed — one record at a time. class should have attributes (data) and methods (behavior)
Multiple Item Form that define its properties and actions. For example, a
This displays multiple records at a time from that bound "Customer" class might have attributes like name, address,
data source. and email, along with methods for updating customer
details.
Split Form
The form is divided into halves, either vertically or Form Component Classes: Create form component classes
horizontally. One half displays a single item or record, and that inherit from base component classes. For example, you
the other half displays a list or provides a datasheet view of might have a "TextField" class, a "Dropdown" class, and a
multiple records from the underlying data source. A trigger "Checkbox" class. These classes should encapsulate the
is a set of SQL statements that reside in system memory logic and behavior specific to each form component.
with unique names. It is a specialized category of stored
procedure that is called automatically when a database Define Relationships: Identify any relationships between
server event occurs. Each trigger is always associated with entities. For example, if you have a "Customer" entity and
a table. an "Order" entity, there might be a one-to-many relationship
where a customer can have multiple orders. Represent these
relationships using references or associations between the
classes.
14 15
Create Form Classes: Design form classes that represent 2.2 Trigger
the overall structure and behavior of your forms. These
classes will contain instances of the form component classes A trigger is called a special procedure because it cannot be
and handle the form's validation, submission, and data called directly like a stored procedure. The key distinction
retrieval processes. between the trigger and procedure is that a trigger is called
automatically when a data modification event occurs against
Implement Event Handling: Use event handling a table. A stored procedure, on the other hand, must be
mechanisms to capture user interactions with the form invoked directly.
components. For example, when a user enters text in a text
field, an event handler should update the corresponding The following are the main characteristics that distinguish
attribute in the underlying class instance. triggers from stored procedures:
Reusability and Modularity: Design your form We can create a trigger in SQL Server by using
components and form classes to be reusable and modular. the CREATE TRIGGER statement as follows:
This allows you to create different forms by combining the
appropriate components and promotes code maintenance CREATE TRIGGER schema.trigger_name
and scalability. ON table_name
Testing and Iteration: Test your form design thoroughly to AFTER {INSERT, UPDATE, DELETE}
ensure its functionality, usability, and responsiveness. Make
necessary iterations based on user feedback and any [NOT FOR REPLICATION]
discovered issues. AS
By following these steps, you can create a robust and {SQL_Statements}
efficient form design in an object-oriented database,
leveraging the principles of encapsulation, inheritance, and schema: It is an optional parameter that defines which
modularity. schema the new trigger belongs to.
16 17
trigger_name: It is a required parameter that defines the
4. Name VARCHAR(45),
name for the new trigger.
5. Salary INT,
table_name: It is a required parameter that defines the table
6. Gender VARCHAR(12),
name to which the trigger applies. Next to the table name,
we need to write the AFTER clause where any events like 7. DepartmentId INT
INSERT, UPDATE, or DELETE could be listed. 8. )
NOT FOR REPLICATION: This option tells Next, we will insert some record into this table as follows:
that SQL Server does not execute the trigger when data is
modified as part of a replication process.
1. INSERT INTO Employee VALUES (1,'Steffan', 82
SQL_Statements: It contains one or more SQL statements 000, 'Male', 3),
that are used to perform actions in response to an event that
occurs 2. (2,'Amelie', 52000, 'Female', 2),
3. (3,'Antonio', 25000, 'male', 1),
Triggers will be helpful when we need to execute some
events automatically on certain desirable scenarios. For 4. (4,'Marco', 47000, 'Male', 2),
example, we have a constantly changing table and need to
know the occurrences of changes and when these changes 5 (5,'Eliana', 46000, 'Female', 3)
happen. If the primary table made any changes in such
We can verify the insert operation by using the SELECT
scenarios, we could create a trigger to insert the desired data
statement. We will get the below output:
into a separate table.
18 19
4 Miracle 60000 Male 3
5. BEGIN
5 Ayomide 49000 Female 4 6. Declare @Id int
6 Agada 70000 Male 4 7. SELECT @Id = Id from inserted
8. INSERT INTO Employee_Audit_Test
9. VALUES ('New employee with Id = ' + CAST(@I
d AS VARCHAR(10)) + ' is added at ' + CAST(Get
We will also create another table named date() AS VARCHAR(22)))
'Employee_Audit_Test' to automatically store transaction
records of each operation, such as INSERT, UPDATE, or 10. END
DELETE on the Employee table:
After creating a trigger, we will try to add the following
record into the table:
1. CREATE TABLE Employee_Audit_Test
2. ( 1. INSERT INTO Employee VALUES (6,'Peter', 6200
3. Id int IDENTITY, 0, 'Male', 3)
4. Audit_Action text
If no error is found, execute the SELECT statement to check
5. ) the audit records. We will get the output as follows:
1. DELETE FROM Employee WHERE Id = 2; We can categorize the triggers in SQL Server in mainly three
types:
If no error is found, it gives the message as below:
1. Data Definition Language (DDL) Triggers
2. Data Manipulation Language (DML) Triggers
3. Logon Triggers
DDL Triggers
Figure 2 SQL delete report log
DDL triggers are fired in response to the DDL events, such
as CREATE, ALTER, and DROP statements. We can create
Finally, execute the SELECT statement to check the audit these triggers at the database level or server level, depending
records: on the type of DDL events. It can also be executed in
response to certain system-defined stored procedures that do
DDL-like operations.
22 23
When we need to audit changes made in the Insert, Update, Or Delete Statements
database schema 6. END
When we need to respond to a change made in the
database schema Instead of Triggers
After Triggers Instead of Trigger fires before SQL Server begins to execute
the triggering operation that triggered it. It means that no
After trigger fires, when SQL Server completes the condition constraint check is needed before the trigger runs.
triggering action successfully, that fired it. Generally, this As a result, even if the constraint check fails, this trigger will
trigger is executed when a table completes an insert, update fire. It is the opposite of the AFTER trigger. We can create
or delete operations. It is not supported in views. Sometimes the INSTEAD OF triggers on a table that executes
it is known as FOR triggers. It can be further classified into successfully but doesn't contain the table's actual insert,
three types update, or delete operations.
1. AFTER INSERT Trigger We can classify this trigger further into three types:
2. AFTER UPDATE Trigger
1. INSTEAD OF INSERT Trigger
3. AFTER DELETE Trigger
2. INSTEAD OF UPDATE Trigger
Example: When we insert data into a table, the trigger 3. INSTEAD OF DELETE Trigger
associated with the insert operation on that table will not fire
until the row has passed all constraints, such as the primary Example: When we insert data into a table, the trigger
key constraint. SQL Server cannot fire the AFTER trigger associated with the insert operation on that table will fire
when the data insertion failed. The following is illustration before the data has passed all constraints, such as the
of the After Triggers syntax in SQL Server: primary key constraint. SQL Server also fires the Instead of
Trigger if the data insertion fails.
1. CREATE TRIGGER schema_name.trigger_name
2. ON table_name The following is an illustration of the Instead of Triggers
syntax in SQL Server:
3. AFTER {INSERT | UPDATE | DELETE}
4. AS 1. CREATE TRIGGER schema_name.trigger_name
5. BEGIN 2. ON table_name
Trigger Statements 3. INSTEAD OF {INSERT | UPDATE | DELETE}
24 25
4. AS
5. BEGIN
1. ALTER TRIGGER [dbo].[triggers_in_sql]
trigger statements
2. ON [dbo].[EmployeeTable]
Insert, Update, or Delete commands
3. AFTER INSERT
6. END
4. AS
Logon Triggers 5. BEGIN
Modify as per your needs
Logon triggers fires in response to a LOGON event. The 6. END
LOGON event occurs when a user session is generated with
an SQL Server instance, which is made after the How to DELETE Triggers in SQL Server?
authentication process of logging is completed but before
establishing a user session. As a result, the SQL Server error
We can remove an existing trigger in SQL Server using
log will display all messages created by the trigger,
the DROP TRIGGER statement. We must be very careful
including error messages and the PRINT statement
while removing a trigger from the table. Because once we
messages. If authentication fails, logon triggers do not
have deleted the trigger, it cannot be recovered. If a trigger
execute. These triggers may be used to audit and control
is not found, the DROP TRIGGER statement throws an
server sessions, such as tracking login activity or limiting the
error.
number of sessions for a particular login.
The following syntax removes DML triggers:
UPDATE Triggers in SQL Server
The data stored in the table can be changed over a period of 1. DROP TRIGGER [IF EXISTS] schema_name.trigger_n
time. In that case, we also need to make changes in the ame;
triggers. We can do this in two ways into the SQL Server.
The first one is to use the SQL Server Management Studio, If we want to remove more than one trigger at once, we must
and the second one is the Transact-SQL Query. separate the trigger using the comma operator:
32 33
6. Polymorphism – Mechanism by which functions or 5. Deployment Diagram: Deployment Diagrams are used
entities are able to exist in different forms. to represent system hardware and its software. It tells us
what hardware components exist and what software
2.4.2 Structural UML Diagrams components run on them. We illustrate system
1. Class Diagram – The most widely use UML diagram is architecture as distribution of software artifacts over
the class diagram. It is the building block of all object distributed targets. An artifact is the information that is
oriented software systems. We use class diagrams to generated by system software.
depict the static structure of a system by showing 6. Package Diagram – Package Diagrams are used to
system’s classes, their methods, attributes and depict how packages and their elements have been
relationship between different classes or objects. organized. A package diagram simply shows us the
2. Composite Structure Diagram: composite structure dependencies between different packages and internal
diagrams are used to represent the internal structure of composition of packages.
a class and its interaction points with other parts of the
system. A composite structure diagram represents
relationship between parts and their configuration
which determine how the classifier (class, a component,
or a deployment node) behaves. They represent internal
structure of a structured classifier making the use of
parts, ports, and connectors.
3. Object Diagram – An Object Diagram can be referred
to as a screenshot of the instances in a system and the
relationship that exists between them. Since object
diagrams depict behaviour when objects have been
instantiated, we are able to study the behaviour of the
system at a particular instant.
4. Component Diagram: Component diagrams are used to
represent how the physical components in a system
have been organized. We use them for modelling
implementation details. Component Diagrams depict
the structural relationship between software system
elements and help us in understanding if functional
requirements have been covered by planned
development.
34 35
CHAPTER THREE
Storage System in DBMS
With this, the system also keeps the following data based on
users of the system:
40 41
Number of tuples in each relation in a non-formalized manner. It does not use any normal form
so as to fastly access the data stored in the dictionary.
Method of storage for each relation, such as
clustered or non-clustered. For example, in the data dictionary, it uses underline below
the value to represent that the following field contains a
A system may also store the storage organization, whether primary key.
sequential, hash, or heap. It also notes the location where
each relation is stored: 3.3 File Organization Storage
If relations are stored in the files of the operating There are different ways of storing data in the database.
system, the data dictionary note, and stores the Storing data in files is one of them. A user can store the data
in files in an organized manner. These files are organized
names of the file.
logically as a sequence of records and reside permanently on
If the database stores all the relations in a single disks. Each file is divided into fixed-length storage units
file, the data dictionary notes and store the blocks known as Blocks. These blocks are the units of storage
containing records of each relation in a data allocation as well as data transfer. Although the default
block size in the database is 4 to 8 kilobytes, many databases
structure similar to a linked list.
allow specifying the size at the time of creating the database
instance.
At last, it also stores the information regarding each index of
all the relations:
Usually, the record size is smaller than the block size. But,
for large data items such as images, the size can vary. For
Name of the index. accessing the data quickly, it is required that one complete
Name of the relation being indexed. record should reside in one block only. It should not be
Attributes on which the index is defined. partially divided between one or two blocks.
The type of index formed.
Fixed-length records.
All the above information or metadata is stored in a data Variable-length records
dictionary. The data dictionary also maintains updated
information whenever they occur in the relations. Such Fixed-Length Records
metadata constitutes a miniature database. Some systems
store the metadata in the form of a relation in the database 1. Fixed-length records mean setting a length and
itself. The system designers design the way of representation storing the records into the file. If the record size
of the data dictionary. Also, a data dictionary stores the data exceeds the fixed size, it gets divided into more than
42 43
one block. Due to the fixed size there occurs 2. Defining the way of storing variable-length records
following two problems:
within a block so as to extract that record in a block
2. Partially storing subparts of the record in more than easily.
one block requires access to all the blocks containing
the subparts to read or write in it. Thus, the representation of a variable-length record can be
divided into two parts:
3. It is difficult to delete a record in such a file
organization. It is because if the size of the existing 1. An initial part of the record with fixed-length
record is smaller than the block size, then another attributes such as numeric values, dates, fixed-length
record or a part fills up the block. character attributes for storing their value.
Variable-Length Records 2. The data for variable-length attributes such as varchar
type is represented in the initial part of the record by
Variable-length records are the records that vary in size. It (offset, length) pair. The offset refers to the place
requires the creation of multiple blocks of multiple sizes to
where that record begins, and length refers to the
store them. These variable-length records are kept in the
following ways in the database system: length of the variable-size attribute. Thus, the initial
part stores fixed-size information about each
1. Storage of multiple record types in a file. attribute, i.e., whether it is the fixed-length or
2. It is kept as Record types that enable repeating fields variable-length attribute.
like multisets or arrays.
3.3.1 Slotted-page Structure
3. It is kept as Record types that enable variable lengths
either for one field or more. There occurs a problem to store variable-length records
within the block. Thus, such records are organized in a
In variable-length records, there exist the following two slotted-page structure within the block. In the slotted-page
problems: structure, a header is present at the starting of each block.
This header holds information such as:
1. Defining the way of representing a single record so
as to extract the individual attributes easily. 1. The number of record entries in the header
2. No free space remaining in the block
44 45
3. An array containing the information on the location location. This stops fragmentation of space inside the block
but supports indirect pointers to the record.
and size of the records.
3.3.2 Object storage
48 49
3.3.4.1 Static Hashing
Searching a record
Delete a Record
52 53
How to insert a new record
For example:
Figure 12 Adding records with Static hashing Consider the following grouping of keys into buckets,
depending on the prefix of their hash address:
54 55
Figure 15 Dynamic hashing structure
56 57
In this case, the bucket overflow situation will 3.3.6 B+ File Organization
also occur. But it might take little time to reach B+ tree file organization is the advanced method of an
this situation than static hashing. indexed sequential access method. It uses a tree-like
structure to store records in File. It uses the e concept of
3.3.5 Multiple Key Access
key-index where the primary key is used to sort the
Consider the following example.
records. For each primary key, the value of the index is
“Find all staff names in DNo = 5, with a salary equal to
generated and mapped with the record. The B+ tree is
400000 .
similar to a binary search tree (BST), but it can have
Select SName
more than two children. In this method, all the records
From STAFF are stored only at the leaf node. Intermediate nodes act
Where DNo = 5 and Salary = 400000; as a pointer to the leaf nodes. They do not contain any
records.
58 59
The nodes to the left of the root node contain the CHAPTER FOUR
prior value of the root and nodes to the right
contain next value of the root, i.e., 15 and 30 4. Query Processing
respectively.
I
There is only one leaf node which has only values,
i.e., 10, 12, 17, 20, 24, 27 and 29.
n our previous sections, we understood various concepts
Searching for any record is easier as all the leaf
nodes are bAdeced. in query processing. We learned about the query processing
steps, selection operations, and also several types of
In this method, searching any record can be
algorithms used for performing the join operation with their
traversed through the single path and accessed cost estimations. We are already aware of computing and
easily. representing the individual relational operations for the
given user query or expression. Here, we will get to know
Pros of B+ tree file organization how to compute and evaluate an expression with multiple
operations.
In this method, searching becomes very easy as
all the records are stored only in the leaf nodes 4.1 Evaluation of Expressions
and sorted the sequential linked list.
For evaluating an expression that carries multiple operations
Traversing through the tree structure is easier and
in it, we can perform the computation of each operation one
faster. by one. However, in the query processing system, we use
The size of the B+ tree has no restrictions, so the two methods for evaluating an expression carrying multiple
number of records can increase or decrease and operations. These methods are:
the B+ tree structure can also grow or shrink.
1. Materialization
It is a bAdeced tree structure, and any
insert/update/delete does not affect the 2. Pipelining
performance of tree. Let's take a brief discussion of these methods.
Cons of B+ tree file organization
60 61
4.1.1 Materialization 4.2 Join Operations:
In this method, the given expression evaluates one relational A Join operation combines related tuples from different
operation at a time. Also, each operation is evaluated in an relations, if and only if a given join condition is satisfied. It
appropriate sequence or order. After evaluating all the is denoted by ⋈.
operations, the outputs are materialized in a temporary
relation for their subsequent uses. It leads the materialization Example:
method to a disadvantage. The disadvantage is that it needs Table 2 Employee table
to construct those temporary relations for materializing the
results of the evaluated operations, respectively. These
EMP_CODE EMP_NAME
temporary relations are written on the disks unless they are
small in size.
101 Dele
62 63
1. Result of join Operation: (EMPLOYEE ⋈ SALARY) It is denoted by ⋈.
Table 4 Join operation of employee and salary table Example: Let's use the above EMPLOYEE table and
SALARY table:
Dele 50000
Chike 30000
Osaro 25000
1. (EMPLOYEE ⋈ FACT_WORKERS)
Output:
66 67
Example: Using the above EMPLOYEE table and
Example: Using the above EMPLOYEE table and FACT_WORKERS Relation
Input: Output:
Table 10 Right outer join
EMP_NAME STR CITY FIRM SAL
1. EMPLOYEE ⟕ FACT_WORKERS
b. Right outer join: c. Full outer join:
Right outer join contains the set of tuples of all Full outer join is like a left or right join except that
combinations in R and S that are equal on their it contains all rows from both tables.
common attribute names. In full outer join, tuples in R that have no
In right outer join, tuples in S have no matching matching tuples in S and tuples in S that have no
tuples in R. matching tuples in R in their common attribute
It is denoted by ⟖. name.
It is denoted by ⟗.
68 69
Example: Using the above EMPLOYEE table and Example:
FACT_WORKERS table as Input:
Table 12 customer relation
Output: 1 Lagos
70 71
Let us take a look at the syntax of writing a query to perform
the cross join operation in SQL.
Table 14 equi join
1. SELECT TableName1.columnName1, TableName2.colum
CLASS_ID NAME PRODUCT_ID CITY nName2 FROM TableName1 CROSS JOIN TableName2
ON TableName1.ColumnName = TableName2.ColumnNa
1 Joshua 1 Lagos me;
2 Onose 2 Benin Now let us see take a deeper dive into the cross join in SQL
with the help of examples. All the queries in the examples
3 Ighalo 3 Ekpoma will be written using the MySQL database.
For example:
If there are two records in table 1 and three records in table
2, then after performing cross join operation, we will get
six records in the final table.
72 73
Table 16 Departments which stores the record returned by the SELECT statement
is called a result-set table.
Department_id Department_name
4.3.1 Syntax of SELECT Statement in SQL
1 IT 1. SELECT Column_Name_1, Column_Name_2, .....,
2 HR Column_Name_N FROM Table_Name;
If you want to access all rows from all fields of the table, use
DepartmentID Department_ Employee_ID the following SQL SELECT syntax with * asterisk sign:
3 Marketing 4
4.3.2 Examples of SELECT Statement in SQL
4 Accounts 5
Here, we took the following two different SQL examples
which will help you to execute the SELECT statement for
4.3 SQL SELECT Statement retrieving the records:
Example 1:
The SELECT statement is the most commonly used
command in Structured Query Language. It is used to access
Firstly, we have to create the new table and then insert some
the records from one or more database tables and views. It
dummy records into it.
also retrieves the selected data that follow the conditions we
want. Use the following query to create the Student_Records table
in SQL:
By using this command, we can also access the particular
record from the particular column of the table. The table
1. CREATE TABLE Student_Records
2(
74 75
Table 18
3. Student_Id Int PRIMARY KEY,
4. First_Name VARCHAR (20),
ID FName Address
Percen
5. Address VARCHAR (20),
Grade
Age
tage
6. Age Int NOT NULL,
7. Percentage Int NOT NULL,
8. Grade VARCHAR (10) 201 Sam Warri 18 89 A2
9. );
202 Olumide Ibadan 19 93 A1
The following query inserts the record of intelligent
students into the Student_Records table: 203 Efosa Warri 20 89 A2
X's Account
76 77
1. Open_Account(X) The first operation reads X's value from database
2. Old_BAdece = X.bAdece and stores it in a buffer.
3. New_BAdece = Old_BAdece - 800 The second operation will decrease the value of X
4. X.bAdece = New_BAdece by 500. So buffer will contain 3500.
5. Close_Account(X) The third operation will write the buffer's value to
the database. So X's final value will be 3500.
Y's Account
But it may be possible that because of the failure of
1. Open_Account(Y) hardware, software or power, etc. that transaction may fail
2. Old_BAdece = Y.bAdece before finished all the operations in the set.
3. New_BAdece = Old_BAdece + 800
For example: If in the above transaction, the debit
4. Y.bAdece = New_BAdece transaction fails after executing operation 2 then X's value
5. Close_Account(Y) will remain 4000 in the database which is not acceptable by
the bank.
4.4.1 Operations of Transaction:
To solve this problem, we have two important operations:
Following are the main operations of transaction:
Commit: It is used to save the work done permanently.
Read(X): Read operation is used to read the value of X
Rollback: It is used to undo the work done.
from the database and stores it in a buffer in main memory.
Write(X): Write operation is used to write the value back to
the database from the buffer.
Let's take an example to debit transaction from an account 4.4.2 States of Transaction
which consists of following operations:
In a database, the transaction can be in one of the following
1. R(X); states -
2. X = X - 500;
3. W(X);
78 79
Committed
Failed state
80 81
After aborting the transaction, the database
recovery module will select one of the two
operations:
84 85
Figure 23 Precedence graph for schedule S2:
86 87
Figure 25 Schedule with two transaction Figure 26 Recoverable with cascading rollback
The above figure shows a schedule with two transactions. The above Table 3 shows a schedule with two transactions.
Transaction T1 reads and writes A, and that value is read Transaction T1 reads and write A and commits, and that
and written by transaction T2. But later on, T1 fails. Due to value is read and written by T2. So this is a cascade less
this, we have to rollback T1. T2 should be rollback because recoverable schedule.
T2 has read the value written by T1. As it has not committed 4.6 Deadlock in DBMS
before T1 commits so we can rollback transaction T2 as
well. So it is recoverable with cascade rollback. A deadlock is a condition where two or more transactions
are waiting indefinitely for one another to give up locks.
Recoverable with cascading rollback: The schedule will be Deadlock is said to be one of the most feared complications
recoverable with cascading rollback if Tj reads the updated in DBMS as no task ever gets finished and is in waiting state
value of Ti. Commit of Tj is delayed till commit of Ti. forever.
4.6.1 Deadlock Avoidance The wait for a graph for the above scenario is shown below:
92 93
Reasons for a transaction failure could be - the disk or any other failure, which destroy all
or part of disk storage.
1. Logical errors: If a transaction cannot
complete due to some code error or an internal 4.8 Log-Based Recovery
error condition, then the logical error occurs. The log is a sequence of records. Log of each transaction is
2. Syntax error: It occurs where the DBMS itself maintained in some stable storage so that if any failure
terminates an active transaction because the occurs, then it can be recovered from there. If any operation
database system is not able to execute it. For is performed on the database, then it will be recorded in the
example, The system aborts an active log. But the process of storing the logs should be done before
transaction, in case of deadlock or resource the actual transaction is applied in the database.
unavailability.
Let's assume there is a transaction to modify the City of a
4.7.2. System Crash student. The following logs are written for this transaction.
System failure can occur due to power
When the transaction is initiated, then it writes 'start'
failure or other hardware or software
log.
failure. Example: Operating system
<Tn, Start>
error.
When the transaction modifies the City from 'Noida'
Fail-stop assumption: In the system
to 'Bangalore', then another log is written to the file.
crash, non-volatile storage is assumed
<Tn, City, 'Noida', 'Bangalore' >
not to be corrupted.
When the transaction is finished, then it writes
4.7.3. Disk Failure another log to indicate the end of the transaction.
It occurs where hard-disk drives or storage
1. <Tn, Commit>
drives used to fail frequently. It was a common
problem in the early days of technology There are two approaches to modify the database:
evolution.
1. Deferred database modification:
Disk failure occurs due to the formation of bad
sectors, disk head crash, and unreachability to
94 95
The deferred modification technique occurs if the 4.8.2 Checkpoint
transaction does not modify the database until it has The checkpoint is a type of mechanism where all the
committed. previous logs are removed from the system and permanently
In this method, all the logs are created and stored in stored in the storage disk. The checkpoint is like a
the stable storage, and the database is updated when bookmark. While the execution of the transaction, such
a transaction commits. checkpoints are marked, and the transaction is executed then
using the steps of the transaction, the log files will be
2. Immediate database modification:
created. When it reaches to the checkpoint, then the
The Immediate modification technique occurs if transaction will be updated into the database, and till that
database modification occurs while the transaction is point, the entire log file will be removed from the file. Then
still active. the log file is updated with the new step of transaction till
In this technique, the database is modified next checkpoint and so on.
immediately after every operation. It follows an
actual database modification. The checkpoint is used to declare a point before which the
DBMS was in the consistent state, and all transactions were
4.8.1 Recovery using Log records committed.
When the system is crashed, then the system consults the log 3.8.2.1 Recovery using Checkpoint
to find which transactions need to be undone and which need
to be redone. In the following manner, a recovery system recovers the
database from this failure:
1. If the log contains the record <Ti, Start> and <Ti,
Commit> or <Ti, Commit>, then the Transaction Ti
needs to be redone.
2. If log contains record<Tn, Start> but does not contain
the record either <Ti, commit> or <Ti, abort>, then
the Transaction Ti needs to be undone.
Figure 28 Recovery system
96 97
The recovery system reads log files from the end to start. CHAPTER FIVE
It reads log files from T4 to T1.
Concurrency Control Protocols
Recovery system maintains two lists, a redo-list, and an
undo-list. The concurrency control protocols ensure the atomicity,
consistency, isolation, durability and serializability of the
The transaction is put into redo state if the recovery concurrent execution of the database transactions.
system sees a log with <Tn, Start> and <Tn, Commit> or Therefore, these protocols are categorized as:
just <Tn, Commit>. In the redo-list and their previous
Lock Based Concurrency Control Protocol
list, all the transactions are removed and then redone
Time Stamp Concurrency Control Protocol
before saving their logs. For example: In the log file,
Validation Based Concurrency Control Protocol
transaction T2 and T3 will have <Tn, Start> and <Tn,
Commit>. The T1 transaction will have only <Tn, We will understand and discuss each protocol one by one in
commit> in the log file. That's why the transaction is our next sections.
committed after the checkpoint is crossed. Hence it puts
5.1 Lock-Based Protocol
T1, T2 and T3 transaction into redo list.
In this type of protocol, any transaction cannot read or write
The transaction is put into undo state if the recovery data until it acquires an appropriate lock on it. There are two
system sees a log with <Tn, Start> but no commit or types of lock:
abort log found. In the undo-list, all the transactions are
1. Shared lock:
undone, and their logs are removed. For
example: Transaction T4 will have <Tn, Start>. So T4 It is also known as a Read-only lock. In a shared
will be put into undo list since this transaction is not yet lock, the data item can only read by the
complete and failed amid. transaction.
It can be shared between the transactions because
when the transaction holds a lock, then it can't
update the data on the data item.
98 99
2. Exclusive lock: If all the locks are not granted then this protocol
allows the transaction to rolls back and waits until
In the exclusive lock, the data item can be both
all the locks are granted.
reads as well as written by the transaction.
This lock is exclusive, and in this lock, multiple
transactions do not modify the e data
simultaneously.
Example:
Figure 30
102 103
The following way shows how unlocking and locking work
with 2-PL.
Transaction T1:
Transaction T2:
104 105
Let's assume there are two transactions T1 and T2. TS(TI) denotes the timestamp of the transaction Ti.
Suppose the transaction T1 has entered the system at 007 R_TS(X) denotes the Read time-stamp of data-item X.
times and transaction T2 has entered the system at 009
times. T1 has the higher priority, so it executes first as it W_TS(X) denotes the Write time-stamp of data-item X.
is entered the system first. The timestamp ordering
5.2.1 Advantages and Disadvantages of TO protocol:
protocol also maintains the timestamp of last 'read' and
'write' operation on a data. TO protocol ensures serializability since the
precedence graph is as follows:
Basic Timestamp ordering protocol works as follows:
Finish(Ti): It contains the time when Ti finishes its write For example: Consider a tree which has four levels of nodes.
phase.
The first level or higher level shows the entire
I. This protocol is used to determine the time stamp for database.
the transaction for serialization using the time stamp The second level represents a node of type area. The
of the validation phase, as it is the actual phase which higher level database consists of exactly these areas.
determines if the transaction will commit or rollback.
108 109
The area consists of children nodes which are known 5.5 Intention Mode Lock
as files. No file can be present in more than one area.
Intention-shared (IS): It contains explicit locking at a lower
Finally, each file contains child nodes known as level of the tree but only with shared locks.
records. The file has exactly those records that are its
child nodes. No records represent in more than one Intention-Exclusive (IX): It contains explicit locking at a
lower level with exclusive or shared locks.
file.
Hence, the levels of the tree starting from the top Shared & Intention-Exclusive (SIX): In this lock, the node
level are as follows: is locked in shared mode, and some node is locked in
exclusive mode by the e transaction.
1. Database, 2) Area, 3) File 4) Record
Compatibility Matrix with Intention Lock Modes: The
below table describes the compatibility matrix for these lock
modes:
112 113
5.6.1 Buffer Manager I. Buffer Replacement Strategy: If no space is left in the
A Buffer Manager is responsible for allocating space to buffer, it is required to remove an existing block from
the buffer in order to store data into the buffer. If a user the buffer before allocating the new one. The various
request a particular block and the block is available in the operating system uses the LRU (least recently used)
buffer, the buffer manager provides the block address in scheme. In LRU, the block that was least recently
the main memory. If the block is not available in the used is removed from the buffer and written back to
buffer, the buffer manager allocates the block in the the disk. Such type of replacement strategy is known
buffer. If free space is not available, it throws out some as Buffer Replacement Strategy.
existing blocks from the buffer to allocate the required II. Pinned Blocks: If the user wants to recover any
space for the new block. database system from the crashes, it is essential to
restrict the time when a block is written back to the
The blocks which are thrown are written back to the disk
disk. In fact, most recovery systems do not allow the
only if they are recently modified when writing on the
blocks to be written on the disk if the block updation
disk.
being in progress. Such types of blocks that are not
If the user requests such thrown-out blocks, the buffer allowed to be written on the disk are known as pinned
manager reads the requested block from the disk to the blocks. Luckily, many operating systems do not
buffer and then passes the address of the requested block support the pinned blocks.
to the user in the main memory. III. Forced Output of Blocks: In some cases, it becomes
necessary to write the block back to the disk even
However, the internal actions of the buffer manager are though the space occupied by the block in the buffer
not visible to the programs that may create any problem is not required. When such type of write is required,
in disk-block requests. The buffer manager is just like a it is known as the forced output of a block. It is
virtual machine. because sometimes the data stored on the buffer may
get lost in some system crashes, but the data stored
For serving the database system in the best possible way, the
buffer manager uses the following methods: on the disk usually does not get affected due to any
disk crash.
114 115
5.6.3 Buffer Replacement Strategies the processing of the block containing R1 is completed, and
the block is no longer required in the main memory. Even it
Buffer replacement is a method of replacing existing blocks has been recently used. Finally, the buffer manager gets the
in the buffer with the new block. By doing so, it helps to information, and it passes the report to the database system
reduce the number of disk access. The buffer manager uses for further processing.
the following strategies for Buffer Replacements:
5.6.3.3 Most Recently Used (MRU) Strategy
5.6.3.1 Least Recently Used (LRU) Strategy
MRU follows the opposite strategy of LRU. According to
According to LRU, the data or process which has the lowest MRU, the data or process which has the highest score in
score in its recent use is replaced with the new process or recent use gets replaced with the new data or process. In
data. In block-replacement strategy, if there is a need to block-replacement strategy, the block which is recently used
replace an existing block, the least recently referenced block gets replaced with the new block. Such type of strategy of
gets replaced. However, the replacement scheme of a Buffer-replacement is known as Most Recently Used
database system is different from the operating system. An strategy.
operating system depends on the past for predicting the
future. But, a database system is capable of predicting the As a result, a database system picks and follows a suitable
future plan accurately. Generally, a user needs to follow strategy based on different scenarios. But, it is seen that
various steps for making a block request to the database large database systems at most uses LRU techniques even
system. However, these steps enable the database system to though it may have some faults too. Time is also an
determine the requested block in advance. influencing factor in choosing the appropriate strategy. As
sometimes, a database system may get concurrent user
5.6.3.2 Toss-immediate Strategy requests, so to preserve the data consistency, it may need to
delay some requests. During this, if the buffer manager gets
According to this strategy, when the space occupied by a to know the information of the requested blocks which are
specific block is freed, the buffer manager should get delayed, then it may use that information for altering its
instructed before the processing of the final result. It will strategies. However, a buffer manager can retain the request
help the database system to know that space is going to be of the non-delayed blocks with the delayed blocks.
vacant, and a new block can be allocated to that place. This
type of block-replacement strategy is known as the Toss-
immediate strategy.
116 117
use data analytics specifically to mean advanced analytics,
treating BI as a separate category.
CHAPTER SIX
Data analytics initiatives can help businesses increase
Data analytics and Decision Support
revenue, improve operational efficiency, optimize
System marketing campaigns and bolster customer service efforts.
6.1 Data Analytics Analytics also enable organizations to respond quickly to
Data analytics (DA) is the process of examining data sets to emerging market trends and gain a competitive edge over
find trends and draw conclusions about the information they business rivals. Depending on the application, the data that's
contain. Increasingly, data analytics is done with the aid of analyzed can consist of either historical records or new
specialized systems and software. Data analytics information that has been processed for real-time analytics.
technologies and techniques are widely used in commercial In addition, it can come from a mix of internal systems and
industries to enable organizations to make more-informed external data sources.
business decisions. Scientists and researchers also use
6.1.1 Data Analytics Process
analytics tools to verify or disprove scientific models,
theories and hypotheses. Data analytics applications involve more than just analyzing
data, particularly on advanced analytics projects. Much of
As a term, data analytics predominantly refers to an the required work takes place upfront, in collecting,
assortment of applications, from basic business integrating and preparing data and then developing, testing
intelligence (BI), reporting and online analytical processing and revising analytical models to ensure that they produce
(OLAP) to various forms of advanced analytics. In that accurate results. In addition to data scientists and other data
sense, it's similar in nature to business analytics, another analysts, analytics teams often include data engineers, who
umbrella term for approaches to analyzing data. The create data pipelines and help prepare data sets for analysis.
difference is that the latter is oriented to business uses, while
data analytics has a broader focus. The expansive view of The analytics process starts with data collection. Data
the term isn't universal, though: In some cases, people scientists identify the information they need for a particular
118 119
analytics application, and then work on their own or with descriptive analytics. They take the findings from
descriptive analytics and dig deeper to find the cause. The
data engineers and the IT staff to assemble it for use. Data
performance indicators are further investigated to discover
from different source systems may need to be combined via why they got better or worse. This generally occurs in three
data integration routines, transformed into a common format steps:
and loaded into an analytics system, such as a Hadoop Identify anomalies in the data. These may be unexpected
cluster, NoSQL database or data warehouse. changes in a metric or a particular market.
Data that is related to these anomalies is collected.
(Craig, 2023).
Statistical techniques are used to find relationships and
trends that explain these anomalies.
6.1.2 Types of Data Analytics 3. Predictive analytics helps answer questions about what
Data analytics is a broad field. There are four primary types will happen in the future. These techniques use historical
of data analytics: descriptive, diagnostic, predictive and data to identify trends and determine if they are likely to
prescriptive analytics. Each type has a different Beninl and recur. Predictive analytical tools provide valuable insight
a different place in the data analysis process. These are also into what may happen in the future and its techniques
the primary data analytics applications in business. include a variety of statistical and machine learning
techniques, such as: neural networks, decision trees, and
1. Descriptive analytics helps answer questions about what regression.
happened. These techniques summarize large datasets to
describe outcomes to stakeholders. By developing key 4. Prescriptive analytics helps answer questions about what
performance indicators (KPIs,) these strategies can help should be done. By using insights from predictive analytics,
track successes or failures. Metrics such as return on data-driven decisions can be made. This allows businesses
investment (ROI) are used in many industries. Specialized to make informed decisions in the face of uncertainty.
metrics are developed to track performance in specific Prescriptive analytics techniques rely on machine learning
industries. This process requires the collection of relevant strategies that can find patterns in large datasets. By
data, processing of the data, data analysis and data analyzing past decisions and events, the likelihood of
visualization. This process provides essential insight into different outcomes can be estimated.
past performance.
2. Diagnostic analytics helps answer questions about why
things happened. These techniques supplement more basic 6.1.3 Data Analytics Techniques
120 121
There are several different analytical methods and have a broad range of software tools to help acquire data,
techniques data analysts can use to process data and extract store information, process data, and report findings.
information. Some of the most popular methods are listed
below. Data analytics has always had loose ties to spreadsheets and
Microsoft Excel. Now, data analysts also often interact with
Regression analysis entails analyzing the raw programming languages to transform and manipulate
relationship between dependent variables to databases. Open-source languages such as Python are often
determine how a change in one may affect the change utilized. More specific tools for data analytics like R can be
in another. used for statistical analysis or graphical modeling.
Factor analysis entails taking a large data set and
shrinking it to a smaller data set. The Beninl of this Data analysts also have help when reporting or
maneuver is to attempt to discover hidden trends that communicating findings. Both Tableau and Power BI are
would otherwise have been more difficult to see. data visualization and analysis tools to compile information,
Cohort analysis is the process of breaking a data set perform data analytics, and distribute results via dashboards
into groups of similar data, often broken into a and reports(Jake, 2023).
customer demographic. This allows data analysts
and other users of data analytics to further dive into 6.2 Data Mining
the numbers relating to a specific subset of data.
Monte Carlo simulations model the probability of The process of extracting information to identify patterns,
different outcomes happening. Often used for risk trends, and useful data that would allow the business to take
mitigation and loss prevention, these simulations the data-driven decision from huge sets of data is called Data
incorporate multiple values and variables and often Mining. In other words, we can say that Data Mining is the
have greater forecasting capabilities than other data process of investigating hidden patterns of information to
analytics approaches. various perspectives for categorization into useful data,
Time series analysis tracks data over time and which is collected and assembled in particular areas such as
solidifies the relationship between the value of a data data warehouses, efficient analysis, data mining algorithm,
point and the occurrence of the data point. This data helping decision making and other data requirement to
analysis technique is usually used to spot cyclical eventually cost-cutting and generating revenue.
trends or to project financial forecasts.
Data mining is the act of automatically searching for large
6.1.4 Data Analytics Tools stores of information to find trends and patterns that go
In addition to a broad range of mathematical and statistical beyond simple analysis procedures. Data mining utilizes
approaches to crunching numbers, data analytics has rapidly complex mathematical algorithms for data segments and
evolved in technological capabilities. Today, data analysts evaluates the probability of future events. Data Mining is
also called Knowledge Discovery of Data (KDD). Data
122 123
Mining is a process used by organizations to extract specific an IT structure. For example, a group of databases, where an
data from huge databases to solve business problems. It organization has kept various kinds of information.
primarily turns raw data into useful information.
6.2.4 Object-Relational Database:
6.2.1 Types of Data Mining
A combination of an object-oriented database model and
Data mining can be performed on the following types of relational database model is called an object-relational
data: model. It supports Classes, Objects, Inheritance, etc.
6.2.1 Relational Database One of the primary objectives of the Object-relational data
model is to close the gap between the Relational database
A relational database is a collection of multiple data sets and the object-oriented model practices frequently utilized
formally organized by tables, records, and columns from in many programming languages, for example, C++, Java,
which data can be accessed in various ways without having C#, and so on.
to recognize the database tables. Tables convey and share
information, which facilitates data searchability, reporting, 6.2.5 Transactional Database:
and organization.
A transactional database refers to a database management
6.2.2 Data warehouses system (DBMS) that has the potential to undo a database
transaction if it is not performed appropriately. Even though
A Data Warehouse is the technology that collects the data this was a unique capability a very long while back, today,
from various sources within the organization to provide most of the relational database systems support transactional
meaningful business insights. The huge amount of data database activities.
comes from multiple places such as Marketing and Finance.
The extracted data is utilized for analytical purposes and 6.2.6 Advantages of Data Mining
helps in decision- making for a business organization. The
The Data Mining technique enables organizations
data warehouse is designed for the analysis of data rather
than transaction processing. to obtain knowledge-based data.
Data mining enables organizations to make
6.2.3 Data Repositories: lucrative modifications in operation and
production.
The Data Repository generally refers to a destination for
data storage. However, many IT professionals utilize the Compared with other statistical data applications,
term more clearly to refer to a specific kind of setup within data mining is a cost-efficient.
124 125
Data Mining helps the decision-making process 6.2.8 Data Mining Applications
of an organization. Data Mining is primarily used by organizations with intense
It Facilitates the automated discovery of hidden consumer demands- Retail, Communication, Financial,
patterns as well as the prediction of trends and marketing company, determine price, consumer preferences,
behaviors. product positioning, and impact on sales, customer
satisfaction, and corporate profits. Data mining enables a
It can be induced in the new system as well as the retailer to use point-of-sale records of customer purchases to
existing platforms. develop products and promotions that help the organization
It is a quick process that makes it easy for new to attract the customer.
users to analyze enormous amounts of data in a
short time.
126 127
Data mining in healthcare has excellent potential to improve predict the results of the student. With the results, the
the health system. It uses data and analytics for better institution can concentrate on what to teach and how to
insights and to identify best practices that will enhance teach.
health care services and reduce costs. Analysts use data
mining approaches such as Machine learning, Multi- Data Mining in Manufacturing Engineering:
dimensional database, Data visualization, Soft computing,
and statistics. Data Mining can be used to forecast patients Knowledge is the best asset possessed by a manufacturing
in each category. The procedures ensure that the patients get company. Data mining tools can be beneficial to find
intensive care at the right place and at the right time. Data patterns in a complex manufacturing process. Data mining
mining also enables healthcare insurers to recognize fraud can be used in system-level designing to obtain the
and abuse. relationships between product architecture, product
portfolio, and data needs of the customers. It can also be
used to forecast the product development period, cost, and
expectations among the other tasks.
Data Mining in Market Basket Analysis:
Data Mining in CRM (Customer Relationship
Market basket analysis is a modeling method based on a Management):
hypothesis. If you buy a specific group of products, then you
are more likely to buy another group of products. This Customer Relationship Management (CRM) is all about
technique may enable the retailer to understand the purchase obtaining and holding Customers, also enhancing customer
behavior of a buyer. This data may assist the retailer in loyalty and implementing customer-oriented strategies. To
understanding the requirements of the buyer and altering the get a decent relationship with the customer, a business
store's layout accordingly. Using a different analytical organization needs to collect data and analyze the data. With
comparison of results between various stores, between data mining technologies, the collected data can be used for
customers in different demographic groups can be done. analytics.
Education data mining is a newly emerging field, concerned Billions of dollars are lost to the action of frauds. Traditional
with developing techniques that explore knowledge from the methods of fraud detection are a little bit time consuming
data generated from educational Environments. EDM and sophisticated. Data mining provides meaningful
objectives are recognized as affirming student's future patterns and turning data into information. An ideal fraud
learning behavior, studying the impact of educational detection system should protect the data of all the users.
support, and promoting learning science. An organization Supervised methods consist of a collection of ple records,
can use data mining to make precise decisions and also to and these records are classified as fraudulent or non-
128 129
fraudulent. A model is constructed using this data, and the 6.2.9 Challenges of Implementation in Data mining
technique is made to identify whether the document is
fraudulent or not. Although data mining is very powerful, it faces many
challenges during its execution. Various challenges could be
Data Mining in Lie Detection: related to performance, data, methods, and techniques, etc.
The process of data mining becomes effective when the
Apprehending a criminal is not a big deal, but bringing out challenges or problems are correctly recognized and
the truth from him is a very challenging task. Law adequately resolved.
enforcement may use data mining techniques to investigate
offenses, monitor suspected terrorist communications, etc.
This technique includes text mining also, and it seeks
meaningful patterns in data, which is usually unstructured
text. The information collected from the previous
investigations is compared, and a model for lie detection is
constructed.
The data mining system's performance relies primarily on Big data can be categorized as unstructured or structured.
the efficiency of algorithms and techniques used. If the Structured data consists of information already managed by
132 133
the organization in databases and spreadsheets; it is 6.3.2 Advantages and Disadvantages of Big Data
frequently numeric in nature. Unstructured data is The increase in the amount of data available presents both
information that is unorganized and does not fall into a opportunities and problems. In general, having more data
predetermined model or format. It includes data gathered on customers (and potential customers) should allow
from social media sources, which help institutions gather companies to better tailor products and marketing efforts in
information on customer needs. order to create the highest level of satisfaction and repeat
business. Companies that collect a large amount of data are
Big data can be collected from publicly shared comments provided with the opportunity to conduct deeper and richer
on social networks and websites, voluntarily gathered from analysis for the benefit of all stakeholders.
personal electronics and apps, through questionnaires,
product purchases, and electronic check-ins. The presence With the amount of personal data available on individuals
of sensors and other inputs in smart devices allows for data today, it is crucial that companies take steps to protect this
to be gathered across a broad spectrum of situations and data; a topic which has become a hot debate in today's
circumstances. Big data is most often stored in computer
online world, particularly with the many data breaches
databases and is analyzed using software specifically
designed to handle large, complex data sets. companies have experienced in the last few years. While
Many software-as-a-service (SaaS) companies specialize in better analysis is a positive, big data can also create
managing this type of complex data. overload and noise, reducing its usefulness. Companies
must handle larger volumes of data and determine which
6.3.1 The Uses of Big Data data represents signals compared to noise. Deciding what
Data analysts look at the relationship between different makes the data relevant becomes a key factor.
types of data, such as demographic data and purchase
history, to determine whether a correlation exists. Such Furthermore, the nature and format of the data can require
assessments may be done in-house or externally by a third- special handling before it is acted upon. Structured data,
party that focuses on processing big data into digestible consisting of numeric values, can be easily stored and
formats. Businesses often use the assessment of big data by sorted. Unstructured data, such as emails, videos, and text
such experts to turn it into actionable information. documents, may require more sophisticated techniques to
be applied before it becomes useful.
Nearly every department in a company can utilize findings
from data analysis, from human resources and 6.4 Decision Support System (DSS)
technology to marketing and sales. The Beninl of big data A decision support system (DSS) is a computerized
is to increase the speed at which products get to market, to program used to support determinations, judgments, and
reduce the amount of time and resources required to gain courses of action in an organization or a business. A DSS
market adoption, target audiences, and to ensure customers sifts through and analyzes massive amounts of data,
remain satisfied.
134 135
compiling comprehensive information that can be used to
solve problems and in decision-making. Typical Characteristics of a DSS
information used by a DSS includes target or projected
revenue, sales figures or past ones from different time Support for decision-makers in semi-structured and
periods, and other inventory- or operations-related data. unstructured problems.
Support for managers at various managerial levels,
A decision support system gathers and analyzes data, ranging from top executive to line managers.
synthesizing it to produce comprehensive information Support for individuals and groups. Less structured
reports. In this way, as an informational application, a DSS problems often requires the involvement of several
differs from an ordinary operations application, whose individuals from different departments and
function is just to collect data. organization level.
Support for interdependent or sequential decisions.
The DSS can either be completely computerized or powered Support for intelligence, design, choice, and
by humans. In some cases, it may combine both. The ideal implementation.
systems analyze information and actually make decisions Support for variety of decision processes and styles.
for the user. At the very least, they allow human users to DSSs are adaptive over time.
make more informed decisions at a quicker pace (Troy,
2022). Benefits of DSS
136 137
Database Management System (DBMS) − To solve a Solver Oriented DSS − It is based on a solver, which
problem the necessary data may come from internal is an algorithm or procedure written for performing
or external database. In an organization, internal data certain calculations and particular program type.
are generated by a system such as TPS and MIS. Rules Oriented DSS − It follows certain procedures
External data come from a variety of sources such as adopted as rules.
newspapers, online data services, databases Rules Oriented DSS − Procedures are adopted in rules
(financial, marketing, human resources). oriented DSS. Export system is the example.
Model Management System − It stores and accesses Compound DSS − It is built by using two or more of
models that managers use to make decisions. Such the five structures explained above.
models are used for designing manufacturing facility,
analyzing the financial health of an organization, 6.4.1 Types of DSS
forecasting demand of a product or service, etc.
Following are some typical DSSs
Support Tools − Support tools like online help; pulls
down menus, user interfaces, graphical analysis, error Status Inquiry System − It helps in taking operational,
correction mechanism, facilitates the user interactions management level, or middle level management
with the system. decisions, for example daily schedules of jobs to
machines or machines to operators.
Data Analysis System − It needs comparative
Classification of DSS analysis and makes use of formula or an algorithm,
for example cash flow analysis, inventory analysis
There are several ways to classify DSS. Hoi Apple and etc.
Whinstone classifies DSS as follows Information Analysis System − In this system data is
Text Oriented DSS − It contains textually represented analyzed and the information report is generated. For
information that could have a bearing on decision. It example, sales analysis, accounts receivable systems,
allows documents to be electronically created, revised market analysis etc.
and viewed as needed. Accounting System − It keeps track of accounting and
Database Oriented DSS − Database plays a major role finance related information, for example, final
here; it contains organized and highly structured data. account, accounts receivables, accounts payables, etc.
Spreadsheet Oriented DSS − It contains information that keep track of the major aspects of the business.
in spread sheets that allows create, view, modify Model Based System − Simulation models or
procedural knowledge and also instructs the system to optimization models used for decision-making are
execute self-contained instructions. The most popular used infrequently and creates general guidelines for
tool is Excel and Lotus 1-2-3. operation or management (MIS Decision Support
System, 2022).
138 139
2. Presentation applications – They involve delivery of
6.5 Multimedia Database multimedia data subject to temporal constraint. Optimal
Multimedia database is the collection of interrelated viewing or listening requires DBMS to deliver data at
multimedia data that includes text, graphics (sketches, certain rate offering the quality of service above a certain
drawings), images, animations, video, audio etc and have threshold. Here data is processed as it is delivered.
vast amounts of multisource multimedia data. The Example: Annotating of video and audio data, real-time
framework that manages different types of multimedia data editing analysis.
which can be stored, delivered and utilized in different ways 3. Collaborative work using multimedia information – It
is known as multimedia database management system. involves executing a complex task by merging drawings,
There are three classes of the multimedia database which changing notifications. Example: Intelligent healthcare
includes static media, dynamic media and dimensional network.
media.
6.5.3 Challenges to multimedia databases
1. Modelling – Working in this area can improve database
6.5.1 Content of Multimedia Database management system
versus information retrieval techniques thus, documents
1. Media data – The actual data representing an object. constitute a specialized area and deserve special
2. Media format data – Information such as pling rate, consideration.
resolution, encoding scheme etc. about the format of the 2. Design – The conceptual, logical and physical design of
media data after it goes through the acquisition, multimedia databases has not yet been addressed fully as
processing and encoding phase. performance and tuning issues at each level are far more
3. Media keyword data – Keywords description relating to complex as they consist of a variety of formats like
the generation of data. It is also known as content JPEG, GIF, PNG, MPEG which is not easy to convert
descriptive data. Example: date, time and place of from one form to another.
recording. 3. Storage – Storage of multimedia database on any
4. Media feature data – Content dependent data such as the standard disk presents the problem of representation,
distribution of colors, kinds of texture and different compression, mapping to device hierarchies, archiving
shapes present in data. and buffering during input-output operation. In DBMS,
a ”BLOB”(Binary Large Object) facility allows untyped
6.5.2 Types of multimedia applications bitmaps to be stored and retrieved.
1. Repository applications – A Large amount of 4. Performance – For an application involving video
multimedia data as well as meta-data(Media format date, playback or audio-video synchronization, physical
Media keyword data, Media feature data) that is stored limitations dominate. The use of parallel processing may
for retrieval purpose, e.g., Repository of satellite images, alleviate some problems but such techniques are not yet
engineering drawings, radiology scanned pictures.
140 141
fully developed. Apart from this multimedia database which are nowadays very popular sources of learning.
consume a lot of processing time as well as bandwidth. Example: Digital libraries.
5. Queries and retrieval –For multimedia data like images, Marketing, advertising, retailing, entertainment and
video, audio accessing data through query opens up travel. Example: a virtual tour of cities.
many issues like efficient query formulation, query Real-time control and monitoring: Coupled with active
execution and optimization which need to be worked database technology, multimedia presentation of
upon. information can be very effective means for monitoring
and controlling complex tasks Example: Manufacturing
operation control.
6.6 Mobile Database
Mobile Database is a database that is transportable, portable,
and physically separate or detached from the corporate
database server but has the capability to communicate with
those servers from remote sites allowing the sharing of
various kinds of data.
The additional functionality required for mobile DBMSs MIS - Decision Support System(2022)
includes the capability to: https://www.tutorialspoint.com/management_information
system/ decision_support_system.htm#
communicate with the centralized or primary
database server through modes Ramez E. Shamkant B. Navathe (2020) Fundamentals of
repeat those data on the centralized database server Database Systems Pearson, India
and mobile device
coordinate data on the centralized database server and TROY SEGAL( 2022) Decision Support System (DSS):
mobile device What It Is and How Businesses Use Them
capture data from a range of sources such as the
Internet Yu, C. Teri B. (2011). Multimedia database applications:
deal with those data on the mobile device issues and concerns for classroom
analyze those data on a mobile device 3 (1): arXiv:1102.5769. Bibcode:2011arXiv1102.5769Y
create customized and personalized mobile
applications
144 145
146