0% found this document useful (0 votes)
8 views

Advanced Database Models , Systems and Applications

The document discusses various advanced database models, including active databases, temporal databases, spatial databases, multimedia databases, and deductive databases, highlighting their features, types, and applications. Active databases utilize triggers for automated responses to database changes, while temporal databases manage time-sensitive data. Additionally, spatial databases handle geometric data, multimedia databases manage diverse media types, and deductive databases enable logical deductions based on stored facts and rules.

Uploaded by

shikha sharma
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Advanced Database Models , Systems and Applications

The document discusses various advanced database models, including active databases, temporal databases, spatial databases, multimedia databases, and deductive databases, highlighting their features, types, and applications. Active databases utilize triggers for automated responses to database changes, while temporal databases manage time-sensitive data. Additionally, spatial databases handle geometric data, multimedia databases manage diverse media types, and deductive databases enable logical deductions based on stored facts and rules.

Uploaded by

shikha sharma
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 23

Advanced Database Models ,

Systems and Applications


ACTIVE DATABASES
• Active Database is a database consisting of set of triggers.
• These databases are very difficult to be maintained because of the complexity
that arises in understanding the effect of these triggers.
• In such database, DBMS initially verifies whether the particular trigger specified
in the statement that modifies the database) is activated or not, prior to
executing the statement.
• If the trigger is active then DBMS executes the condition part and then executes
the action part only if the specified condition is evaluated to true.
• It is possible to activate more than one trigger within a single statement.
• A trigger is a procedure which is automatically invoked by the DBMS in response
to changes to the database, and is specified by the database administrator
(DBA).
• A database with a set of associated triggers is generally called an active
database.
• Trigger is like a ‘Daemon that monitors a data base, and is executed when the
data base is modified in a way that matches the event specification
• In such situation, DBMS processes each of
the trigger randomly.
• The execution of an action part of a trigger
may either activate other triggers or the
same trigger that Initialized this action.
• Such types of trigger that activates itself is
called as ‘recursive trigger’.
• The DBMS executes such chains of trigger in
some pre-defined manner but it effects the
concept of understanding.
PARTS OF TRIGGER
A triggers description contains three parts, which
are as follows −
Event − An event is a change to the database
which activates the trigger. E.g., insert, delete,
update.
Condition − A query that is run when the trigger
is
activated is called as a condition. Optional: If no
condition is specified then condition is always
true
• Action −A procedure which is executed when the trigger is activated and its
condition is true.
FEATURES OF ACTIVE DATABASE:
• It possess all the concepts of a conventional database i.e. data modeling
facilities, query language etc.
• It supports all the functions of a traditional database like data definition, data
manipulation, storage management etc.
• It detects event occurrence.
• It must be able to evaluate conditions and to execute actions.
• It means that it has to implement rule execution.
TYPES OF TRIGGERS
The different types of triggers are explained below −
Statement level trigger − It is fired only once for DML statement irrespective of
number of rows affected by statement. Statement-level triggers are the default type
of trigger.
Before-triggers − At the time of defining a trigger we can specify whether the
trigger is to be fired before command like INSERT, DELETE, or UPDATE is executed or
after the command is executed.
• Before triggers are automatically used to check the validity of data before the
action is performed. For instance, we can use before trigger to prevent deletion
of rows if deletion should not be allowed in a given case.
• After-triggers − It is used after the triggering action is completed. For example, if
the trigger is associated with the INSERT command then it is fired after the row
is inserted into the table.
• Row-level triggers − It is fired for each row that is affected by DML command.
For example, if an UPDATE command updates 150 rows then a row- level trigger
is fired 150 times whereas a statement- level trigger is fired only for once.
CREATE DATABASE TRIGGER
To create a database trigger, we use the CREATE TRIGGER command. The details to
be given at the time of creating a trigger are as follows −
• Name of the trigger.
• Table to be associated with.
• When trigger is to be fired: before or after.
• Command that invokes the trigger- UPDATE, DELETE, or INSERT.
• Whether row-level triggers or not.
• Condition to filter rows.
• PL/SQL block is to be executed when trigger is fired.
The syntax to create database trigger is as follows −
CREATE [OR REPLACE] TRIGGER triggername
{BEFORE|AFTER}
{DELETE|INSERT|UPDATE[OF COLUMNS]} ON table
[FOR EACH ROW {WHEN condition]]
[REFERENCE [OLD AS old] [NEW AS new]]
BEGIN PL/SQL BLOCK
END.
Trigger Example

