You are on page 1of 15

Enhanced Data Models for Advanced Applications

Enhanced Data Models for Advanced Applications


As the use of database systems has grown, users have demanded additional functionality from these software packages, with the purpose of making it easier to implement more advanced and complex user applications. Object-oriented databases and object relational systems do provide features that allow users to extend their systems by specifying additional abstract data types for each application. However, it is quite useful to identify certain common features for some of these advanced applications and to create models that can represent them. Additionally, specialized storage structures and indexing methods can be implemented to improve the performance of these common features. Then the features can be implemented as abstract data types or class libraries and purchased separately from the basic DBMS software package. The term data blade has been used in Informix and cartridge in Oracle to refer to such optional sub modules that can be included in a DBMS package. Users can utilize these features directly if they are suitable for their applications, without having to reinvent, reimplement, and reprogram such common features.

Abstract
This document includes database concepts for some of the common features that are needed by advanced applications and are being used widely. This will cover active rules that are used in active database applications, temporal concepts that are used in temporal database applications, and, briefly, some of the issues involving spatial databases and multimedia databases. We will also discuss deductive databases. It is important to note that each of these topics is very broad, and we give only a brief introduction to each.

Active Database Concepts and Triggers


An active database system is a database management system endowed with active rules, i.e. stored procedures activated by the system when specific events occur. Typically an active rule consists of three parts: event, condition, and action. Normally written as: WHEN event IF condition THEN action.

Msc(IT)-I

M.L Dahanukar College

Enhanced Data Models for Advanced Applications "event" specifies a list of events, "Condition" is a query on the database, "action" generally consists of one or more updates or queries on the database. Automated bill payments are an example of an active database. A bank customer may instruct his institution to pay a payee a specific amount on a certain date each month. When the specified date is reached, the electronic payments are automatically sent to the payees indicated by the information in the database.

Generalized Model for Active Databases and Oracle Triggers


The model that has been used to specify active database rules is referred to as the EventCondition-Action (ECA) model. A rule in the ECA model has three components: 1. The event(s) that triggers the rule: These events are usually database update operations that are explicitly applied to the database. However, in the general model, they could also be temporal events2 or other kinds of external events. 2. The condition that determines whether the rule action should be executed: Once the triggering event has occurred, an optional condition may be evaluated. If no condition is specified, the action will be executed once the event occurs. If a condition is specified, it is first evaluated, and only if it evaluates to true will the rule action be executed. 3. The action to be taken: The action is usually a sequence of SQL statements, but it could also be a database transaction or an external program that will be automatically executed.

Msc(IT)-I

M.L Dahanukar College

Enhanced Data Models for Advanced Applications Syntax of Trigger <trigger>::=CREATE TRIGGER <trigger name> (AFTER | BEFORE ) <triggering events> ON <table name> [FOR EACH ROW] [WHEN <condition> ] <trigger actions>; <triggering event > ::=<trigger event> {OR <trigger name> } <trigger event> ::= INSERT | DELETE UPDATE [OF <column name> {,<column name>}] <trigger action> ::= <PL/SQL block>

Design and Implementation Issues for Active Databases


This Topic contains additional issues concerning how rules are designed and implemented. The first issue concerns activation, deactivation,and grouping of rules. In addition to creating rules, an active database system should allow users to activate, deactivate, and drop rules by referring to their rule names. A deactivated rule will not be triggered by the triggering event. This feature allows users to selectively deactivate rules for certain periods of time when they are not needed. The activate command will make the rule active again. The drop command deletes the rule from the system. Another option is to group rules into named rule sets, so the whole set of rules can be activated, deactivated, or dropped. The second issue concerns whether the triggered action should be executed before,after, instead of, or concurrently with the triggering event. A before trigger executes the trigger before executing the event that caused the trigger. It can be used in applications such as checking for constraint violations. An after trigger executes the trigger after executing the event, and it can be used in applications such as maintaining derived data and monitoring for specific events and conditions.
Msc(IT)-I M.L Dahanukar College

Enhanced Data Models for Advanced Applications An instead of trigger executes the trigger instead of executing the event, and it can be used in applications such as executing corresponding updates on base relations in response to an event that is an update of a view.

Temporal Database Concepts

