advance database management system concepts & architecture by vikas jagtap

50
ADVANCE DATABASE MANAGEMENT SYSTEM CONCEPTS & ARCHITECTURE By vikas jagtap

Upload: vikas-jagtap

Post on 16-Jul-2015

356 views

Category:

Education


2 download

TRANSCRIPT

ADVANCE DATABASE MANAGEMENT SYSTEM CONCEPTS & ARCHITECTURE

By vikas jagtap

2.1 SPATIAL DATA MANAGEMENT: Spatial Data: The data that indicates the earth location (latitude

& longitude, or height & depth ) of these rendered objects is known as spatial data.

When the map is rendered, objects of this spatial data are used to project the location of the objects on 2-Dimentional piece of paper.

Ex: A road map (2D consisting points, lines & polygons).

A GIS often used to store, retrieve, & render this earth related spatial data.

Other types of spatial data include data from Computer Aided Design (CAD) & Computer Aided Manufacturing (CAM) systems.

Spatial Data Bases: The spatial data management systems are

designed to make the storage, retrieval, & manipulation of spatial data (i.e points, lines and polygons) easier and natural to users, such as GIS.

While typical databases can understand various numeric and character types of data, additional functionality needs to be added for databases to process spatial data types.

These are typically called geometry or feature.

Once this data is stored in data base, it can be easily and meaningfully manipulated and retrieved

as it relates all other stored in the data base.Spatial data base keeps objects in multidimensional space.Example: Cartographic data bases and GIS data bases that store maps includes 2D spatial description of their objects.These objects are used in many applications such as environment, logistics management, and war strategies.

Object-based spatial database: These spatial databases stores the location as objects.

The object-based spatial model treats the world as surface littered with recognizable objects (e.g. cities, rivers), which exist independent of their locations.

Objects can be simple as polygons and lines, or be more complex to represent cities.

Using object-based spatial database, it is easier to store more attributes with the objects such as direction, speed, etc.,

using these attributes can make it easier to answer queries like "find all tanks whose speed is 10 km and oriented to north". Or "find all enemies tanks in certain region".

Storing attributes with objects can provide better result presentation. and improved manipulation capabilities in more efficient way.

Spatial Data Model: It is a hierarchial structure consisting of elements,

geometries and layers which corresponds to representations of spatial data.

Layers are composed of geometries and geometries in turn are made up of elements.

Elements: These are basic building blocks of geometric

feature for the spatial data option. Ex: Points (Historic marks), Lines strings

(Roads), and Polygons (Country boundaries)

Geometry: A geometric object is representation of a

users spatial feature, modeled as an ordered set of primitive elements.

Each geometric object is required to be uniquely identified by a geometric identifier (GID), associating with its corresponding attributes represented as polygon. Ex: Land for cultivation.

Complex geometric feature are represented as polygon with holes Ex: Fertile land in village.

Layer: It is the heterogeneous collection of geometries

having the same attribute set. Ex: One layer include topographical features

(land), while other describe density and third describes roads and buildings.

Spatial Query: Spatial query is the process of selecting

features based on their geographic or spatial relationship to other features.

It is a special type of database query supported by geodatabases.

The queries differ from SQL queries in several important ways.

Two of the most important are that they allow the use of geometry data types such as points, lines and polygons and that these queries consider the spatial relationship between these geometries.

In spatial data bases you can perform spatial queries using features from different themes.

The process of overlaying one theme with other in order to determine their relationships is called spatial overlay.

EX: You are in a new city want to locate a hotel then your two themes will be (Airport & Hotel).

Spatial query is part of larger process called Spatial Analysis.

Spatial analysis combines various spatial queries into a series of steps which help you solve problems such as:

Locating areas of economic deprivation. Determining population density and number of

schools. Spatial queries are divided into following types: Range or Proximity Query: It finds the objects of a particular type that are

within a given spatial area or within a particular distance from given location.

Ex: Find all schools within Bombay city area, or find all hospitals within 2kms of the accident area.

Nearest neighbor or Adjacency: It find object of a particular type that is closer

to a given location. Ex: Find school i.e closest to your home, or

finding hospital nearest to the accident site. Spatial Joins or Overlays: Overlays join objects of 2 types based on

some spatial condition. Ex: Finding all hotels that are on the highway

from Chennai to Bangalore.

The spatial queries are answered efficiently using special techniques called Spatial indexing.

One best known technique is R-tree and their variations.

Ex: R-trees group together objects that are in close spatial physical proximity on the same leaf nodes of the tree structure index.

R-trees are associated with rectangles whose area covers all the rectangles in the sub-tree.

Quad-tree is a spatial index which decomposes a data set (Ex: image) into square cells of different sizes until each cell has a homogenous value.

They are often used to store raster data.

Raster is a cellular data structure composed of rows and columns for storing image.

Groups of cells with the same value represent feature.

Types of spatial functions: The function names for queries differ across

geodatabases. The following list contains commonly used functions built into PostGIS, a free geodatabase which is a PostgreSQL extension (the term 'geometry' refers to a point, line, box or other two or three dimensional shape):