When a new employees is added to a department, modify the Total_sal of the


Department to include the new employees salary.
Logically this means that we will CONDITION CREATE a TRIGGER,
let us call the trigger Total_sal1
• This trigger will execute AFTER INSERT ON Employee table
It will do the following FOR EACH ROW
• WHEN NEW.Dno is NOT NULL
• The trigger will UPDATE DEPARTMENT
• By SETting the new Total_sal to be the sum of
• old Total_sal and NEW. Salary
• WHERE the Dno matches the NEW.Dno;
TEMPORAL DATABASE
• A temporal database is a database that has certain features that support time-
sensitive status for entries.
• Where some databases are considered current databases and only support
factual data considered valid at the time of use, a temporal database can establish
at what times certain entries are accurate.
• Databases that store information about states of the real world across time are
known as temporal databases.
• A temporal database stores data relating to time instances. It offers temporal data
types and stores information relating to past, present and future time. Temporal
databases could be uni-temporal, bi-temporal or tri-temporal.
• More specifically the temporal aspects usually include valid time, transaction time
or decision time.
• Valid time is the time period during which a fact is true in the real world.
• Transaction time is the time at which a fact was recorded in the database.
• Decision time is the time at which the decision was made about the fact.
APPLICATION DOMAINS OF TEMPORAL DATA
• Financial Applications – history of stock markets, share prices.
• Reservation Systems – e.g. when was a flight booked.
• Medical Systems – e.g. patient records.
• Computer Applications – e.g. history of file back ups.
• Archive Management Systems – e.g. sporting events, publications and journals.
• Personnel Management – e.g. salary and position history need to be maintained
• Insurance – e.g. insurance record need to be maintained
• Banking – e.g. Credit history need to be maintained
There are following three types of time available in temporal database:
• Valid Time
• Transaction Time
• Bitemporal Time
Valid Time
The valid time of a fact is the time when the fact is true in the modelled reality. A
fact may have associated any number of instants and time intervals, with single
instants and intervals being important special cases. Valid times are usually supplied
by the user.
• An example would be that Fred Bloggs was employed as marketing director at
Matrix Incorporated from 1/3/1999 to 5/6/1999 ” i.e. the valid time interval for
a tuple recording that Fred Bloggs was marketing director is from 1/3/1999 to
5/6/1999.
• A temporal database using this interpretation is called a valid time database.
Transaction time
A database fact is stored in a database at some point in time. A transaction time of
a data fact is the time at which the information about a modeled object or event is
stored in the database. The transaction time is automatically recorded by the DBMS
and cannot be changed. If a fact is updated to a database at 10:15 on 4/2/1999,
this transaction time never changes. If the data is changed at a later time, then a
second transaction time is generated for the change, and so on. In this way a
history of database changes based on transaction time timestamps is built up.
A temporal database using this interpretation is called a transaction time database.
Emp_no Name Salary Transaction start Transaction End Time
Time
1 Indra 50000 2072-03-20 10:02:03 2072-03-20 10:02:03

2 Indra 90000 2073-04-01 11:13:30 2073-04-01 11:13:30