A temporal database is a database with built-in support for handling data involving time, for example a temporal data model and a temporal version of Structured Query Language (SQL). More specifically the temporal aspects usually include valid time and transaction time. Temporal database stores data relating to time instances. It offers temporal data types and stores information relating to past, present and future time, for example, the history of the stock market or the movement of employees within an organization. Thus, a temporal database stores a collection of time related data.

Msc(IT)-I

M.L Dahanukar College

Enhanced Data Models for Advanced Applications

Need of Temporal databases


A temporal database is like a standard database, with one large exception: it understands and logs the passing of time. Databases, in their early format, were only made to store strings of text and numbers, and they did not recognize the passage of time. This created several problems, the most obvious one being that time-based events could not be tracked from beginning to end, but only by the events present state. To alleviate these problems, the database community was called on to make a temporal variable that could be integrated into the database format. The temporal database was created in 1993 and implemented in 1994. With this change, databases were able to track when an event began and when it ended, which helped many businesses, government offices and schools, among others.

Msc(IT)-I

M.L Dahanukar College

Enhanced Data Models for Advanced Applications

Features of Temporal Database


Features for managing and accessing temporal data which temporal databases may provide include: A time period data type, including the ability to represent time periods with no end (infinity or forever) The ability to define valid and transaction time period attributes and bitemporal relations System-maintained transaction time Temporal primary keys, including non-overlapping period constraints Temporal constraints, including non-overlapping uniqueness and referential integrity Update and deletion of temporal records with automatic splitting and coalescing of time periods Temporal queries at current time, time points in the past or future, or over durations.

Forms of Temporal Database

Msc(IT)-I

M.L Dahanukar College

Enhanced Data Models for Advanced Applications

Valid Time The valid time of a database object is the time when the object is effective or holds (is true) in reality. The time when the event occurred, took place in reality. For example, in a banking system, the payments and withdrawals made by a customer have a valid time associated with the time the customer performs the transaction at the bank. Objects in the temporal database system will have a time component associated to it; this will hold either the valid time or the transaction time. Transaction Time A database object is stored in a database at some point in time. The transaction time of an object is the time when the object is stored in the database, the time that it is present in the database. For example, in a banking system, the transaction time of a withdrawal would be form the time the clerk entered the payment of withdrawal into the database to the time that it was made invalid in the database. Another example would be, in a company situation, an employee receives a pay rise but it comes into effect when the payroll clerk enters this salary rise into the database. Transaction time values cannot be after the current time.

Bitemporal data : combines both Valid and Transaction Time.

Spatial Databases

Msc(IT)-I

M.L Dahanukar College

Enhanced Data Models for Advanced Applications

A database that is optimized for storage and querying of data related to objects in a space, which includes lines, points, and polygons, is called a spatial database. Various fields of study have multiple applications for managing geometric data, geographic data, and spatial data. In these databases, a space can be geographic like a map of the earths surface, geometric like a layout of a very large scale integration (VLSI) design, or spatial like a 3-D representation of protein molecules chains. The spatial database is similar to a standard database with additional abilities for spatial data handling. For example, spatial data types (SDTs) are offered in a spatial databases query language and data models. A spatial database stores objects that have spatial characteristics that describe them and that have spatial relationships among them. The spatial relationships among the objects are important, and they are often needed when querying the database Satellite images are a prominent example of spatial data. Queries posed on these spatial data, where predicates for selection deal with spatial parameters, are called spatial queries.
Geographical Information Systems (GIS)

The systems that manage geographic data and related applications are known as Geographical Information Systems (GIS), and they are used in areas such as environmental applications, transportation systems, emergency response systems, and battle management.

Msc(IT)-I

M.L Dahanukar College

Enhanced Data Models for Advanced Applications

Spatial Data Types & Models


This describes the common data types and models for storing spatial data. Spatial data comes in three basic forms:Map Data- includes various geographic or spatial features of objects in a map, such as an objects shape and the location of the object within the map. The three basic types of features are points, lines, and polygons (or areas). Attribute data -is the descriptive data that GIS systems associate with map

Msc(IT)-I

M.L Dahanukar College

Enhanced Data Models for Advanced Applications Image data-includes data such as satellite images and aerial photographs, which are typically created by cameras. Objects of interest, such as buildings and roads, can be identified and overlaid on these images. Models of spatial information are sometimes grouped into two broad categories: field and object. Field models-are often used to model spatial data that is continuous in nature, such as terrain elevation, temperature data, and soil variation characteristics Object models-have traditionally been used for applications such as transportation networks, land parcels, buildings, and other objects that possess both spatial and nonspatial attributes.