Function Prototype: functionName (parameter(s)) : return type

Distance(geometry, geometry) : number Equals(geometry, geometry) : boolean Disjoint(geometry, geometry) : boolean Intersects(geometry, geometry) : boolean Touches(geometry, geometry) : boolean Crosses(geometry, geometry) : boolean Overlaps(geometry, geometry) : boolean Contains(geometry, geometry) : boolean Intersects(geometry, geometry) : boolean Length(geometry) : number Area(geometry) : number Centroid(geometry) : geometry

Examples of Spatial database systems: All OpenGIS Specifications compliant products. Open source spatial databases and APIs, some

of which are OpenGIS compliant. Boeing's Spatial Query Server (Official Site)

spatially enables Sybase. Oracle Spatial . PostgreSQL DBMS (database management

system) uses the spatial extension PostGIS to implement the standardized datatype geometry and corresponding functions.

MySQL DBMS implements the datatype geometry or feature plus some spatial functions that haven't been implemented according to the OpenGIS specifications.

Functions that test spatial relationships are limited to working with master bounding rectangles rather than the actual geometries.

MySQL versions earlier than 5.0.16 only supported spatial data in MyISAM tables.

As of MySQL 5.0.16, InnoDB, NDB, BDB, and ARCHIVE also support spatial features.

Spatial Databox is a low-latency spatial engine that provides nearest neighbor, containment and tile-based spatial queries.

It also provides a real-time response guarantee to queries so as to support interactive map mashups.

2.2 WEB BASED SYSTEMS: Web based systems are systems which store

web applications, that are accessed via web browser over a network such as the Internet or an Intranet.

Web Application: It is a computer software application that is

coded in a browser-supported language (such as HTML, JavaScript, etc.) and reside on a common web browser to make the application executable.

Web applications are popular due to the use of web browsers, and the convenience of using a web browser as a client.

Web Applications are usually broken into logical chunks called "tiers", where every tier is assigned a role.

We have 3-main types of architectures available: 2-tier Architecture. 3-tier Architecture. N-tier Architecture.

OVERVIEW OF CLIENT SERVER ARCHITECTURE:

Client-Server computing or networking is a distributed application architecture that partitions tasks or work loads between service providers called servers and service requesters, called clients.

A server machine is a high-performance host that is running one or more server programs which share its resources with clients.

A client does not share any of its resources, but requests a server's content or service function.

Clients therefore initiate communication sessions with servers which await (listen to) incoming requests.

Client-server describes the relationship between two computer programs in which one program, the client program, makes a service request to another, the server program.

2-TIER ARCHITECTURE: I t is the tradit ional cl ient/server environment

that divides the application into GUI (client), and the Data (server).

GUI can be developed using a product l ike VB or Power Builder and the can be set up using a DBMS.

GUI is often referred to as “Presentation Layer”.

In 2-t ier architecture al l the pieces of applications are either on the client (t ier1) or server (t ier2).

Example of 2-tier architecture: A web browser is a client program at the user computer that may access information at any web server in the world.

To check your bank account from your computer, a web browser client program in your computer forwards your request to a web server program at the bank.

That program may in turn forward the request to its own database client program that sends a request to a database server at the bank computer to retrieve your account balance.

The balance is returned to the bank database client, which in turn serves it back to the web browser client in your personal computer, which displays the information for you.

Advantages: There are only two components the client and

server to deal with. So, in most cases there will be only 2 vendors,

the GUI vendor (Power soft or Micro Soft), and the DBMS vendor (Oracle corp., Micro Soft, or Sybase).

Developers do not have to learn multiple products.

It allows devices to share files and resources. Development time is faster.

Disadvantages: If business rules are written for DBMS and,

then changing the DBMS (say from Oracle to Sybase) requires the rules also to be changed.

Same applies for the rules residing on the client, you cannot change from VB to Power Builder.

Scalability of the application is the main disadvantage of 2-tier architecture.

3-TIER ARCHITECTURE: A 3-tier architecture is when a application is

divided into 3-logic tiers. The presentation (GUI) or User services. Business rules or Business services. Data Server or Data Services. In this type of client-server architecture business

tier undergoes the maximum amount of change or modifications as business grows and change.

The business component are referred as business object.

These components can be called by other components in the same tier or other.

Business Component consists of Properties, methods and events.

Properties: The characteristics of the business object. Ex: In a tax calculation service the properties

might include the name, permanent tax number, taxable income e.t.c.

Methods: The functionality implemented, such as compute

tax rate or tax amount. Events: Notifications of the occurrence of events to the

caller of the business objects (client).

Presentation (GUI) or User services: In this t ier, development is divided by skil ls

as follows: Analyst or User: Develops the GUI, graphics and Solution Developer: Creates the application specif ic code at the

client side. Business Tier: This encapsulates business rules and

process for individual objects. Business objects components can be complex

task requir ing a thorough understanding of the users overall business and how the various segments of the users business would interact with a common business object.

Data Service Tier or Business Data: It consists of data in any form. Isolating actual data from the solutions by the

