Vec - Cse IV Semester - II Year - CS8492 - DBMS
Vec - Cse IV Semester - II Year - CS8492 - DBMS
Vec - Cse IV Semester - II Year - CS8492 - DBMS
DBMS – Definition
A database-management system (DBMS) is a collection of interrelated data
and a set of programs to access those data. The collection of data, usually
referred to as the database, contains information relevant to an enterprise.
The primary goal of a DBMS is to provide a way to store and retrieve
database information that is both convenient and efficient.
Database Applications
Databases are widely used. Here are some representative applications:
• Enterprise Information
◦ Sales: For customer, product, and purchase information.
◦ Accounting: For payments, receipts, account balances, assets and other
accounting information.
◦ Human resources: For information about employees, salaries, payroll
taxes, and benefits, and for generation of paychecks.
◦ Manufacturing: For management of the supply chain
◦ Online retailers: For sales data noted above plus online order tracking,
generation of recommendation lists, and maintenance of online product
evaluations.
• Banking and Finance
◦ Banking: For customer information, accounts, loans, and banking
transactions.
◦ Credit card transactions: For purchases on credit cards and generation of
monthly statements.
◦ Finance: For storing information about holdings, sales, and purchases of
financial instruments such as stocks and bonds;
• Universities: For student information, course registrations, and grades (in
addition to standard enterprise information such as human resources and
accounting).
1
VEC – CSE IV Semester – II Year – CS8492 – DBMS
• Airlines: For reservations and schedule information. Airlines were among the
first to use databases in a geographically distributed manner.
• Telecommunication: For keeping records of calls made, generating monthly
bills, maintaining balances on prepaid calling cards, and storing information about
the communication networks.
2
VEC – CSE IV Semester – II Year – CS8492 – DBMS
Concurrent-access anomalies.
For the sake of overall performance of the system and faster response, many
systems allow multiple users to update the data simultaneously.
Security problems.
Not every user of the database system should be able to access all the data.
Views of DATA
A major purpose of a database system is to provide users with an abstract view of
the data. That is, the system hides certain details of how the data are stored and
maintained.
Data Abstraction
For the system to be usable, it must retrieve data efficiently. The need for
efficiency has led designers to use complex data structures to represent data in
the database. Since many database-system users are not computer trained,
developers hide the complexity from users through several levels of abstraction,
to simplify users’ interactions with the system:
Physical level. The lowest level of abstraction describes how the data are
actually stored. The physical level describes complex low-level data
structures in detail.
Logical level. The next-higher level of abstraction describes what data are
stored in the database, and what relationships exist among those data. The
logical level thus describes the entire database in terms of a small number
of relatively simple structures.
View level. The highest level of abstraction describes only part of the entire
database. Even though the logical level uses simpler structures, complexity
remains because of the variety of information stored in a large database.
3
VEC – CSE IV Semester – II Year – CS8492 – DBMS
4
VEC – CSE IV Semester – II Year – CS8492 – DBMS
Data Models
Underlying the structure of a database is the data model: a collection of
conceptual tools for describing data, data relationships, data semantics, and
consistency constraints. A data model provides a way to describe the design of a
database at the physical, logical, and view levels.
There are a number of different data models that we shall cover in the text. The
data models can be classified into four different categories:
Relational Model.
The relational model uses a collection of tables to represent both data and
the relationships among those data. Each table has multiple columns, and
each column has a unique name. Tables are also known as relations.
Tables are also known as relations. The relational model is an example of a
record-based model.
Table: Student
Student ID Student Name Department Date of Birth
111 Ajay CSE 23-June-1999
112 Aravind CSE 20-Jan-1998
113 Balakumaran CSE 21-Jun-1999
Disadvantages
Significant hardware and software overhead
Not as good as transaction process modeling
May have slow processing time than the hierarchical and network
model
5
VEC – CSE IV Semester – II Year – CS8492 – DBMS
Entity-Relationship Model.
The entity-relationship (E-R) data model uses a collection of basic objects, called
entities, and relationships among these objects. An entity is a “thing” or “object”
in the real world that is distinguishable from other objects. The entity-relationship
model is widely used in database design,
Components of a ER Diagram
ER Diagram Components
6
VEC – CSE IV Semester – II Year – CS8492 – DBMS
Advantages
o Easy to develop relational model using ER model
o ER specifies mapping cardinalities
o Specifies key like primary key, foreign key
Disadvantages
o Used for design purpose only not implementation
Database Languages
A database system provides a data-definition language to specify the database
schema and a data-manipulation language to express database queries and
updates. In practice, the data-definition and data-manipulation languages are not
two separate languages; instead they simply form parts of a single database
language, such as the widely used SQL language.
7
VEC – CSE IV Semester – II Year – CS8492 – DBMS
Data-Manipulation Language
A data-manipulation language (DML) is a language that enables users to access or
manipulate data as organized by the appropriate data model. The types of access
are:
• Retrieval of information stored in the database
• Insertion of new information into the database
• Deletion of information from the database
• Modification of information stored in the database
Data-Definition Language
A database schema by a set of definitions expressed by a special language
called a data-definition language (DDL).The DDL is also used to specify
additional properties of the data.
Storage structure and access methods used by the database system are
specified by a set of statements in a special type of DDL called a data
storage and definition language.
These statements define the implementation details of the database
schemas, which are usually hidden from the users.
The data values stored in the database must satisfy certain consistency
constraints. For example, suppose the university requires that the account
balance of a department must never be negative.
Referential Integrity. There are cases where we wish to ensure that a value that
appears in one relation for a given set of attributes also appears in a certain set of
attributes in another relation (referential integrity).
Assertions. An assertion is any condition that the database must always satisfy.
Domain constraints and referential-integrity constraints are special forms of
assertions.
Authorization. To differentiate among the users as far as the type of access they
are permitted on various data values in the database.
These differentiations are expressed in terms of authorization, the most
common being: read authorization, which allows reading, but not modification, of
data;
insert authorization, which allows insertion of new data, but not modification of
existing data; update authorization, which allows modification, but not deletion,
of data;
delete authorization, which allows deletion of data.
9
VEC – CSE IV Semester – II Year – CS8492 – DBMS
Storage Manager
The storage manager is the component of a database system that provides
the interface between the low-level data stored in the database and the
application programs and queries submitted to the system.
The storage manager is responsible for the interaction with the file
manager. The raw data are stored on the disk using the file system
provided by the operating system. The storage manager translates the
various DML statements into low-level file-system commands.
The DML compiler also performs query optimization; that is, it picks the lowest
cost evaluation plan from among the alternatives.
Query evaluation engine, which executes low-level instructions generated by the
DML compiler.
11
VEC – CSE IV Semester – II Year – CS8492 – DBMS
Database Administrator
One of the main reasons for using DBMS is to have central control of both the
data and the programs that access those data. A person who has such central
control over the system is called a database administrator (DBA).
The functions of a DBA include:
Schema definition. The DBA creates the original database schema by
executing a set of data definition statements in the DDL.
Storage structure and access-method definition.
Schema and physical organization modification. The DBA carries out
changes to the schema and physical organization to reflect the changing
needs of the organization, or to alter the physical organization to improve
performance.
Granting of authorization for data access. By granting different types of
authorization, the database administrator can regulate which parts of the
database various users can access.
Routine maintenance. Examples of the database administrator’s routine
maintenance activities are:
o Periodically backing up the database, either onto tapes or onto
remote servers, to prevent loss of data in case of disasters such as
flooding.
13
VEC – CSE IV Semester – II Year – CS8492 – DBMS
Database Schema
Database schema, which is the logical design of the database
Database instance, which is a snapshot of the data in the database at a
given instant in time.
The concept of a relation corresponds to the programming-language notion
of a variable, while the concept of a relation schema corresponds to the
programming-language notion of type definition.
14
VEC – CSE IV Semester – II Year – CS8492 – DBMS
Relation : Student
Tuple
111 Priya CSE [email protected] 9.2
Attributes
ID Name Department Email Credits
Relation Instance
Select * from student where id = 111 or id =112;
ID Name Department Email Credits
111 Priya CSE [email protected] 9.2
112 Shan EEE [email protected] 8.7
15
VEC – CSE IV Semester – II Year – CS8492 – DBMS
Keys
We must have a way to specify how tuples within a given relation are
distinguished.
This is expressed in terms of their attributes.
That is, the values of the attribute values of a tuple must be such that they
can uniquely identify the tuple.
In other words, no two tuples in a relation are allowed to have exactly the
same value for all attributes.
The term Primary key used to denote a candidate key that is chosen by the
database designer as the principal means of identifying tuples within a relation.
A foreign key is a set of attributes in a referencing relation, such that for each
tuple in the referencing relation, the values of the foreign key attributes are
guaranteed to occur as the primary key value of a tuple in the referenced relation.
16
VEC – CSE IV Semester – II Year – CS8492 – DBMS
17
VEC – CSE IV Semester – II Year – CS8492 – DBMS
The relational query languages define a set of operations that operate on tables,
and output tables as their results. These operations can be combined to get
expressions that express desired queries.
The relational algebra provides a set of operations that take one or more
relationsasinputandreturnarelationasanoutput.Practicalquerylanguages such as
SQL are based on the relational algebra, but add a number of useful syntactic
features.
18
VEC – CSE IV Semester – II Year – CS8492 – DBMS
SQL Fundamentals
SQL is a database computer language designed for the retrieval and management
of data in relational database. SQL stands for Structured Query Language.
What is SQL?
Why SQL?
Allows users to access data in relational database management systems.
Allows users to describe the data.
Allows users to define the data in database and manipulate that data.
Allows embedding within other languages using SQL modules, libraries &
pre-compilers.
Allows users to create and drop databases and tables.
Allows users to create view, stored procedure, functions in a database.
Allows users to set permissions on tables, procedures, and views
History:
1970 -- Dr. Edgar F. "Ted" Codd of IBM is known as the father of relational
databases. He described a relational model for databases.
1974 -- Structured Query Language appeared.
1978 -- IBM worked to develop Codd's ideas and released a product named
System/R.
1986 -- IBM developed the first prototype of relational database and
standardized by ANSI. The first relational database was released by
Relational Software and its later becoming Oracle.
SQL Process:
19
VEC – CSE IV Semester – II Year – CS8492 – DBMS
When you are executing an SQL command for any RDBMS, the system
determines the best way to carry out your request and SQL engine figures out
how to interpret the task. There are various components included in the process.
These components are Query Dispatcher, Optimization Engines, Classic Query
Engine and SQL Query Engine, etc. Classic query engine handles all non-SQL
queries but SQL query engine won't handle logical files.
Following is a simple diagram showing SQL Architecture
20
VEC – CSE IV Semester – II Year – CS8492 – DBMS
Basic Types
The SQL standard supports a variety of built-in types, including:
char(n): A fixed-length character string with user-specified length n. The full
form, character, can be used instead.
varchar(n): A variable-length character string with user-specified maximum
length n. The full form, character varying, is equivalent.
int: An integer(a finite subsetof the integersthat ismachine dependent).The
full form, integer, is equivalent.
smallint: A small integer (a machine-dependent subset of the integer type).
numeric(p,d):Afixed-pointnumberwithuser-specifiedprecision.Thenum- ber
consists of p digits (plus a sign), and d of the p digits are to the right of the
decimal point. Thus, numeric(3,1) allows 44.5 to be stored exactly, but
neither 444.5 or 0 .32 can be stored exactly in a field of this type.
real, double precision: Floating-point and double-precision floating-point
numbers with machine-dependent precision.
float(n): A floating-point number, with precision of at least n digits.
Integrity Constraints
Integrity constraints ensure that changes made to the database by
authorized users do not result in a loss of data consistency.
Thus, integrity constraints guard against accidental damage to the
database.
Integrity constraints include
o not null
o unique
o check(<predicate>)
21
VEC – CSE IV Semester – II Year – CS8492 – DBMS
The not null specification prohibits the insertion of a null value for the attribute.
Any database modification that would cause a null to be inserted in an attribute
declared to be not null generates an error diagnostic.
2. Unique Constraint
SQL also supports an integrity constraint:
unique (Aj1, Aj2,...,Ajm)
The unique specification says that attributes Aj1, Aj2,...,Ajm form a candidate key;
that is, no two tuples in the relation can be equal on all the listed attributes.
However, candidate key attributes are permitted to be null unless they have
explicitly been declared to be not null.
22
VEC – CSE IV Semester – II Year – CS8492 – DBMS
4. Referential Integrity
To ensure that a value that appears in one relation for a given set of
attributes also appears for a certain set of attributes in another relation.
This condition is called referential integrity.
More generally, let r1 and r2 be relations whose set of attributes are R1 and R2,
respectively, with primary keys K1 and K2. We say that a subset of R2 is a foreign
key referencing K1 in relation r1 if it is required that, for every tuple t2 in r2, there
must be a tuplet1 in r1 such that t1.K1 = t2.. Requirements of this form are called
referential-integrity constraints, or subset dependencies.
create table course
(course id varchar (8),
title varchar (50),
dept name varchar (20),
credits numeric (2,0)
check (credits > 0),
primary key (course id),
foreign key (dept name) references department)
CREATE – is used to create the database or its objects (like table, index,
function, views, store procedure and triggers).
DROP – is used to delete objects from the database.
ALTER-is used to alter the structure of the database.
TRUNCATE–is used to remove all records from a table, including all spaces
allocated for the records are removed.
COMMENT –is used to add comments to the data dictionary.
RENAME –is used to rename an object existing in the database.
23
VEC – CSE IV Semester – II Year – CS8492 – DBMS
DML(Data Manipulation Language) : The SQL commands that deals with the
manipulation of data present in database belong to DML or Data Manipulation
Language and this includes most of the SQL statements.
Examples of DML:
24
VEC – CSE IV Semester – II Year – CS8492 – DBMS
25
VEC – CSE IV Semester – II Year – CS8492 – DBMS
CREATE TABLE
Specifies a new base relation by giving it a name, and specifying each of its
attributes and their data types (INTEGER, FLOAT, DECIMAL(i,j), CHAR(n),
VARCHAR(n))
A constraint NOT NULL may be specified on an attribute
In SQL2, can use the CREATE TABLE command for specifying the primary
key attributes, secondary keys, and referential integrity constraints (foreign
keys).
Key attributes can be specified via the PRIMARY KEY and UNIQUE phrases
26
VEC – CSE IV Semester – II Year – CS8492 – DBMS
TRUNCATE
TRUNCATE removes all rows from a table. The operation cannot be rolled
back and no triggers will be fired. As such, TRUCATE is faster and doesn't use as
much undo space as a DELETE.
TRUNCATE TABLE emp;
ALTER TABLE
The database users must still enter a value for the new attribute JOB for each
EMPLOYEE tuple. This can be done using the UPDATE command.
27
VEC – CSE IV Semester – II Year – CS8492 – DBMS
28
VEC – CSE IV Semester – II Year – CS8492 – DBMS
SQL has one basic statement for retrieving information from a database; the
SELECT statement
This is not the same as the SELECT operation of the relational algebra
Important distinction between SQL and the formal relational model; SQL
allows a table (relation) to have two or more tuples that are identical in all their
attribute values
Hence, an SQL relation (table) is a multi-set (sometimes called a bag) of
tuples; it is not a set of tuples
SQL relations can be constrained to be sets by specifying PRIMARY KEY or
UNIQUE attributes, or by using the DISTINCT option in a query
Basic form of the SQL SELECT statement is called a mapping or a SELECT-
FROM-WHERE block
29
VEC – CSE IV Semester – II Year – CS8492 – DBMS
Query 0: Retrieve the birthdate and address of the employee whose name is
'John B. Smith'.
Query 1: Retrieve the name and address of all employees who work for the
'Research' department.
Query 2: For every project located in 'Stafford', list the project number, the
controlling department number, and the department manager's last name,
address, and birthdate.
30
VEC – CSE IV Semester – II Year – CS8492 – DBMS
Query 3: For each employee, retrieve the employee's name, and the name of
his or her immediate supervisor.
In Q3, the alternate relation names E and S are called aliases or tuple
variables for the EMPLOYEE relation
SELECT SSN
FROMEMPLOYEE
Query 5:
SELECT SSN, DNAME
FROM EMPLOYEE, DEPARTMENT
If more than one relation is specified in the FROM-clause and there is no join
condition, then the CARTESIAN PRODUCT of tuples is selected
To retrieve all the attribute values of the selected tuples, a * is used, which
stands for all the attributes
Examples:
SELECT *
FROMEMPLOYEE
WHERE DNO=5
SELECT *
FROMEMPLOYEE, DEPARTMENT
WHERE DNAME='Research' AND
DNO=DNUMBER
31
VEC – CSE IV Semester – II Year – CS8492 – DBMS
USE OF DISTINCT
SQL does not treat a relation as a set; duplicate tuples can appear
To eliminate duplicate tuples in a query result, the keyword DISTINCT is
used
For example, the result of Q6 may have duplicate SALARY values whereas
Q11A does not have any duplicate values
Q6: SELECT SALARY
FROMEMPLOYEE
Q6A: SELECT DISTINCT SALARY
FROMEMPLOYEE
SET OPERATIONS
SQL has directly incorporated some set operations
There is a union operation (UNION), and in some versions of SQL there
are set difference (MINUS) and intersection (INTERSECT) operations
The resulting relations of these set operations are sets of tuples;
duplicate tuples are eliminated from the result
The set operations apply only to union compatible relations ; the two
relations must have the same attributes and the attributes must appear
in the same order
Query 7: Make a list of all project numbers for projects that involve an
employee whose last name is 'Smith' as a worker or as a manager of the
department that controls the project.
(SELECT PNAME
FROM PROJECT, DEPARTMENT, EMPLOYEE
WHERE DNUM=DNUMBER AND MGRSSN=SSN AND
LNAME='Smith')
UNION
(SELECT PNAME
FROM PROJECT, WORKS_ON, EMPLOYEE
WHERE PNUMBER=PNO AND ESSN=SSN AND
LNAME='Smith')
32
VEC – CSE IV Semester – II Year – CS8492 – DBMS
NESTING OF QUERIES
A complete SELECT query, called a nested query , can be specified within
the WHERE-clause of another query, called the outer query
Query 8: Retrieve the name and address of all employees who work for the
'Research' department.
Query 9: Retrieve the name of each employee who has a dependent with the
same first name as the employee.
33
VEC – CSE IV Semester – II Year – CS8492 – DBMS
In Q9, the nested query has a different result for each tuple in the outer
query
A query written with nested SELECT... FROM... WHERE... blocks and
using the = or IN comparison operators can always be expressed as a
single block query. For example, Q9 may be written as in Q9A
Q9A
SELECT E.FNAME, E.LNAME
FROM EMPLOYEE E, DEPENDENT D
WHERE E.SSN=D.ESSN AND
E.FNAME=D.DEPENDENT_NAME
1. Not all queries can be expressed in SQL, since SQL does not provide
the full expressive power of a general-purpose language. That is,
there exist queries that can be expressed in a language such as C,
Java, or Cobol that cannot be expressed in SQL. To write such
queries, we can embed SQL within a more powerful language.
2. Non declarative actions—such as printing a report, interacting with a
user, or sending the results of a query to a graphical user interface—
cannot be done from within SQL. Applications usually have several
components, and querying or updating data is only one component;
other components are written in general-purpose programming
languages. For an integrated application, there must be a means to
combine SQL with a general-purpose programming language.
34
VEC – CSE IV Semester – II Year – CS8492 – DBMS
The JDBC standard defines an application program interface (API) that Java
programs can use to connect to database servers.
Register JDBC Driver: This step causes the JVM to load the desired driver
implementation into memory so it can fulfill your JDBC requests.
35
VEC – CSE IV Semester – II Year – CS8492 – DBMS
The Import statements tell the Java compiler where to find the classes you
reference in your code and are placed at the very beginning of your source code.
To use the standard JDBC package, which allows you to select, insert, update, and
delete data in SQL tables, add the following imports to your source code −
You must register the driver in your program before you use it. Registering the
driver is the process by which the Oracle driver's class file is loaded into the
memory, so it can be utilized as an implementation of the JDBC interfaces.
You need to do this registration only once in your program. You can register a
driver in one of two ways.
Approach I - Class.forName()
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
catch(ClassNotFoundException ex) {
36
VEC – CSE IV Semester – II Year – CS8492 – DBMS
System.exit(1);
You can use getInstance() method to work around noncompliant JVMs, but then
you'll have to code for two extra Exceptions as follows −
try {
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
catch(ClassNotFoundException ex) {
System.exit(1);
catch(IllegalAccessException ex) {
System.exit(2);
catch(InstantiationException ex) {
System.exit(3);
Approach II - DriverManager.registerDriver()
The second approach you can use to register a driver, is to use the static
DriverManager.registerDriver() method.
You should use the registerDriver() method if you are using a non-JDK compliant
JVM, such as the one provided by Microsoft.
37
VEC – CSE IV Semester – II Year – CS8492 – DBMS
try {
DriverManager.registerDriver( myDriver );
catch(ClassNotFoundException ex) {
System.exit(1);
After you've loaded the driver, you can establish a connection using the
DriverManager.getConnection() method. For easy reference, let me list the three
overloaded DriverManager.getConnection() methods −
getConnection(String url)
getConnection(String url, Properties prop)
getConnection(String url, String user, String password)
Here each form requires a database URL. A database URL is an address that points
to your database.
Formulating a database URL is where most of the problems associated with
establishing a connection occurs.
38
VEC – CSE IV Semester – II Year – CS8492 – DBMS
Following table lists down the popular JDBC driver names and database URL.
All the highlighted part in URL format is static and you need to change only the
remaining part as per your database setup.
jdbc:oracle:thin:@amrood:1521:EMP
Now you have to call getConnection() method with appropriate username and
password to get a Connection object as follows −
String URL = "jdbc:oracle:thin:@amrood:1521:EMP";
String USER = "username";
String PASS = "password"
Connection conn = DriverManager.getConnection(URL, USER, PASS);
Using Only a Database URL
A second form of the DriverManager.getConnection( ) method requires only a
database URL −
DriverManager.getConnection(String url);
However, in this case, the database URL includes the username and password and
has the following general form −
jdbc:oracle:driver:username/password@database
So, the above connection can be created as follows −
String URL = "jdbc:oracle:thin:username/password@amrood:1521:EMP";
Connection conn = DriverManager.getConnection(URL);
Using a Database URL and a Properties Object
A third form of the DriverManager.getConnection( ) method requires a database
URL and a Properties object −
DriverManager.getConnection(String url, Properties info);
A Properties object holds a set of keyword-value pairs. It is used to pass driver
properties to the driver during a call to the getConnection() method.
To make the same connection made by the previous examples, use the following
code −
import java.util.*;
40
VEC – CSE IV Semester – II Year – CS8492 – DBMS
41
VEC – CSE IV Semester – II Year – CS8492 – DBMS
ODBC
Each database system supporting ODBC provides a library that must be linked
with the client program. When the client program makes an ODBC API call, the
code in the library communicates with the server to carry out the requested
action, and fetch results.
Once the connection is set up, the program can send SQL commands to the
database by using SQLExecDirect. C language variables can be bound to attributes
42
VEC – CSE IV Semester – II Year – CS8492 – DBMS
of the query result, so that when a result tuple is fetched using SQLFetch, its
attribute values are stored in corresponding C variables.
ADO.NET
The ADO.NET API, designed for the Visual Basic .NET and C# languages, provides
functions to access data, which at a high level are not dissimilar to the JDBC
functions, although details differ. Like JDBC and ODBC, theADO.NET API allows
access to results of SQL queries, as well as to metadata, but is considerably
simpler to use than ODBC. A database that supports ODBC can be accessed using
the ADO.NET API, and theADO.NET calls are translated into ODBC calls.
43
VEC – CSE IV Semester – II Year – CS8492 – DBMS
Embedded SQL
To identify embedded SQL requests to the preprocessor, we use the EXEC SQL
statement; it has the form:
The exact syntax for embedded SQL requests depends on the language in which
SQL is embedded. In some languages, such as Cobol, the semicolon is replaced
with END-EXEC.
Before executing any SQL statements, the program must first connect to the
database. This is done using:
The syntax for declaring the variables, however, follows the usual host language
syntax.
44
VEC – CSE IV Semester – II Year – CS8492 – DBMS
Consider the university schema. Assume that we have a host-language vari- able
credit amount in our program, declared as we saw earlier, and that we wish to
find the names of all students who have taken more than credit amount credit
hours. We can write this query as follows:
EXEC SQL
declare c cursor for
select ID, name from student
where tot cred > :credit amount;
SQLJ
The Java embedding of SQL, called SQLJ, provides the same features as other
embedded SQL implementations, but using a different syntax that more closely
matches features already present in Java, such as iterators. For example, SQLJ
uses the syntax #sql instead of EXEC SQL, and instead of cursors, uses the Java
iterator interface to fetch query results.
45
VEC – CSE IV Semester – II Year – CS8492 – DBMS
46
VEC – CSE IV Semester – II Year – CS8492 – DBMS
47
VEC – CSE IV Semester – II Year – CS8492 – DBMS
48
VEC – CSE IV Semester – II Year – CS8492 – DBMS
BASIS FOR
SUPER KEY CANDIDATE KEY
COMPARISON
One in other It is not compulsory that all All candidate keys are
keys.
Selection The set of super keys forms The set of candidate keys
relation.
49