Professional Documents
Culture Documents
It includes the originating flight terminal and destination terminal, along with stops in between, number of seats
Customer Description
It includes customer code, name, address and phone number. This information may be used for keeping the
records of customer for any emergency or for any other kind of information
Reservation Description
It includes customer code number, flight number, date of booking, date of traveling, (You may assume any other
fild/relation, if needed).
, giving connected flights in case no direct flight between the specified Source-Destination pair exist.
iii) How the response for application 1 and 2 will be generated. Assuming these
are global queries. Explain how various fragments will be combined to do so.
Answer:
DISTRIBUTED DATABASE :
2. The sites have agreed to work together so that a user at any site can access data anywhere in the network
exactly as if the data were all stored at the user’s own site.
It follows that the so-called “distributed database” is really a kind of virtual objects, whose component parts are
A distributed database system consists of a collection of sites, each of which may participate in the execution of
transactions which access data at one site, or several sites. The main difference between centralized and
distributed database systems is that, in the former, the data resided in one single location, while in the latter, the
Each site is able to process local transactions, those transactions that access data only that single site. A site may
participate in the executions of global transactions, those transactions that access data in several sites. The
Each site is a database system site in its own right. In other words, each site has its own local “real” databases, its
own local users, its own local DBMS and transaction management software and its own local data communications
manager. The distributed database system can thus be regarded as a kind of partnership among individual local
DBMS at the individual sites.
In the given context there are four sites,i.e., Delhi, Mumbai, Chennai and Kolkata and these sites are
geographically dispersed. Each site has its own computer with a database consisting of all the customers and flight
details maintained at that site. The database system at the various sites are based on the relational model. Each
Reservation_scheme=(site_code,fl_no,cust_code,travel_date)
Site containing information about the four sites maintains the relation (Cite_scheme), where
Cite_scheme=(Cite_code,Cite_name)
A local transaction is a transaction that accesses information in the one single site, at which the transaction was
initiated. A global transaction, on the other hand is one which either access accounts in a site different from the
one at which the transaction was initiated, or access several different sites.
Then the advantages are surely obvious: The distributed arrangement combines efficiency of processing (the data
is stored close to the point where it is most frequently used) with increased accessibility (it is possible to access a
Delhi information from Kolkata and vice versa, via the communication network), reliability and availability and
Allowing the structure of the database to mirror the structure of the enterprise is probably the number one
advantage of distributed systems. There are some disadvantages too, of which the biggest is the fact that
distributed systems are complex, software development cost, greater potential for bugs and increase processing
overhead.
As per commercial implementations, most of today’s relational products offer some kind of distributed database
(b) the distributed database option of ORCALE8 or later from Oracle Corporation and
It is worth pointing out that all of the systems listed above, both prototypes and products, are relational.
OBJECTIVES :
1. Local autonomy
3. Continuous operation
4. Location independence
5. Fragmentation independence
6. Replication independence
9. Hardware independence
These above twelve objectives are not all independent of one another, nor are they necessarily exhaustive, nor
are they all equally significant. However, they are useful as a basis for understanding distributed technology and
(a) some sites are client sites and others are serer sites
The term ‘client/server’ refers primarily to an architecture, or logical division of responsibilities , the client is the
application (also known as the frontend), and the server is the DBMS (also known as the backend).
A client/server system can be thought of as a distributed system in which all requests originate at one site and all
processing is performed at another. In practice the client site might well have its own local databases, but those
databases will not play a direct part in the client/server arrangement as such.
Client/Server provides a low-priced robust solution to user requirements. This approach permits downsizing
production subsystem while allowing the clients and servers the necessary tools and facilitate to control, manage
Most client/server solution are also very attentive in matters of security. Access to any resources can be defines to
the file level, with such access being controlled through identification and authorization. Logically defined closed
use groups can be setup to enable the enhancing of security measures by network administrations.
It allows the database management including security, performance, backup, server enforced integrity to be part
of the database machine avoiding the requirement to write large number of redundant piece of code dealing with
The successful organizations have to be marked drives and competitive in the times to come, and they will use
Client/Server computing as the enabling technology to add values to their business. Powerful workstations will be
available to all end users to be used as clients to access the information on the servers which are distributed
globally. The networks of the future will support much higher bandwidth by using technologies like corporate
networks will cut across the boundaries of cities or even countries and they will be connected to major networks
E-R DIAGRAM :
E-R Diagram constitute a technique for representing the logical structure of a database in a pictorial manner. This
analysis is then used to organize data as a relation, normalising relation and finally obtaining a relation database.
Attributes
Relationships : Which connect entities and represent meaningful dependencies between them.
NORMALIZATION :
The basic objective of normalization is to be reduce redundancy which means that information is to be stored only
once. Storing information several times leads to wastage of storage space and increase in the total size of the data
stored.
If a Database is not properly designed it can gives rise to modification anomalies. Modification anomalies arise
when data is added to, changed or deleted from a database table. Similarly, in traditional databases as well as
improperly designed relational databases, data redundancy can be a problem. These can be eliminated by
normalizing a database.
Normalization is the process of breaking down a table into smaller tables. So that each table deals with a single
theme. There are three different kinds of modifications of anomalies and formulated the first, second and third
normal forms (3NF) is considered sufficient for most practical purposes. It should be considered only after a
This form also called as a “flat file”. Each column should contain data in respect of a single attributes and no two
Cont...
A relation is said to be in 2NF if it is 1NF and non-key attributes are functionality dependent on the key attributes.
A ‘Functional Dependency’ is a relationship among attributes. One attribute is said to be functionally dependent
on another if the value of the first attribute depends on the value of the second attribute.
In the given description flight number and halt code is the composite key.
FLIGHT DETAILS :
AR_FLIGHT_MST
FL_NO VARCHAR2(7) PRIMARY KEY
FL_NAME VARCHAR2(25) NOT NULL
ORG_CD NUMBER(3) NOT NULL
DES_CD NUMBER(3) NOT NULL
CAPACITY NUMBER(3) NOT NULL
AR_FLIGHT_DET
PRIMARY KEY (REFERENCE
FL_NO VARCHAR2(7)
AR_FLIGHT_MST.FL_NO)
HALT_CD NUMBER(3) PRIMARY KEY
DIST_FRM_ORG NUMBER(3) -
NO_QUOTA NUMBER(3) -
NO_BOOKED NUMBER(3) -
JOUR_DATE - NOT NULL
THIRD NORMAL FORM (3NF) :
A Third Normal Form normalization will be needed where all attributes in a relation tuple are not functionally
dependent only on the key attribute. A transitive dependency is one in which one in which one attribute depends
FLIGHT DETAILS :
AR_FLIGHT_MST
FL_NO VARCHAR2(7) PRIMARY KEY
FL_NAME VARCHAR2(25) NOT NULL
ORG_CD NUMBER(3) NOT NULL
DES_CD NUMBER(3) NOT NULL
CAPACITY NUMBER(3) NOT NULL
AR_FLIGHT_DET
PRIMARY KEY (REFERENCE
FL_NO VARCHAR2(7)
AR_FLIGHT_MST.FL_NO)
HALT_CD NUMBER(3) PRIMARY KEY
DIST_FRM_ORG NUMBER(3) -
NO_QUOTA NUMBER(3) -
NO_BOOKED NUMBER(3 -
JOUR_DATE - NOT NULL
AR_HALT_MST
HALT_CD NUMBER(3) PRIMARY KEY
DESCRIPTION VARCHAR2(30) NOT NULL
FLIGHT DETAILS :
AR_FLIGHT_MST
AR_FLIGHT_DET
PRIMARY KEY (REFERENCE
FL_NO VARCHAR2(7)
AR_FLIGHT_MST.FL_NO)
HALT_CD NUMBER(3) PRIMARY KEY
DIST_FRM_ORG NUMBER(3)
NO_QUOTA NUMBER(3)
NO_BOOKED NUMBER(3)
AR_HALT_MST
HALT_CD NUMBER(3) PRIMARY KEY
CUSTOMER DETAILS :
AR_CUST_MST
CITE_CODE VARCHAR2(3)
NAME VARCHAR2(25) -
ADDRESS1 VARCHAR2(30) -
ADDRESS2 VARCHAR2(30) -
CITY VARCHAR2(25) -
PIN VARCHAR2(6) -
PH_MOBL_NO VARCHAR2(15) -
DIST_TRAVEL NUMBER(4) -
ADDRESS VARCHAR2(50) -
CITY VARCHAR2(25) -
RESERVATION DETAILS :
AR_RESERV_DET
CITE_CODE VARCHAR2(3) NOT NULL
DIST_TRAVEL NUMBER(4)
BOOK_DATE DATE
TRAVEL_DATE DATE
STATUS CHAR(1)
AR_CITE_MST
CITE_CODE VARCHAR2(3) PRIMARY KEY
SQL COMMANDS :
To develop the given application the below activities are followed in an order:
Creation of Database
Creation of Tables
Creation of Database Triggers
Create of Indexes
Creation of view
Creation of synonyms
The following are some of the SQL commands used to implement this application :
CREATION OF TABLES :
VARCHAR2(25));
SELECT COMMANDS :
GROUP BY FL_NO,HALT_CD;
SELECT E.CITE_NAME,D.NAME,B.FL_NAME,A.ORG_CD,A.DESC_CD,C.DESCRIPTION,
GROUP BY E.CITE_NAME,B.FL_NAME;