© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63. 1 1 © Bharati Vidyapeeth’s Institute of Computer Applications and.

Slides:



Advertisements
Similar presentations
Database Systems: Design, Implementation, and Management
Advertisements

Database System Concepts and Architecture
Database Architectures and the Web
Distributed databases
Chapter 13 (Web): Distributed Databases
Technical Architectures
1 Minggu 12, Pertemuan 23 Introduction to Distributed DBMS (Chapter , 22.6, 3rd ed.) Matakuliah: T0206-Sistem Basisdata Tahun: 2005 Versi: 1.0/0.0.
Distributed Database Management Systems
Overview Distributed vs. decentralized Why distributed databases
The Architecture of Transaction Processing Systems
©Silberschatz, Korth and Sudarshan19.1Database System Concepts Lecture-10 Distributed Database System A distributed database system consists of loosely.
Chapter 12 Distributed Database Management Systems
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 17 Client-Server Processing, Parallel Database Processing,
Client-server database systems and ODBC l Client-server architecture and components l More on reliability and security l ODBC standard.
The University of Akron Dept of Business Technology Computer Information Systems Database Management Approaches 2440: 180 Database Concepts Instructor:
©Silberschatz, Korth and Sudarshan18.1Database System Concepts Centralized Systems Run on a single computer system and do not interact with other computer.
Definition of terms Definition of terms Explain business conditions driving distributed databases Explain business conditions driving distributed databases.
Chapter 2 Client Server Architecture
Distributed databases
DATABASE MANAGEMENT SYSTEMS 2 ANGELITO I. CUNANAN JR.
Distributed Databases
Distributed Databases and DBMSs: Concepts and Design
Introduction to Databases Transparencies 1. ©Pearson Education 2009 Objectives Common uses of database systems. Meaning of the term database. Meaning.
Chapter 3 Database Architectures and the Web Pearson Education © 2009.
1 Web Database Processing. Web Database Applications Static Report Publishing a report is prepared from a database application and exported to HTML DB.
1 Distributed and Parallel Databases. 2 Distributed Databases Distributed Systems goal: –to offer local DB autonomy at geographically distributed locations.
Database System Concepts and Architecture Lecture # 3 22 June 2012 National University of Computer and Emerging Sciences.
IMS 4212: Distributed Databases 1 Dr. Lawrence West, Management Dept., University of Central Florida Distributed Databases Business needs.
12 1 Chapter 12 Distributed Database Management Systems Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
1 Chapter 3 Database Architecture and the Web Pearson Education © 2009.
Database Architectures and the Web Session 5
Database Design – Lecture 16
III. Current Trends: 1 - Distributed DBMSsSlide 1/32 III. Current Trends Part 1: Distributed DBMSs: Concepts and Design Lecture 12 (2 hours) Lecturer:
CSC271 Database Systems Lecture # 4.
04/18/2005Yan Huang - CSCI5330 Database Implementation – Distributed Database Systems Distributed Database Systems.
9/5/2012ISC329 Isabelle Bichindaritz1 Web Database Environment.
1 Introduction to Database Systems. 2 Database and Database System / A database is a shared collection of logically related data designed to meet the.
Session-9 Data Management for Decision Support
Session-8 Data Management for Decision Support
10 1 Chapter 10 Distributed Database Management Systems Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Database Systems: Design, Implementation, and Management Tenth Edition Chapter 12 Distributed Database Management Systems.
Database Systems: Design, Implementation, and Management Ninth Edition Chapter 12 Distributed Database Management Systems.
Week 5 Lecture Distributed Database Management Systems Samuel ConnSamuel Conn, Asst Professor Suggestions for using the Lecture Slides.
CSS/417 Introduction to Database Management Systems Workshop 4.
The Client/Server Database Environment Ployphan Sornsuwit KPRU Ref.
10 1 Chapter 10 Distributed Database Management Systems Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Kjell Orsborn UU - DIS - UDBL DATABASE SYSTEMS - 10p Course No. 2AD235 Spring 2002 A second course on development of database systems Kjell.
Distributed Databases
ASMA AHMAD 28 TH APRIL, 2011 Database Systems Distributed Databases I.
Distributed Database. Introduction A major motivation behind the development of database systems is the desire to integrate the operational data of an.
Distributed database system
Introduction Database integral part of our day to day life Collection of related database Database Management System : software managing and controlling.
UNIT III - JDBC JDBC Overview – JDBC implementation – Connection class – Statements - Catching Database Results, handling database Queries. Networking–
Topic Distributed DBMS Database Management Systems Fall 2012 Presented by: Osama Ben Omran.
ODBC : Open Database Connectivity SNU OOPSLA Lab. October 2005.
 Distributed Database Concepts  Parallel Vs Distributed Technology  Advantages  Additional Functions  Distribution Database Design  Data Fragmentation.