Bitemporal Data
A bitemporal model contains both valid and transaction time. This provides
both historical and rollback information. Historical information (e.g.: "Where did
John live in 1992?") is provided by the valid time. Rollback (e.g.: "In 1992, where did
the database believe John lived?") is provided by the transaction time.

Spatial Database
• A spatial database is a database that is enhanced to store and access spatial
data or data that defines a geometric space. These data are often associated
with geographic locations and features, or constructed features like cities. Data
on spatial databases are stored as coordinates, points, lines, polygons and
topology. Some spatial databases handle more complex data like three
dimensional objects, topological coverage and linear networks.
• Common database systems use indexes for a faster and more efficient search
and access of data. This index, however, is not fit for spatial queries. Instead,
spatial databases use something like a unique index called a spatial index to
speed up database performance. Spatial indexing is very much required because
a system should be able to retrieve data from a large collection of objects
without really searching the whole bunch. It should also support relationships
between connecting objects from different classes in a better manner than just
filtering.
• Aside from the indexes, spatial databases also offer spatial data types in their
data model and query language. These databases require special kinds of data
types to provide a fundamental abstraction and model the structure of the
geometric objects with their corresponding relationships and operations in the
spatial environment. Without these kind of data types, the system would not be
able to support the kind of modeling a spatial database offers.
• Non-spatial data (also called attribute or characteristic data) is that information
which is independent of all geometric considerations.
– For example, a person’s height, mass, and age are non-spatial data because
they are independent of the person’s location.
– It’s interesting to note that, while mass is non-spatial data, weight is spatial
data in the sense that something’s weight is very much dependent on its
location!
Example Of Spatial Data
A road map is a visualization of geographic information. A road map is a 2-
dimensional object which contains points, lines, and polygons that can
represent cities, roads, and political boundaries such as states or provinces.
In general, spatial data can be of two types
• Vector data: This data is represented as discrete points, lines and polygons
• Rastor data: This data is represented as a matrix of square cells.

• The spatial data in the form of points, lines, polygons etc. is used by many
different databases as shown above.
Multimedia Database
• Multimedia database is the collection of interrelated multimedia data that
includes text, graphics (sketches, drawings), images, animations, video, audio etc
and have vast amounts of multisource multimedia data.
• The framework that manages different types of multimedia data which can be
stored, delivered and utilized in different ways is known as multimedia database
management system.
• There are three classes of the multimedia database which includes static media,
dynamic media and dimensional media.
Content of Multimedia Database management system :
• Media data: It is the actual data which represents an object.
• Media format data: The information such as resolution, sampling rate, encoding
system, etc. about the format of the media data under consideration after is
undergoes acquisition, processing, and encoding is the media format data.
• Media keyword data: Media keyword data are the keyword description related
to the generation of data. This data is also known as content descriptive data.
Examples of content descriptive data are place, time, date of recording.
• Media feature data: Media feature data contains data which is content
dependent such as kind of texture, distribution of, and the different shapes
present in the data.
This still leads to a number of challenges to multimedia databases. These are:
• Modeling: Work in this area can improve the database versus information
retrieval techniques.
• Design: The physical, conceptual, and logical design of multimedia databases is
not addressed entirely leading to performance and tuning issues.
• Storage: The storage of databases on a standard disc can lead to problems like
representation, mapping to disc hierarchies, compression, etc.
• Performance: Audio-video synchronization and audio playback applications are
where physical limitations dominate. Parallel processing can reduce these
problems, but these techniques have not been completely developed yet.
Multimedia databases also consume a lot of processing power and bandwidth.
• Queries and Retrieval: Multimedia such as images, audio, video lead to
retrieval and queries issues such as efficient query formation, query execution,
etc.
Multimedia Database Applications:
• Documents and record management: Industries which keep a lot of
documentation and records. Ex: Insurance claim industry.
• Knowledge dissemination: Multimedia database is an extremely efficient tool
for knowledge dissemination and providing several resources. Ex: electronic
books
• Education and training: Multimedia sources can be used to create resources
useful in education and training. These are popular sources of learning in recent
days. Ex: Digital libraries.
• Real-time monitoring and control: Multimedia presentation when coupled
with active database technology can be an effective means for controlling and
monitoring complex tasks. Ex: Manufacture control
• Marketing
• Advertisement
• Retailing
• Entertainment
• Travel
DEDUCTIVE DATABASE
• A deductive database is a database system that can make deductions (i.e.
conclude additional facts) based on rules and facts stored in the (deductive)
database. Datalog is the language typically used to specify facts, rules and
queries in deductive databases.
• Deductive databases have grown out of the desire to combine logic
programming with relational databases to construct systems that support
powerful formalism and are still fast and able to deal with very large datasets.
Deductive databases are more expressive than relational databases but less
expressive than logic programming systems.
• In recent years, deductive databases such as Datalog have found new
application in data integration, information extraction, networking, program
analysis, security, and cloud computing.
• Deductive databases reuse many concepts from logic programming; rules and
facts specified in the deductive database language Datalog look very similar to
those in Prolog.
• A Deductive Database is a type of database that can make conclusions or we can
say deductions using a sets of well defined rules and fact that are stored in the
database.
• In today’s world as we deal with a large amount of data, this deductive database
provides a lot of advantages.
• It helps to combine the RDBMS with logic programming. To design a deductive
database a purely declarative programming language called Datalog is used.
• A deductive database uses two main types of specifications: facts and rules.
• Facts are specified in a manner similar to the way relations are specified, except
that it is not necessary to include the attribute names.
• Recall that a tuple in a relation describes some real-world fact whose meaning is
partly determined by the attribute names.
• In a deductive database, the meaning of an attribute value in a tuple is
determined solely by its position within the tuple.
• Rules are somewhat similar to relational views. They specify virtual relations
that are not actually stored but that can be formed from the facts by applying
inference mechanisms based on the rule specifications.
• The main difference between rules and views is that rules may involve recursion
and hence may yield virtual relations that cannot be defined in terms of basic
relational views.
Introduction To Information Retrieval and Web Search
• Information retrieval is the process of retrieving documents from a collection
in response to a query (or a search request) by a user.
• Information Retrieval is the activity of obtaining material that can usually be
documented on an unstructured nature i.e. usually text which satisfies an
information need from within large collections which is stored on computers.
For example, Information Retrieval can be when a user enters a query into the
system.
• The IR system assists the users in finding the information they require but it
does not explicitly return the answers to the question. It notifies regarding the
existence and location of documents that might consist of the required
information. Information retrieval also extends support to users in browsing or
filtering document collection or processing a set of retrieved documents.
• The system searches over billions of documents stored on millions of computers.
A spam filter, manual or automatic means are provided by Email program for
classifying the mails so that it can be placed directly into particular folders.
• An IR system has the ability to represent, store, organize, and access information
items. A set of keywords are required to search. Keywords are what people are
searching for in search engines. These keywords summarize the description of
the information.
Components of Information Retrieval/ IR Model

Acquisition: In this step, the selection of documents and other objects from various
web resources that consist of text-based documents takes place. The required data
is collected by web crawlers and stored in the database.
• Representation: It consists of indexing that contains free-text terms, controlled
vocabulary, manual & automatic techniques as well. example: Abstracting
contains summarizing and Bibliographic description that contains author, title,
sources, data, and metadata.
• File Organization: There are two types of file organization methods.
i.e. Sequential: It contains documents by document data. Inverted: It contains
term by term, list of records under each term. Combination of both.
• Query: An IR process starts when a user enters a query into the system. Queries
are formal statements of information needs, for example, search strings in web
search engines. In information retrieval, a query does not uniquely identify a
single object in the collection. Instead, several objects may match the query,
perhaps with different degrees of relevancy.
Difference Between Information Retrieval and Data Retrieval
Information Retrieval Data Retrieval

The software program that deals with the Data retrieval deals with obtaining data from a
organization, storage, retrieval, and evaluation database management system such as ODBMS.
of information from document repositories It is A process of identifying and retrieving the
data from the database, based on the query
particularly textual information. provided by user or application.

Retrieves information about a subject. Determines the keywords in the user query
and retrieves the data.

Small errors are likely to go unnoticed. A single error object means total failure.

Not always well structured and is semantically


ambiguous. Has a well-defined structure and semantics.

Does not provide a solution to the user of the Provides solutions to the user of the database
database system. system.

The results obtained are approximate matches. The results obtained are exact matches.

Results are ordered by relevance. Results are unordered by relevance.

You might also like