Spatial Data Indexing


Spatial data indexing is based on the physical grouping of items that are indexed. With spatial indexing, it is even possible to provide VR (virtual reality) fly through (or fly over, or fly under) to help users maintain the context of their search as the users expand or narrow the scope of their search. Spatial indexing has a richness that parallels indexing by subject or author. The idea of spatial indexing is very powerful, that for records management, records are found based on their association with a place. Many records are tightly coupled to a place. Like other forms of indexing, geographic indexing can be combined with other indices. There are many Indexing methods used in spatial data indexing technique such as Kd-tree, Z-order, UB-tree, Quad-tree, Oc-tree, Grid, and R-tree. However, we will discuss only two techniques used in this research which are Rtree and Quad-tree.

Msc(IT)-I

M.L Dahanukar College

Enhanced Data Models for Advanced Applications

R-tree and Quad-tree

R-tree and Quad-tree indexes that use extensive framework are the best spatial data indexing methods among any other existing spatial indexing methods for lowdimensional spatial data. For queries processing, R-tree approach may be more efficient due to better maintenance of spatial immediacy, but may be slow in updating or index creating and implementation of own concurrency protocols on top of table-level concurrency mechanisms, since R-tree is built logically as a tree and physically using tables inside the database and search involves recursive SQL for traversing tree from root to relevant leaves. Meanwhile, Quad- tree results in simpler index creation, faster update and inherite configuration in B-tree concurrency control protocols, since those indexes compute tile approximations for geometries and use existing B-tree indexes for performing spatial search and other DML operations .

Msc(IT)-I

M.L Dahanukar College

Enhanced Data Models for Advanced Applications

Multimedia Database Concepts

Multimedia databases provide features that allow users to store and query different types of multimedia information, which includes images (such as photos or drawings), video clips (such as movies, newsreels, or home videos), audio clips (such as songs, phone messages, or speeches), and documents (such as books or articles). The main types of database queries that are needed involve locating multimedia sources that contain certain objects of interest. This types of queries are referred to as content-based retrieval because the multimedia source is being retrieved based on its containing certain objects or activities.

Msc(IT)-I

M.L Dahanukar College

Enhanced Data Models for Advanced Applications There are two main approaches. The first is based on automatic analysis of the multimedia sources to identify certain mathematical characteristics of their contents. This approach uses different techniques depending on the type of multimedia source (image, video, audio, or text). The second approach depends on manual identification of the objects and activities of interest in each multimedia source and on using this information to index the sources. This approach can be applied to all multimedia sources, but it requires a manual preprocessing phase where a person has to scan each multimedia source to identify and catalog the objects and activities it contains so that they can be used to index the sources. The characteristics of each type of multimedia sourceimages, video, audio, and text/documents.

An image is typically stored either in raw form as a set of pixel or cell values, or in compressed form to save space. A video source is typically represented as a sequence of frames, where each frame is a still image. However, rather than identifying the objects and activities in every individual frame, the video is divided into video segments, where each segment comprises a sequence of contiguous frames that includes the same objects/activities. Audio sources include stored recorded messages, such as speeches, class presentations, or even surveillance recordings of phone messages or conversations by law enforcement.

Msc(IT)-I

M.L Dahanukar College

Enhanced Data Models for Advanced Applications A text/document source is basically the full text of some article, book, or magazine. These sources are typically indexed by identifying the keywords that appear in the text and their relative frequencies.

Deductive Databases

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. Deductive databases have grown out of the desire to combine logic programming with relational databases to construct systems that support a 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 a large number of concepts from logic programming; rules and facts specified in the deductive database language. Datalog is the language typically used to specify facts, rules and queries in deductive databases. Datalog is a nonprocedural query and rule language based on Prolog. It deals with Rules Facts Queries. A rule determines the logic behind the data.

Msc(IT)-I

M.L Dahanukar College

Enhanced Data Models for Advanced Applications A fact is a tuple inside a relation.

What are they used in?


a deductive database provides an intelligent database system capable of generating new rules from existing rules and facts. This type of functionality has many, possible, applications specifically: Artificial Intelligence Semantic networks Frames Production systems Rules for capturing domain-specific knowledge

Msc(IT)-I

M.L Dahanukar College

You might also like