1 Chapter 22 Distributed DBMS Concepts and Design CS 157B Edward Chen.
1 Information Retrieval and Use De-normalisation and Distributed database systems Geoff Leese September 2008, revised October 2009.
IT 5433 LM1. Learning Objectives Understand key terms in database Explain file processing systems List parts of a database environment Explain types of.
1 Chapter 22 Distributed DBMSs - Concepts and Design Simplified Transparencies © Pearson Education Limited 1995, 2005.
The Client/Server Database Environment
The Client/Server Database Environment
Database Architectures and the Web
Chapter 19: Distributed Databases
#01 Client/Server Computing
Introduction to Databases Transparencies
MANAGING DATA RESOURCES
Introduction of Week 11 Return assignment 9-1 Collect assignment 10-1
Database System Architectures
#01 Client/Server Computing
Presentation transcript:

© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63, By Imran Khan Asst. Professor Unit 3 Distributed Database Management Systems

© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63, By Imran Khan Asst. Professor Distributed Databases A distributed database (DDB) is a collection of multiple, logically interrelated databases distributed over a computer network. A distributed database management system (D– DBMS) is the software that manages the DDB and provides an access mechanism that makes this distribution transparent to the users. It consists of loosely coupled sites that share no physical components.

© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63, By Imran Khan Asst. Professor DDBMS

© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63, By Imran Khan Asst. Professor Distributed Database - User View Distributed Database

© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63, By Imran Khan Asst. Professor Distributed DBMS - Reality Communication Subsystem User Query DBMS Software DBMS Software User Application DBMS Software User Application User Query DBMS Software User Query DBMS Software

© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63, By Imran Khan Asst. Professor In a homogeneous distributed database – All sites have identical software – Are aware of each other and agree to cooperate in processing user requests. – Each site surrenders part of its autonomy in terms of right to change schemas or software – Appears to user as a single system In a heterogeneous distributed database – Different sites may use different schemas and software Difference in schema is a major problem for query processing Difference in softwrae is a major problem for transaction processing – Sites may not be aware of each other and may provide only

© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63, By Imran Khan Asst. Professor Interconnection of existing databases Incremental growth Reduced communication overhead Performance considerations Reliability and availability Organizational reasons Why Distributed Databases?

© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63, By Imran Khan Asst. Professor Complexity Cost Distribution of control Security Lack of standards Difficult to change Disadvantages of Distributed D atabases

© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63, By Imran Khan Asst. Professor There are 2 important forms of distributed data 1. Data Fragmentation: The decomposition of global relations into fragments is called data fragmentation. 2. Replicated Data : Storing copies of data at multiple sites. Data Distribution in DDBMS

© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63, By Imran Khan Asst. Professor 10 Data Fragmentation Division of relation r into fragments r 1, r 2, …, r n which contain sufficient information to reconstruct relation r. Horizontal fragmentation: each tuple of r is assigned to one or more fragments Vertical fragmentation: the schema for relation r is split into several smaller schemas – All schemas must contain a common candidate key (or superkey) to ensure lossless join property. – A special attribute, the tuple-id attribute may be added to each schema to serve as a candidate key. Example : relation account with following schema Account-schema = (branch-name, account- number, balance)

© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63, By Imran Khan Asst. Professor Horizontal Fragmentation example branch-nameaccount-numberbalance Hillside A-305 A-226 A account 1 =  branch-name=“Hillside” (account) branch-nameaccount-numberbalance Valleyview A-177 A-402 A-408 A account 2 =  branch-name=“Valleyview” (account)

© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63, By Imran Khan Asst. Professor 12 Vertical Fragmentation example branch-name customer-name tuple-id Hillside Valleyview Hillside Valleyview Lowman Camp Kahn Green deposit 1 =  branch-name, customer-name, tuple-id (employee-info) account number balance tuple-id A-305 A-226 A-177 A-402 A-155 A-408 A-639 deposit 2 =  account-number, balance, tuple-id (employee-info)

© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63, By Imran Khan Asst. Professor Data transparency means the user of DBMS should not be required to know where the data are physically located and how the data can be accessed at the specific site. It can take 3 forms – Fragmentation transparency – Replication transparency – Location transparency Transparency

© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63, By Imran Khan Asst. Professor Reference Architecture of Distributed Databases Global Schema Fragmentation Schema Allocation Schema Local mapping Schema1 DBMS of site1 Local mapping Schema N DBMS of site2 Local database at site1 Local database at site N Site independent schemas Local schemas may be hetrogeneous

© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63, By Imran Khan Asst. Professor Objectives of this architecture are : – Separation of data fragmentation and allocation – Control of redundancy – Independence from local DBMS (heterogeneity) Reference Architecture cont….

© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63, By Imran Khan Asst. Professor There are 2 allocation strategies: – Non redundant : In this type of allocation, a ‘best-fit’ approach is used. A measure is associated with each possible allocation and the site with the best measure is selected. – Redundant : This type of allocation introduces complexity in the DBMS design because : The degree of replication becomes a problem Modeling read only applications is complicated because the application can access fragments among several alternative sites. Allocation of fragments

© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63, By Imran Khan Asst. Professor Classification on the basis of lifetime: – Short duration – Long duration Classification on the basis of read/write statements -General transactions -Restricted (Read before write) transactions Classification on the basis of structure of transactions -Flat transactions -Nested Transactions -Workflows Classification of transactions in distributed databases

© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63, By Imran Khan Asst. Professor Client/Server Systems Client/Server system links a client and server through a network. The client/server model is based on the distribution of functions between two types of independent and autonomous processes : severs and clients.

© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63, By Imran Khan Asst. Professor Client-Server Architecture Each component of a client-server system has the role of either client or server – Client: a component that makes requests clients are active initiators of transactions – Server: a component that satisfies requests servers are passive and react to client requests

© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63, By Imran Khan Asst. Professor Centralized / Distributed The client-server architecture can be thought of as a median between – Centralized processing: computation is performed on a central platform, which is accessed using “dumb” terminals – Distributed processing: computation is performed on platforms located with the user Centralized Distributed Client / Server

© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63, By Imran Khan Asst. Professor Client-Server Architecture The Web is a client-server system Web browsers act as clients, and make requests to web servers Web servers respond to requests with requested information and/or computation Server Client request

© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63, By Imran Khan Asst. Professor 2-Tier C-S Architecture Tier 1: Client platform, hosting a web browser Tier 2: server platform, hosting all server software components

© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63, By Imran Khan Asst. Professor 2-Tier Characteristics Advantage: – Inexpensive (single platform) – Communication is faster Disadvantages – Interdependency (coupling) of components In two tier architecture application performance will be degrade upon increasing the users. Cost-ineffective Typical application – users – Small company or organization, e.g., law office, medical practice, local non-profit

© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63, By Imran Khan Asst. Professor 3-Tier C-S Architecture Tier 3 takes over part of the server function from tier 2, typically data management

© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63, By Imran Khan Asst. Professor 3-Tier Characteristics Advantages – Improved performance, from specialized hardware – Decreased coupling of software components – Improved scalability – Performance – Because the Presentation tier can cache requests, network utilization is minimized, and the load is reduced on the Application and Data tiers. – High degree of flexibility in deployment platform and configuration – Better Re-use – Improve Data Integrity – Improved Security – Client is not direct access to database. – Easy to maintain and modification is bit easy, won’t affect other modules In three tier architecture application performance is good. Disadvantages – Increase complexity and cost Typical Application – users – Small business or regional organization, e.g., specialty retailer, small college

© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63, By Imran Khan Asst. Professor Roles of client and server Client – Manage the user interface – Enforce business rules – Process application logic – Generate database requests (SQL) – Transmit database requests to server – Receive results from server – Format results Server – Accept database request from clients – Process database requests – Format results and transmit to client – Enforce business rules – Perform integrity checking – Maintain database overhead data – Provide concurrent access control – Provide recovery and security services

© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63, By Imran Khan Asst. Professor Advantages & disadvantages Pro – Applications use client CPUs in parallel More powerful applications – Network traffic is reduced Con – Concurrency control – Multiple client OS’s

© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63, By Imran Khan Asst. Professor A standard database access method developed by the SQL Access group in The goal of ODBC is to make it possible to access any data from any application, regardless of which DBMS is handling the data. ODBC manages this by inserting a middle layer, called a database driver, between an application and the DBMS. The purpose of this layer is to translate the application's data queries into commands that the DBMS understands. For this to work, both the application and the DBMS must be ODBC- compliant -- that is, the application must be capable of issuing ODBC commands and the DBMS must be capable of responding to them ODBC

© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63, By Imran Khan Asst. Professor ODBC functionality is provided by three main components: the client application the ODBC Driver Manager the ODBC driver ODBC

© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63, By Imran Khan Asst. Professor A Java API that enables Java programs to execute SQL statements. This allows Java programs to interact with any SQL-compliant database. Since nearly all relational database management systems (DBMSs) support SQL, and because Java itself runs on most platforms, JDBC makes it possible to write a single database application that can run on different platforms and interact with different DBMSs. JDBC is similar to ODBC, but is designed specifically for Java programs, whereas ODBC is language-independent. JDBC was developed by JavaSoft, a subsidiary of Sun Microsystems JDBC

© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63, By Imran Khan Asst. Professor The JDBC library includes APIs for each of the tasks commonly associated with database usage: Making a connection to a database Creating SQL or MySQL statements Executing that SQL or MySQL queries in the database Viewing & Modifying the resulting records Using JDBC

© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63, By Imran Khan Asst. Professor DBC is a specification that provides a complete set of interfaces that allows for portable access to an underlying database. Java can be used to write different types of executables, such as: Java Applications Java Applets Java Servlets Java ServerPages (JSPs) Enterprise JavaBeans (EJBs) JDBC

© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63, By Imran Khan Asst. Professor The JDBC API provides the following interfaces and classes: DriverManager: This class manages a list of database drivers. Matches connection requests from the java application with the proper database driver using communication subprotocol. The first driver that recognizes a certain subprotocol under JDBC will be used to establish a database Connection. Driver: This interface handles the communications with the database server. You will interact directly with Driver objects very rarely. Instead, you use DriverManager objects, which manages objects of this type. It also abstracts the details associated with working with Driver objects Connection : This interface with all methods for contacting a database. The connection object represents communication context, i.e., all communication with database is through connection object only. Components of JDBC

© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63, By Imran Khan Asst. Professor Statement : You use objects created from this interface to submit the SQL statements to the database. Some derived interfaces accept parameters in addition to executing stored procedures. ResultSet: These objects hold data retrieved from a database after you execute an SQL query using Statement objects. It acts as an iterator to allow you to move through its data. SQLException: This class handles any errors that occur in a database application. Components of JDBC

© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63, By Imran Khan Asst. Professor Components of JDBC

© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63, By Imran Khan Asst. Professor ActiveX Data Objects, Microsoft's newest high-level interface for data objects. ADO is designed to eventually replace Data Access Objects (DAO) and Remote Data Objects (RDO). Unlike RDO and DAO, which are designed only for accessing relational databases, ADO is more general and can be used to access all sorts of different types of data, including web pages, spreadsheets, and other types of documents. Together with OLE DB and ODBC, ADO is one of the main components of Microsoft's Universal Data Access (UDA) specification, which is designed to provide a consistent way of accessing data regardless of how the data are structured. ADO

© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63, By Imran Khan Asst. Professor Using ADO The ADO object model is actually quite simple -- there are only six total objects: The Connection object sets up a link between your program and the data source. This object contains all of the necessary configuration information and acts as a gateway for all of the other ADO objects. The Connection object is mandatory -- all implementations of ADO must support it. Each Connection object may have an associated collection of Error objects. ADO utilizes this collection when the connection returns more than one error message at a time. This collection is optional. The Command object represents a SQL statement or stored procedure that software executes against the datasource. Use of Command objects is optional -- data can be extracted directly from a Connection object, if desired. Command objects may have an associated collection of Parameter objects that provide additional information to the data source when executing the command. The Parameter collection is optional. Each command execution results in a Recordset containing the results of the query. This object is a mandatory part of ADO. Each Recordset object is composed of a number of Field objects that represent individual columns in the Recordset. This object is a mandatory feature of ADO.

© Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeth’s Institute of Computer Applications and Management, New Delhi-63, By Imran Khan Asst. Professor Questions 1.What is the difference between centralized and distributed environment? 2.State the advantages nad disadvantages of distributed systems. 3.Explain the general architecture if Distributed systems. 4.What are different allocation schemes in distributed databases? 5.What is fragmentation? Explain the different types of Fragmentation. 6.Discuss the services provided by ODBC and JDBC tools.