business rules tier improves the reliability and accuracy.

Advantages: It is easier to modify or replace any tier without

affecting the other tiers. Separating the application and database

functionality means better load sharing.

The 3-tier architecture is a versatile and modular infrastructure intended to improve usability, flexibility, interoperability and scalability

Disadvantages: For more complex applications, a 3-tier solution

may fall short, and you may need a N-tiered approach, where the greatest benefit is breaking the business logic, which resides on the application tier, into a more fine-grained models.

N-TIER ARCHITECTURE: In software engineering, multi-tier architecture

(often referred to as N-tier architecture) is a client-server architecture in which the presentation, the application processing, and the data management are logically separate processes.

So most of the time 3-tier is really, N-tier. In N-tier architecture it depends on the

organization to divided the business tier or middle tier further so it consists of:

◦ A client tier to provide the user interface.◦One or more middle-tier modules that

provide client services and business logic for an application, and◦ Backend enterprise information systems

providing data management.◦ Like in Example we have a client system,

middle tier divided into EJB and Web containers, and data tier consisting of RDBMS, ERP e.t.c.

BUSINESS LOGIC-SOAP: SOAP (Simple Object Access Protocol) is an

XML-based messaging protocol . .It is not tied to any particular transport protocol

though HTTP is popular. Nor is it tied to any particular operating system

or programming language so theoretically the clients and servers in these dialogues can be running on any platform and written in any language as long as they can formulate and understand SOAP messages.

SOAP is platform-independent and works over the existing Internet infrastructure without being tied to any language, operating system, language, or object model.

At present, SOAP has been implemented in over 60 languages on over 20 platforms.

Objects everywhere, local and remote, large and small, are able to interoperate.

SOAP may be implemented as either a client or a server. A SOAP client is a program that creates an XML

document containing the information needed to invoke remotely a method in a distributed system. SOAP clients need not be traditional.

A SOAP client could also be a Web server or a server-based application.

SOAP servers ensure that documents received over a HTTP connection are converted to a language that the object at the other end understands.

Because all communications are made in the form of XML, objects in one language (say, Java) may communicate through SOAP with objects in any other language (C++).

It's the job of the SOAP server to make sure the end points understand the SOAP they're being served.

2.2 MOBILE DATABASES: A Mobile database is a database that can be

connected to a mobile computing device over a mobile network.

The client and server have wireless connections.

A cache is maintained to hold frequent data and transactions, so that they are not lost due to connection failure.

The use of laptops, mobiles and PDAs is increasing and likely to increase in the future with more and more applications residing in the mobile systems.

As a user moves around, data could be accessed from multiple data base servers with in a single transaction .

With the advent of mobile databases, now users can load up their smart phones or PDAs with mobile databases to exchange data remotely without worrying about time or distance.

Mobile databases let employees enter data on the fly.

Information can be synchronized with a server database at a later time.

Mobile database System Architecture: For any mobile architecture, things to be

considered are:

Users are not attached to a fixed geographical location.

Mobile computing devices: low-power, low-cost, portable .

Wireless networks. Mobile computing constraints .

Fixed hosts: Perform the transaction and data management functions with the help of database servers.

Mobile units: Portable computers, move around a geographical region that is a collection of mobile cells.

Mobile hosts retains network connection through the support of base stations.

Role of mobile hosts depend on the capacity. Base stations: It is a two-way radio installation in

a fixed location, used to communicate with one or more mobile or portable radio transceivers.

They are typically used by low-power two-way radios such as mobile phones, portable phones and wireless routers.

When a mobile unit leaves a mobile cell serviced by a base station, transfer the responsibility for mobile transaction and data support to the new base station

Transparent processes.

Mobile databases are highly concentrated in Retail and Logistic industry.

It is increasingly being used in Aviation and Transportation Industry.

2.3 MULTIMEDIA DATABASES: Mult imedia Data: It defines as many kinds of media—images,

video, audio, graphics, hypertext, animation e.t.c.

Multimedia Object : A multimedia document or presentation

containing one or more multimedia data. Multimedia Database: It is defined as a database containing one

or more multimedia object. Main Sources of Multimedia Data Bases are: Image Video Document Audio

Image: Image is stored either in raw form as a set of pixels

or cell values or in compressed form to save space. Each cell contains the pixel value that describe the

cell content. In black and white images the pixels can be one bit.

In gray and color images the pixel is multiple bits.Video: It is typically represented as a sequence of frames,

each frame is a still image. The Video is divided into video segments, where

each

segment is made up of a sequence of contiguous frames that include the same object or activities.

Each segment is identified by its starting and ending frame.

The objects and activities are identified in each video segment.

An indexing technique called frame segment trees has been proposed for video indexing. Indexing objects include( persons, buildings, vehicles, e.t.c)

And activities include (a person making a speech, or a batsmen executing a cover drive).

Document: A text or document is the full text of some

article, book, or magazine. These are typically indexed by identifying key

words. Audio: These include stored recorded messages such

as speeches, presentations or even recording of phone messages.