SlideShare a Scribd company logo
1 of 64
ORACLE9I
PERSONAL DATABASES
• Personal database management system, such as Microsoft Access and Visual Fox Pro,
are usually stored on a user’s desktop computer system or client computer.
• These database packages are developed primarily for single-user applications.
• When such a package is used for multiuser or a shared access environment, the
database applications and the data are stored on a file server, or a server, and data are
transmitted to the client computers over the network.
File Server
(Database files)
o Get file requests from clients
o Sends file to clients
o Receives files back
Client Computer #1
(DBMS, Client, Application)
o Sends file request
o Receives files
o Adds, deletes, updates data
o Sends files back
Client Computer #2
(DBMS, Client, Application)
o Sends file request
o Receives files
o Adds, deletes, updates data
o Sends files back
NETWORK
A Personal Database System in a
multiuser environment
• A server is a computer that accepts and services requests from other computers, such as
client computers.
• A server also enables other computers to share resources.
• A server’s resources could include the server’s hard-disk space, application programs on
a server’s hard drive, data stored on the server’s drive, or printers.
• A network is an infrastructure of hardware and software that enables computers to
communicate with each other.
DEMAND ON CLIENT AND NETWORK
• In a network environment with a personal DBMS, the client computer must load the entire
database application along with the client database application in its memory.
• If the client requires a small piece of data from the server’s large database, the server has to
transmit the entire database to the client over the network.
• In some database packages, only part of the database is transmitted.
• In any case, the client computer hardware must handle heavy demand, and the network must
sustain heavy traffic in both directions.
• In the network environment, the system response to various client requests depends on the
speed of the network and the amount of traffic over it.
TABLE LOCKING
• The personal database system assumes that no two transactions will happen at the
same time on one table, which is known as optimistic locking.
• In optimistic locking, the tables aren’t locked by the database system
One Agent -
Another
Agent -
Seat
s
Sell
Basket Ball Game
• The database system will notify the second agent about the update on the table after
his/her read, but it will go ahead and let the second agent sell the seat anyway.
• Application programmers can write code to avoid such as situations, but that requires
added effort on programmers part.
• Personal database software doesn’t lock tables automatically.
• Types
– Read Lock – It allows a user to only read the data from a table.
– Write Lock – It allows a user to do both reading and writing into a table.
SYNTAX
• LOCK TABLES table_name [READ | WRITE];
• LOCK TABLES tab_name1 [READ | WRITE],
tab_name2 [READ | WRITE],...... ;
EXAMPLE 1
EXAMPLE 2
QUERY
CLIENT FAILURE
• When a client is performing record insertions, deletions, or updates, those records are locked by
that client and aren’t available to the other clients.
• If the client with all the record locks fails because of software or hardware malfunction or a power
outage, the locked records stay locked.
• The transactions in progress at the time of failure are lost.
• The database can get corrupted and needs to be repaired.
• To repair the database, all users have to log off during the repair, which can take anywhere from a
few minutes to a few hours.
• If the database is not repairable, data can be restored from the last backup, but the transactions
since the last backup are lost and have to be reentered.
TRANSACTION PROCESSING
• Personal databases, such as Microsoft Access, don’t have file-based transaction logging.
• Transaction are logged in the client’s memory.
• If the client fails in the middle of a batch of transactions, some transactions are written to the
database and some aren’t.
• The transaction log is lost, because it is not stored in a file.
• If a client writes a check to transfer money from a saving account to a checking account, the first
transaction debits money from the saving account.
• Suppose the client fails right after checking account never gets credited with the amount
because the second transaction is lost.
EXAMPLE 1
EXAMPLE 2
EXAMPLE 3
EXAMPLE 4
CLIENT/SERVER DATABASES
• Such as Oracle, run the DBMS as a process on the server and run a client database
application on each client.
• The client application sends a request for data over the network to the server.
• When the server receives the client request, DBMS retrieves data from the database,
performs the required processing on the data, and sends only the requested data back
to the client over the network.
Database Server
(DBMS process)
o Get data requests from clients
o Adds, deletes, updates, filters
data
Client Computer #1
(Client Application)
o Sends data request
o Receives results
o Sends new data
Client Computer #2
(Client Application)
o Sends data request
o Receives results
o Sends new data
NETWORK
A Client/Server Database System
in a multiuser environment
DEMAND ON CLIENT AND NETWORK
• The client computer doesn’t run the entire DBMS, only the client application that requests data
from the server.
• The client doesn’t store any database on its local drive.
• It receives only the requested data from the server.
• Data processing is performed on the server’s side.
• The demand at the client’s end is minimal.
• The clients request data from the server, only the requested data are sent back via the network,
which results in less network traffic.
TABLE LOCKING
• In a client/server system, such as Oracle.
• Example: It is locked totally or partly by the DBMS
• 2nd Agent can’t read the part of the table with available seats.
One Agent -
Another
Agent -
Seat
s
Sell
Basket Ball Game
TABLE LOCKING
• Once the agent sells the seat and its is marked as sold.
• The lock is released for the next agent.
• The DBMS takes care of the locking automatically, and it
involves no extra effort on an application programmer’s part.
CLIENT FAILURE
• In case of a client failure, the client/server database is not affected.
• The other clients aren’t affected either.
• Only the failed client’s transactions in progress are lost.
• If the server fails, a central transaction log, which keeps a log of all current database changes,
allows the Database Administrator (DBS) or DBMS to complete or rollback unfinished
transactions.
• The rolled-back transactions aren’t implemented in the database.
• The DBA can notify clients to resubmit rolled-back transactions.
• Most client/server database packages have fast and powerful recovery utilities.
TRANSACTION PROCESSING
• If a grouped transaction or batch transaction fails in the middle, all transactions are
rolled back.
• The DBMS will enable the bank.
• Example: To make sure that both account’s balances are changed if the batch
transaction goes through.
• If the batch transaction fails, the balance in none of the accounts is changed.
ORACLE9I - INTRODUCTION
• Oracle stands for One Rich Arshole Called Larry Ellsion, Optimum Reliability and
Component Life Estimator, Outdoor Research and Community Learning Environment.
Headquarters
Redwood City,
California, US
CIA - funded project Ellison had worked on while formerly employed by
Ampex.
Larry Ellison (Supervisor), Bob Miner, Ed Oates
16, June 1977 Computer Programmers American Electronics
Company Ampex
Corporation
Founded/First Name Santa Clara
Larry Ellison (CEO, Oracle Corporation)
• It is a client/server DBMS that is based on the relational database model.
• Most database software packages available today.
• Oracle Corporation incorporated in 1986, is second-largest software company in the
world.
• Software product line  Oracle9i Database, Oracle9i Application Server, Oracle9i
Developer Suite, Oracle Collaboration Suite, Oracle E-Business Suite.
• Oracle Corporation's revenue $9.475 billion in fiscal year ending in may 2003, down 2%
from previous year.
• Stock traders more than $14, with a company market capitalization of more that $75
billion.
• It is capable of supporting over 10,000 simultaneous users and size upto 10 TB (terabytes).
• It is preferred to the other PC based RDBMS packages because its client/server database
qualities, failure handling, recovery management, administrative tools to manage users
database, object-oriented capabilities, GUI tools and web interface capabilities.
• It is widely used by corporation of all sizes to develop mission-critical applications.
• It is also used as a teaching tool by educational institutions to teach object-relational database
technology, Structured Query Language(SQL), PL/SQL (Oracle’s procedural Language
extension to SQL), and interfacing web and Oracle databases.
• Oracle Educational Initiative Partnerships  Educational Institutions  Oracle Database Software
at a nominal membership fee.
• Oracle software is installed to work in three different environments.
– Stand-alone environment  laptop/desktop on a network
– Oracle Enterprise Database Software  resides on the server side
– SQL * Plus Client Software  resides on the client machine
• All installed on same machine.
• In Client/Server environment, a two-tier architecture with a client communicating with a server.
• In three-tier architecture, the client communicates with the Oracle database server through a
• middle-tier iSQL * Plus, an interface through a Web browser.
• Oracle components  Oracle9i Database, Oracle9i Application Server, Oracle9i Developer Suit
• Oracle9i Database  Oracle9i Real Application Cluster
– Replaces Oracle Parallel Server
– Features  Integrated system management, high availability, powerful disaster recovery, system fault reco
– planned downtime and high security.
• Oracle9i Application Server is industry’s preferred application server for database-driven
websites, with an innovative and comprehensive set of middle-tier services.
• Oracle9i Developer Suite, an integrated product, provides a high-performance
development environment with tools  Oracle Forms Developer, Oracle Designer,
Oracle JDeveloper, Oracle Reports Developer, and Oracle Discoverer.
Tools Details
SQL*Plus Environment is for writing command-line SQL queries to work with database objects such
as tables, views, synonyms and sequences.
PL/SQL It is Oracle’s extension to SQL for creating procedural code to manipulate data
Developer Suite
• JDeveloper
• Designer
• Forms Developer
• Oracle Reports
It is used for developing database applications
 A Java Development Tool
 To model business process and generate Enterprise Applications
 A development tool for Internet and Client/Server based environments.
 A Report generation tool
Enterprise Manager
• Storage Manager
• Instance Manager
• Security Manager
• Warehouse Manager
• XML Database
Manager
• SQL Worksheet
• iSQL*Plus
A tool for managing users and databases.
 To create and manage “tablespaces”
 To start, stop or tune databases
 To create and manage users, profiles and roles
 To manage data warehousing applications
 To render traditional database data as XML for E-Business support
 To enter, edit and execute SQL*Plus code or to run client side scripts
 A web-based environment to execute SQL*Plus code
Oracle Application
Server (Oracle9iAS)
• Web server
A tool for creating a website that allows users to access Oracle databases through Web
pages.
THE SQL*PLUS ENVIRONMENT
• When a user logs in to connect to the Oracle server.
• SQL*Plus provides the user with the SQL> prompt, where the user writes queries or
commands.
• Features:
• Accepts ad hoc entry of statements at the command line prompt
• Accepts SQL statements from files.
• Provides a line editor for modifying SQL queries.
• Provides environment, editor, format, execution, interaction, and file commands.
• Formats query results and displays reports on the screen.
• Controls environmental settings.
• Accesses local and remote databases.
STRUCTURED QUERY LANGUAGE
(SQL)
• The standard query language for relational databases is SQL.
• It is standardized and accepted by ANSI(American National Standards Institute) and
ISO(International Organization for Standardization).
• SQL  4th Generation, high-level, nonprocedural language.
• 3rd Generation  Compiler languages  C, COBOL, Visual Basic are procedural.
• Using nonprocedural language query, a user requests data from the RDBMS.
• The SQL language uses English-like commands  CREATE, INSERT, DELETE, UPDATE
AND DROP.
• SQL language is standardized and its syntax is the same across most RDBMS packages.
• The different packages have minor variations and do support some additional commands
• Oracle’s SQL is different from the ANSI SQL and referred to as SQL*, simply call it SQL
throughout this text.
• Oracle9i also supports ANSI syntax for joining tables.
Tools Explanation Example
Data retrieval
Data Query
Language (DQL)
It retrieves data from the database SELECT
Data Manipulation
Language (DML)
It inserts new rows, changes existing
rows and removes unwanted rows
INSERT, UPDATE, DELETE
Data Definition
Language (DDL)
It creates, changes, removes a table’s
structure
CREATE, ALTER, RENAME, DROP,
TRUNCATE
Transaction
Control
It manages and changes logical
transactions. Transactions are changes
made to the data by DML statements
that are grouped together
COMMIT, SAVEPOINT, ROLLBACK
Data Control
Language (DCL)
It gives and removes rights to Oracle
objects
GRANT, REVOKE
LOGGING INTO SQL*PLUS
• In the Windows environment, click Start | Programs | Oracle – Orahome92 |
Application Development | SQL Plus.
• A log on window will pop up.
• Enter your username, password and Host String as provided by your Database
Administrator.
• In a command-line environment such as DOS, type SQL Plus
[username[/password[@host/database]]] to log in.
• If the entire commands is typed, the password will be visible on the screen.
• If you enter your username only, a prompt will be displayed for your password.
SQL * PLUS LOG ON WINDOW
RUNNING SQL*PLUS FROM MS-DOS
PROMPT
• The password typed at this prompt will be masked to maintain its integrity.
• There are a couple of common login problems.
If you enter an incorrect
username or password, you will
receive error message
ORA-01011:invalid
username/password; logon
denied
User should consult DBA to resolve
username/password problems
If there is a connectivity issue
between your client PC and
Oracle or the host string has an
invalid entry
ORA-12154:TNS: could not
resolve service name
Oracle stores host string/service
values in a file called
TNSNAME.ORA.
If you receive a TNS error, call your
DBA!
• After a user logs in and the default SQL> prompt is displayed, the user can start a new
Oracle session.
• A user can enter only on e SQL*Plus command at the SQL> prompt at a time.
• SQL*Plus commands aren’t stored in the buffer.
• If a command is very long, you can continue on the next line by using a hyphen at the
end of the current line.
SQL * PLUS ENVIRONMENT – SQL
PROMPT
SQL*PLUS COMMANDS
• The command words are in bold letters, and user-supplied filenames and extensions
are in lowercase.
• The abbreviation allowed for the SQL*Plus commands are underlined.
• The optional parameters are enclosed within a pair of brackets ([]).
• The filename in the file-related commands requires entire file path.
SQL QUERIES VERSUS SQL*PLUS
COMMANDS
SQL SQL Plus
A nonprocedural language to communicate
the Oracle server
An environment for executing SQL statements
ANSI Standard Oracle’s proprietary environment
Keywords can’t be abbreviated Keywords can be abbreviated
Last statement is stored in the buffer Commands aren’t stored in the buffer
Statements manipulate data and table
in the database
Commands don’t allow manipulation of data in
the database
Uses a termination character to execute the
command immediately
Commands don’t need a termination character
PASSWORD COMMAND
SQL*PLUS FILE-RELATED COMMANDS
COMMAND DESCRIPTION
GET filename [.ext] Writes previously saved file to the buffer. The default
extension is SQL. Writes SQL statements, not SQL*Plus
commands
START filename [.ext] Runs a previously saved command from file
@filename Same as START
EDIT Invokes the default editor (Example: Notepad), and saves
buffer contents in a file called afiedt.buf
EDIT [filename [.ext]] Invokes editor with the command from a saved file
SAVE filename [.ext] REPLACE |
APPEND
Saves current buffer contents to a file with the option to
replace append
SPOOL [filename [.ext] | OFF | Stores query results in a file. OFF closes the file, and OUT
sends the file to the system printer
EXIT Leaves SQL*Plus environment. Commits current transaction
SQL*PLUS EDITING COMMANDS
COMMAND DESCRIPTION
APPEND text Adds text to the end of the current line
CHANGE / old / new Changes old text to new text in the current line
CHANGE / text Deletes text from the current line
CLEAR BUFFER Deletes all lines from the SQL buffer
DEL Deletes current line
DEL n Deletes line n
DEL m n Deletes lines m through n
INPUT Inserts an indefinite number of lines
INPUT text Inserts a line of text
LIST Lists all lines from the SQL buffer
LIST n Lists line n
LIST m n Lists line m through n
RUN Displays and runs an SQL statement in the buffer
N Makes line N current
n text Replaces lines n with text
0 text Inserts a line before line 1
CLEAR SCREEN Clears screen
FORMATTED REPORT
Buffer
SQL*Plus Server
SQL Queries
SQL Queries
SQL * Plus Commands
Result
• A query typed at the prompt is loaded in to the SQL*Plus buffer.
• When the query is sent to the server, the server processes data and sends back the result
to the client computer, which can be formatted using SQL*Plus formatting commands
ORACLE ERRORS AND ONLINE HELP
• SQL*Plus prompt you make a syntax error, Oracle will display an error message showing
the line number and the error location on that line.
• Oracle places an asterisk (*) at the location of the error and also displays an error code,
followed by a brief description.
• Any programming language compiler, some error messages aren’t user friendly and get
used to some of the common error messages as you start experimenting.
• Some queries take up a few lines – and for a typist like typing mistake are bound to
happened.
• Some errors are easy to find and aren’t.
• To fix an error, always start at the line where the error is shown, but keep in mind that the
error might not be on that line.
• Check for common mistakes like misspelled keywords, missing commas, misplaced commas, miss
parentheses, invalid user-defined names or repeated user-defined identifiers.
• Each Oracle product has its own specific help file.
• The help application opens up a window, similar to Microsoft Windows help, you can click on the
Index
• tab and type error code
• Example: ORA-00XXXX
• It provides the user with an explanation of the cause of the error and the user action required to
• rectify it.
• Oracle Help option in the programs menu, search for ora.hlp file and open it.
• Online help line
• https://docs.oracle.com/cd/B19306_01/server.102/b14219.pdf
• https://www.oracle.com/support/
• http://download-west.oracle.com/docs/cd/B10501_01/mix.920/a99625/toc.htm
• The URL is working at this time, but such URL’s change frequently.
• Oracle’s Home page (www.oracle.com) and search for help on your Oracle product.
• Register  Oracle Technology Network (otn.oracle.com) to access this page is free and
membership benefits include free software downloads and also access to online
documentation.
• SQL*Plus also provides the user with Help on its various commands and SQL language.
• HELP INDEX command at SQL>prompt to list the SQL*Plus commands type INDEX
[TOPIC] and HELP DESCRIBE
• SQL*Plus returns a brief description and syntax on the topic.
ALTERNATE TEXT EDITORS
• The SQL*Plus editor is a line editor similar to EDLIN in MS-DOS.
• It is not fun working with line editors.
• The user doesn’t have control over the screen.
• Line editors don’t allow a user to move the cursor up and down, and clicking with a
mouse is definitely out of the question.
• An alternate text editor such as Notepad or any other text editor in Windows to type your
SQL queries.
• The query typed in a full-screen text editor has to be saved in a file with an .sql extension
or copied to the clipboard.
ONLINE DOCUMENTATION – INDEX PAGE
• The query can be loaded from a file or pasted from the clipboard into SQL*Plus to
execute it at the SQL>prompt.
• The Edit command can be used to invoke an alternate text editor from the SQL*Plus
command prompt.
• SQL*Plus allows the user to select an alternate editor, and in most cases, Window’s
popular text editor, Notepad, is the default alternate editor.
• The EDIT command involves the alternated editor the contents from the buffer or with an
existing file.
• The user can make necessary changes to the query and transfer the contents back to
SQL*Plus.
ALTERNATE EDITOR
SQL*PLUS WORKSHEET
• The SQL*Plus Worksheet is another environment available with Oracle’s Enterprise
Manager.
• It enables to enter, edit and execute SQL*Plus code and run client-side scripts.
• It maintains a history of the commands you have issued, so can easily retrieve and execute
previous commands.
• By double-clicking on the SQL*Plus Worksheet icon in the windows desktop.
START ] [All] Programs | Oracle –
OraHome92
Application Development | SQL Plus
Worksheet
• An Enterprise Manager login screen is the displayed.
• The user logs in with username, password and host string like
logging into SQL*Plus.
• On a successful login, the user enters the SQL*Plus Worksheet
with database connection.
• On left side, a tool bar is displayed with connection, execute,
command history, previous command, next command and
help icons from top to bottom, respectively.
• The user can select same options from the file or Worksheet
menu.
• The SQL*Plus Worksheet screen has two horizontal halves.
• The user issues an SQL query or SQL*Plus command in the upper half and then clicks on
the lightening bolt icon to execute it.
• It output is displayed in the lower half.
• During a session, the user issues many commands and statements.
• Unlike SQL*Plus Worksheet keeps all commands and statements in history.
• The user can click on the command history icon to view them in reverse order, with the
most recent command at the top.
• The user can the select a command/statement and click GET to load it again and execute
it.
The SQL Plus system variable SQL PROMPT is disabled by default
The SQL Plus system variable SQL NUMBER is set to OFF by default.
The SQL Plus system variable PAGE SIZE is set to its maximum by default.
The SQL Plus system variable TAB is set to OFF by default.
If there are any prompt characters “&” in a script, SQL*Plus treats its as a “define” prompt.
The HOST command is not supported in SQL*Plus Worksheet
The SQL*Plus user variable_EDITOR is disabled by default. If you enable is by using “DEFINE_EDITOR
‘editorname’,” the specified editor launches on the server when you type EDIT command. As a result,
are unable to access normal SQL*Plus Worksheet functionalities.
Remote execution is not supported
Remote load and save of script files is not supported

More Related Content

What's hot

HTTP Presentation
HTTP Presentation HTTP Presentation
HTTP Presentation Lana Dujanovic
 
Internet server components
Internet server componentsInternet server components
Internet server componentsJay Patel
 
Web server hardware and software
Web server hardware and softwareWeb server hardware and software
Web server hardware and softwareHumma Rashid
 
HTTP Definition and Basics.
HTTP Definition and Basics.HTTP Definition and Basics.
HTTP Definition and Basics.Halah Salih
 
introduction for web connectivity (IoT)
introduction for web connectivity (IoT)introduction for web connectivity (IoT)
introduction for web connectivity (IoT)FabMinds
 
HTTP & WWW
HTTP & WWWHTTP & WWW
HTTP & WWWRazanAlsaif
 
Web Server Technologies II: Web Applications & Server Maintenance
Web Server Technologies II: Web Applications & Server MaintenanceWeb Server Technologies II: Web Applications & Server Maintenance
Web Server Technologies II: Web Applications & Server MaintenancePort80 Software
 
Hypertex transfer protocol
Hypertex transfer protocolHypertex transfer protocol
Hypertex transfer protocolwanangwa234
 
Basic Server PPT (THDC)
Basic Server PPT (THDC)Basic Server PPT (THDC)
Basic Server PPT (THDC)Vineet Pokhriyal
 
Http Introduction
Http IntroductionHttp Introduction
Http IntroductionAkshay Dhole
 
Web technologies: recap on TCP-IP
Web technologies: recap on TCP-IPWeb technologies: recap on TCP-IP
Web technologies: recap on TCP-IPPiero Fraternali
 
Hypertext Transfer Protocol
Hypertext Transfer ProtocolHypertext Transfer Protocol
Hypertext Transfer ProtocolRajan Pandey
 
Hypertext Transfer Protocol
Hypertext Transfer ProtocolHypertext Transfer Protocol
Hypertext Transfer ProtocolShubham Srivastava
 
HTTP & HTML & Web
HTTP & HTML & WebHTTP & HTML & Web
HTTP & HTML & WebPeter R. Egli
 
HTTP Basic
HTTP BasicHTTP Basic
HTTP BasicJoshua Yoon
 
Servlets as introduction (Advanced programming)
Servlets as introduction (Advanced programming)Servlets as introduction (Advanced programming)
Servlets as introduction (Advanced programming)Gera Paulos
 

What's hot (20)

HTTP Presentation
HTTP Presentation HTTP Presentation
HTTP Presentation
 
Internet server components
Internet server componentsInternet server components
Internet server components
 
The HTTP and Web
The HTTP and Web The HTTP and Web
The HTTP and Web
 
Web technology unit I - Part B
Web technology unit I - Part BWeb technology unit I - Part B
Web technology unit I - Part B
 
Web server hardware and software
Web server hardware and softwareWeb server hardware and software
Web server hardware and software
 
Http
HttpHttp
Http
 
HTTP Definition and Basics.
HTTP Definition and Basics.HTTP Definition and Basics.
HTTP Definition and Basics.
 
introduction for web connectivity (IoT)
introduction for web connectivity (IoT)introduction for web connectivity (IoT)
introduction for web connectivity (IoT)
 
HTTP & WWW
HTTP & WWWHTTP & WWW
HTTP & WWW
 
Web Server Technologies II: Web Applications & Server Maintenance
Web Server Technologies II: Web Applications & Server MaintenanceWeb Server Technologies II: Web Applications & Server Maintenance
Web Server Technologies II: Web Applications & Server Maintenance
 
Hypertex transfer protocol
Hypertex transfer protocolHypertex transfer protocol
Hypertex transfer protocol
 
Basic Server PPT (THDC)
Basic Server PPT (THDC)Basic Server PPT (THDC)
Basic Server PPT (THDC)
 
Http Introduction
Http IntroductionHttp Introduction
Http Introduction
 
Web technologies: recap on TCP-IP
Web technologies: recap on TCP-IPWeb technologies: recap on TCP-IP
Web technologies: recap on TCP-IP
 
Hypertext Transfer Protocol
Hypertext Transfer ProtocolHypertext Transfer Protocol
Hypertext Transfer Protocol
 
Hypertext Transfer Protocol
Hypertext Transfer ProtocolHypertext Transfer Protocol
Hypertext Transfer Protocol
 
HTTP & HTML & Web
HTTP & HTML & WebHTTP & HTML & Web
HTTP & HTML & Web
 
Web
WebWeb
Web
 
HTTP Basic
HTTP BasicHTTP Basic
HTTP Basic
 
Servlets as introduction (Advanced programming)
Servlets as introduction (Advanced programming)Servlets as introduction (Advanced programming)
Servlets as introduction (Advanced programming)
 

Similar to Database Management System - 2a

Unit 2 oracle9i
Unit 2  oracle9i Unit 2  oracle9i
Unit 2 oracle9i DrkhanchanaR
 
UNIT3 DBMS.pptx operation nd management of data base
UNIT3 DBMS.pptx operation nd management of data baseUNIT3 DBMS.pptx operation nd management of data base
UNIT3 DBMS.pptx operation nd management of data baseshindhe1098cv
 
Beginning Of DBMS (data base)
Beginning Of DBMS (data base)Beginning Of DBMS (data base)
Beginning Of DBMS (data base)Surya Swaroop
 
Odbc and data access objects
Odbc and data access objectsOdbc and data access objects
Odbc and data access objectsSangeetha Sg
 
Case Study For Replication For PCMS
Case Study For Replication For PCMSCase Study For Replication For PCMS
Case Study For Replication For PCMSShahzad
 
Client server architecture
Client server architectureClient server architecture
Client server architectureRituBhargava7
 
Planning For Catastrophe with IBM WAS and IBM BPM
Planning For Catastrophe with IBM WAS and IBM BPMPlanning For Catastrophe with IBM WAS and IBM BPM
Planning For Catastrophe with IBM WAS and IBM BPMWASdev Community
 
Technical Architectures
Technical ArchitecturesTechnical Architectures
Technical ArchitecturesDamian T. Gordon
 
Advance database system (part 2)
Advance database system (part 2)Advance database system (part 2)
Advance database system (part 2)Abdullah Khosa
 
dbms ppt.pptx database management system
dbms ppt.pptx database management systemdbms ppt.pptx database management system
dbms ppt.pptx database management systemdeeptipal230
 
Database & Database Users
Database & Database UsersDatabase & Database Users
Database & Database UsersM.Zalmai Rahmani
 
Database Administration & Management - 01
Database Administration & Management - 01Database Administration & Management - 01
Database Administration & Management - 01FaisalMashood
 
DBAM-01.pdf
DBAM-01.pdfDBAM-01.pdf
DBAM-01.pdfhania80
 
CST204 DBMSMODULE1 PPT (1).pptx
CST204 DBMSMODULE1 PPT (1).pptxCST204 DBMSMODULE1 PPT (1).pptx
CST204 DBMSMODULE1 PPT (1).pptxMEGHANA508383
 
4. system models
4. system models4. system models
4. system modelsAbDul ThaYyal
 
adap-stability-202310.pptx
adap-stability-202310.pptxadap-stability-202310.pptx
adap-stability-202310.pptxMichael Ming Lei
 
Introduction to the client server computing By Attaullah Hazrat
Introduction to the client server computing By Attaullah HazratIntroduction to the client server computing By Attaullah Hazrat
Introduction to the client server computing By Attaullah HazratAttaullah Hazrat
 
Server its functions and types.pptx
Server its functions and types.pptxServer its functions and types.pptx
Server its functions and types.pptxDrIrfanulHaqAkhoon
 
Functions of database management systems
Functions of database management systemsFunctions of database management systems
Functions of database management systemsUZAIR UDDIN SHAIKH
 

Similar to Database Management System - 2a (20)

Unit 2 oracle9i
Unit 2  oracle9i Unit 2  oracle9i
Unit 2 oracle9i
 
UNIT3 DBMS.pptx operation nd management of data base
UNIT3 DBMS.pptx operation nd management of data baseUNIT3 DBMS.pptx operation nd management of data base
UNIT3 DBMS.pptx operation nd management of data base
 
Beginning Of DBMS (data base)
Beginning Of DBMS (data base)Beginning Of DBMS (data base)
Beginning Of DBMS (data base)
 
Odbc and data access objects
Odbc and data access objectsOdbc and data access objects
Odbc and data access objects
 
Case Study For Replication For PCMS
Case Study For Replication For PCMSCase Study For Replication For PCMS
Case Study For Replication For PCMS
 
Client server architecture
Client server architectureClient server architecture
Client server architecture
 
Planning For Catastrophe with IBM WAS and IBM BPM
Planning For Catastrophe with IBM WAS and IBM BPMPlanning For Catastrophe with IBM WAS and IBM BPM
Planning For Catastrophe with IBM WAS and IBM BPM
 
Technical Architectures
Technical ArchitecturesTechnical Architectures
Technical Architectures
 
Advance database system (part 2)
Advance database system (part 2)Advance database system (part 2)
Advance database system (part 2)
 
dbms ppt.pptx database management system
dbms ppt.pptx database management systemdbms ppt.pptx database management system
dbms ppt.pptx database management system
 
Database & Database Users
Database & Database UsersDatabase & Database Users
Database & Database Users
 
Database Administration & Management - 01
Database Administration & Management - 01Database Administration & Management - 01
Database Administration & Management - 01
 
DBAM-01.pdf
DBAM-01.pdfDBAM-01.pdf
DBAM-01.pdf
 
PHP/MySQL First Session Material
PHP/MySQL First Session MaterialPHP/MySQL First Session Material
PHP/MySQL First Session Material
 
CST204 DBMSMODULE1 PPT (1).pptx
CST204 DBMSMODULE1 PPT (1).pptxCST204 DBMSMODULE1 PPT (1).pptx
CST204 DBMSMODULE1 PPT (1).pptx
 
4. system models
4. system models4. system models
4. system models
 
adap-stability-202310.pptx
adap-stability-202310.pptxadap-stability-202310.pptx
adap-stability-202310.pptx
 
Introduction to the client server computing By Attaullah Hazrat
Introduction to the client server computing By Attaullah HazratIntroduction to the client server computing By Attaullah Hazrat
Introduction to the client server computing By Attaullah Hazrat
 
Server its functions and types.pptx
Server its functions and types.pptxServer its functions and types.pptx
Server its functions and types.pptx
 
Functions of database management systems
Functions of database management systemsFunctions of database management systems
Functions of database management systems
 

More from SSN College of Engineering, Kalavakkam

More from SSN College of Engineering, Kalavakkam (20)

ECG
ECG ECG
ECG
 
Localization, Classification, and Evaluation.pdf
Localization, Classification, and Evaluation.pdfLocalization, Classification, and Evaluation.pdf
Localization, Classification, and Evaluation.pdf
 
ADBMS 3a
ADBMS   3aADBMS   3a
ADBMS 3a
 
Exercise 5
Exercise   5Exercise   5
Exercise 5
 
ADBMS Unit-II c
ADBMS Unit-II cADBMS Unit-II c
ADBMS Unit-II c
 
ADBMS Unit-II b
ADBMS Unit-II bADBMS Unit-II b
ADBMS Unit-II b
 
Database Management System
Database Management SystemDatabase Management System
Database Management System
 
Unit III - Inventory Problems
Unit III - Inventory ProblemsUnit III - Inventory Problems
Unit III - Inventory Problems
 
Unit II B - Game Theory
Unit II B - Game TheoryUnit II B - Game Theory
Unit II B - Game Theory
 
Unit II A - Game Theory
Unit II A - Game TheoryUnit II A - Game Theory
Unit II A - Game Theory
 
Unit V - Queuing Theory
Unit V - Queuing TheoryUnit V - Queuing Theory
Unit V - Queuing Theory
 
Unit IV-Project Management
Unit IV-Project ManagementUnit IV-Project Management
Unit IV-Project Management
 
Unit I-B
Unit I-BUnit I-B
Unit I-B
 
Unit I-A
Unit I-AUnit I-A
Unit I-A
 
Web technology Unit-II Part-C
Web technology Unit-II Part-CWeb technology Unit-II Part-C
Web technology Unit-II Part-C
 
Data structure Unit-I Part-C
Data structure Unit-I Part-CData structure Unit-I Part-C
Data structure Unit-I Part-C
 
Data structure unit I part B
Data structure unit I part BData structure unit I part B
Data structure unit I part B
 
Web technology Unit-II Part A
Web technology Unit-II Part AWeb technology Unit-II Part A
Web technology Unit-II Part A
 
Data structure Unit-I Part A
Data structure Unit-I Part AData structure Unit-I Part A
Data structure Unit-I Part A
 
Web technology unit I - Part A
Web technology unit I -  Part AWeb technology unit I -  Part A
Web technology unit I - Part A
 

Recently uploaded

call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 

Recently uploaded (20)

call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 

Database Management System - 2a

  • 2. PERSONAL DATABASES • Personal database management system, such as Microsoft Access and Visual Fox Pro, are usually stored on a user’s desktop computer system or client computer. • These database packages are developed primarily for single-user applications. • When such a package is used for multiuser or a shared access environment, the database applications and the data are stored on a file server, or a server, and data are transmitted to the client computers over the network.
  • 3. File Server (Database files) o Get file requests from clients o Sends file to clients o Receives files back Client Computer #1 (DBMS, Client, Application) o Sends file request o Receives files o Adds, deletes, updates data o Sends files back Client Computer #2 (DBMS, Client, Application) o Sends file request o Receives files o Adds, deletes, updates data o Sends files back NETWORK A Personal Database System in a multiuser environment
  • 4. • A server is a computer that accepts and services requests from other computers, such as client computers. • A server also enables other computers to share resources. • A server’s resources could include the server’s hard-disk space, application programs on a server’s hard drive, data stored on the server’s drive, or printers. • A network is an infrastructure of hardware and software that enables computers to communicate with each other.
  • 5. DEMAND ON CLIENT AND NETWORK • In a network environment with a personal DBMS, the client computer must load the entire database application along with the client database application in its memory. • If the client requires a small piece of data from the server’s large database, the server has to transmit the entire database to the client over the network. • In some database packages, only part of the database is transmitted. • In any case, the client computer hardware must handle heavy demand, and the network must sustain heavy traffic in both directions. • In the network environment, the system response to various client requests depends on the speed of the network and the amount of traffic over it.
  • 6. TABLE LOCKING • The personal database system assumes that no two transactions will happen at the same time on one table, which is known as optimistic locking. • In optimistic locking, the tables aren’t locked by the database system One Agent - Another Agent - Seat s Sell Basket Ball Game
  • 7. • The database system will notify the second agent about the update on the table after his/her read, but it will go ahead and let the second agent sell the seat anyway. • Application programmers can write code to avoid such as situations, but that requires added effort on programmers part. • Personal database software doesn’t lock tables automatically. • Types – Read Lock – It allows a user to only read the data from a table. – Write Lock – It allows a user to do both reading and writing into a table.
  • 8. SYNTAX • LOCK TABLES table_name [READ | WRITE]; • LOCK TABLES tab_name1 [READ | WRITE], tab_name2 [READ | WRITE],...... ;
  • 11. QUERY
  • 12. CLIENT FAILURE • When a client is performing record insertions, deletions, or updates, those records are locked by that client and aren’t available to the other clients. • If the client with all the record locks fails because of software or hardware malfunction or a power outage, the locked records stay locked. • The transactions in progress at the time of failure are lost. • The database can get corrupted and needs to be repaired. • To repair the database, all users have to log off during the repair, which can take anywhere from a few minutes to a few hours. • If the database is not repairable, data can be restored from the last backup, but the transactions since the last backup are lost and have to be reentered.
  • 13. TRANSACTION PROCESSING • Personal databases, such as Microsoft Access, don’t have file-based transaction logging. • Transaction are logged in the client’s memory. • If the client fails in the middle of a batch of transactions, some transactions are written to the database and some aren’t. • The transaction log is lost, because it is not stored in a file. • If a client writes a check to transfer money from a saving account to a checking account, the first transaction debits money from the saving account. • Suppose the client fails right after checking account never gets credited with the amount because the second transaction is lost.
  • 18. CLIENT/SERVER DATABASES • Such as Oracle, run the DBMS as a process on the server and run a client database application on each client. • The client application sends a request for data over the network to the server. • When the server receives the client request, DBMS retrieves data from the database, performs the required processing on the data, and sends only the requested data back to the client over the network.
  • 19. Database Server (DBMS process) o Get data requests from clients o Adds, deletes, updates, filters data Client Computer #1 (Client Application) o Sends data request o Receives results o Sends new data Client Computer #2 (Client Application) o Sends data request o Receives results o Sends new data NETWORK A Client/Server Database System in a multiuser environment
  • 20. DEMAND ON CLIENT AND NETWORK • The client computer doesn’t run the entire DBMS, only the client application that requests data from the server. • The client doesn’t store any database on its local drive. • It receives only the requested data from the server. • Data processing is performed on the server’s side. • The demand at the client’s end is minimal. • The clients request data from the server, only the requested data are sent back via the network, which results in less network traffic.
  • 21. TABLE LOCKING • In a client/server system, such as Oracle. • Example: It is locked totally or partly by the DBMS • 2nd Agent can’t read the part of the table with available seats. One Agent - Another Agent - Seat s Sell Basket Ball Game
  • 22. TABLE LOCKING • Once the agent sells the seat and its is marked as sold. • The lock is released for the next agent. • The DBMS takes care of the locking automatically, and it involves no extra effort on an application programmer’s part.
  • 23. CLIENT FAILURE • In case of a client failure, the client/server database is not affected. • The other clients aren’t affected either. • Only the failed client’s transactions in progress are lost. • If the server fails, a central transaction log, which keeps a log of all current database changes, allows the Database Administrator (DBS) or DBMS to complete or rollback unfinished transactions. • The rolled-back transactions aren’t implemented in the database. • The DBA can notify clients to resubmit rolled-back transactions. • Most client/server database packages have fast and powerful recovery utilities.
  • 24. TRANSACTION PROCESSING • If a grouped transaction or batch transaction fails in the middle, all transactions are rolled back. • The DBMS will enable the bank. • Example: To make sure that both account’s balances are changed if the batch transaction goes through. • If the batch transaction fails, the balance in none of the accounts is changed.
  • 25. ORACLE9I - INTRODUCTION • Oracle stands for One Rich Arshole Called Larry Ellsion, Optimum Reliability and Component Life Estimator, Outdoor Research and Community Learning Environment.
  • 26. Headquarters Redwood City, California, US CIA - funded project Ellison had worked on while formerly employed by Ampex. Larry Ellison (Supervisor), Bob Miner, Ed Oates 16, June 1977 Computer Programmers American Electronics Company Ampex Corporation Founded/First Name Santa Clara Larry Ellison (CEO, Oracle Corporation)
  • 27.
  • 28.
  • 29.
  • 30. • It is a client/server DBMS that is based on the relational database model. • Most database software packages available today. • Oracle Corporation incorporated in 1986, is second-largest software company in the world. • Software product line  Oracle9i Database, Oracle9i Application Server, Oracle9i Developer Suite, Oracle Collaboration Suite, Oracle E-Business Suite. • Oracle Corporation's revenue $9.475 billion in fiscal year ending in may 2003, down 2% from previous year. • Stock traders more than $14, with a company market capitalization of more that $75 billion.
  • 31. • It is capable of supporting over 10,000 simultaneous users and size upto 10 TB (terabytes). • It is preferred to the other PC based RDBMS packages because its client/server database qualities, failure handling, recovery management, administrative tools to manage users database, object-oriented capabilities, GUI tools and web interface capabilities. • It is widely used by corporation of all sizes to develop mission-critical applications. • It is also used as a teaching tool by educational institutions to teach object-relational database technology, Structured Query Language(SQL), PL/SQL (Oracle’s procedural Language extension to SQL), and interfacing web and Oracle databases. • Oracle Educational Initiative Partnerships  Educational Institutions  Oracle Database Software at a nominal membership fee.
  • 32. • Oracle software is installed to work in three different environments. – Stand-alone environment  laptop/desktop on a network – Oracle Enterprise Database Software  resides on the server side – SQL * Plus Client Software  resides on the client machine • All installed on same machine. • In Client/Server environment, a two-tier architecture with a client communicating with a server. • In three-tier architecture, the client communicates with the Oracle database server through a • middle-tier iSQL * Plus, an interface through a Web browser. • Oracle components  Oracle9i Database, Oracle9i Application Server, Oracle9i Developer Suit • Oracle9i Database  Oracle9i Real Application Cluster – Replaces Oracle Parallel Server – Features  Integrated system management, high availability, powerful disaster recovery, system fault reco – planned downtime and high security.
  • 33. • Oracle9i Application Server is industry’s preferred application server for database-driven websites, with an innovative and comprehensive set of middle-tier services. • Oracle9i Developer Suite, an integrated product, provides a high-performance development environment with tools  Oracle Forms Developer, Oracle Designer, Oracle JDeveloper, Oracle Reports Developer, and Oracle Discoverer.
  • 34. Tools Details SQL*Plus Environment is for writing command-line SQL queries to work with database objects such as tables, views, synonyms and sequences. PL/SQL It is Oracle’s extension to SQL for creating procedural code to manipulate data Developer Suite • JDeveloper • Designer • Forms Developer • Oracle Reports It is used for developing database applications  A Java Development Tool  To model business process and generate Enterprise Applications  A development tool for Internet and Client/Server based environments.  A Report generation tool Enterprise Manager • Storage Manager • Instance Manager • Security Manager • Warehouse Manager • XML Database Manager • SQL Worksheet • iSQL*Plus A tool for managing users and databases.  To create and manage “tablespaces”  To start, stop or tune databases  To create and manage users, profiles and roles  To manage data warehousing applications  To render traditional database data as XML for E-Business support  To enter, edit and execute SQL*Plus code or to run client side scripts  A web-based environment to execute SQL*Plus code Oracle Application Server (Oracle9iAS) • Web server A tool for creating a website that allows users to access Oracle databases through Web pages.
  • 35. THE SQL*PLUS ENVIRONMENT • When a user logs in to connect to the Oracle server. • SQL*Plus provides the user with the SQL> prompt, where the user writes queries or commands. • Features: • Accepts ad hoc entry of statements at the command line prompt • Accepts SQL statements from files. • Provides a line editor for modifying SQL queries. • Provides environment, editor, format, execution, interaction, and file commands. • Formats query results and displays reports on the screen. • Controls environmental settings. • Accesses local and remote databases.
  • 36. STRUCTURED QUERY LANGUAGE (SQL) • The standard query language for relational databases is SQL. • It is standardized and accepted by ANSI(American National Standards Institute) and ISO(International Organization for Standardization). • SQL  4th Generation, high-level, nonprocedural language. • 3rd Generation  Compiler languages  C, COBOL, Visual Basic are procedural. • Using nonprocedural language query, a user requests data from the RDBMS. • The SQL language uses English-like commands  CREATE, INSERT, DELETE, UPDATE AND DROP.
  • 37. • SQL language is standardized and its syntax is the same across most RDBMS packages. • The different packages have minor variations and do support some additional commands • Oracle’s SQL is different from the ANSI SQL and referred to as SQL*, simply call it SQL throughout this text. • Oracle9i also supports ANSI syntax for joining tables.
  • 38.
  • 39. Tools Explanation Example Data retrieval Data Query Language (DQL) It retrieves data from the database SELECT Data Manipulation Language (DML) It inserts new rows, changes existing rows and removes unwanted rows INSERT, UPDATE, DELETE Data Definition Language (DDL) It creates, changes, removes a table’s structure CREATE, ALTER, RENAME, DROP, TRUNCATE Transaction Control It manages and changes logical transactions. Transactions are changes made to the data by DML statements that are grouped together COMMIT, SAVEPOINT, ROLLBACK Data Control Language (DCL) It gives and removes rights to Oracle objects GRANT, REVOKE
  • 40. LOGGING INTO SQL*PLUS • In the Windows environment, click Start | Programs | Oracle – Orahome92 | Application Development | SQL Plus. • A log on window will pop up. • Enter your username, password and Host String as provided by your Database Administrator. • In a command-line environment such as DOS, type SQL Plus [username[/password[@host/database]]] to log in. • If the entire commands is typed, the password will be visible on the screen. • If you enter your username only, a prompt will be displayed for your password.
  • 41. SQL * PLUS LOG ON WINDOW
  • 42. RUNNING SQL*PLUS FROM MS-DOS PROMPT
  • 43. • The password typed at this prompt will be masked to maintain its integrity. • There are a couple of common login problems. If you enter an incorrect username or password, you will receive error message ORA-01011:invalid username/password; logon denied User should consult DBA to resolve username/password problems If there is a connectivity issue between your client PC and Oracle or the host string has an invalid entry ORA-12154:TNS: could not resolve service name Oracle stores host string/service values in a file called TNSNAME.ORA. If you receive a TNS error, call your DBA!
  • 44. • After a user logs in and the default SQL> prompt is displayed, the user can start a new Oracle session. • A user can enter only on e SQL*Plus command at the SQL> prompt at a time. • SQL*Plus commands aren’t stored in the buffer. • If a command is very long, you can continue on the next line by using a hyphen at the end of the current line.
  • 45. SQL * PLUS ENVIRONMENT – SQL PROMPT
  • 46. SQL*PLUS COMMANDS • The command words are in bold letters, and user-supplied filenames and extensions are in lowercase. • The abbreviation allowed for the SQL*Plus commands are underlined. • The optional parameters are enclosed within a pair of brackets ([]). • The filename in the file-related commands requires entire file path.
  • 47. SQL QUERIES VERSUS SQL*PLUS COMMANDS SQL SQL Plus A nonprocedural language to communicate the Oracle server An environment for executing SQL statements ANSI Standard Oracle’s proprietary environment Keywords can’t be abbreviated Keywords can be abbreviated Last statement is stored in the buffer Commands aren’t stored in the buffer Statements manipulate data and table in the database Commands don’t allow manipulation of data in the database Uses a termination character to execute the command immediately Commands don’t need a termination character
  • 49. SQL*PLUS FILE-RELATED COMMANDS COMMAND DESCRIPTION GET filename [.ext] Writes previously saved file to the buffer. The default extension is SQL. Writes SQL statements, not SQL*Plus commands START filename [.ext] Runs a previously saved command from file @filename Same as START EDIT Invokes the default editor (Example: Notepad), and saves buffer contents in a file called afiedt.buf EDIT [filename [.ext]] Invokes editor with the command from a saved file SAVE filename [.ext] REPLACE | APPEND Saves current buffer contents to a file with the option to replace append SPOOL [filename [.ext] | OFF | Stores query results in a file. OFF closes the file, and OUT sends the file to the system printer EXIT Leaves SQL*Plus environment. Commits current transaction
  • 50. SQL*PLUS EDITING COMMANDS COMMAND DESCRIPTION APPEND text Adds text to the end of the current line CHANGE / old / new Changes old text to new text in the current line CHANGE / text Deletes text from the current line CLEAR BUFFER Deletes all lines from the SQL buffer DEL Deletes current line DEL n Deletes line n DEL m n Deletes lines m through n INPUT Inserts an indefinite number of lines INPUT text Inserts a line of text LIST Lists all lines from the SQL buffer LIST n Lists line n LIST m n Lists line m through n RUN Displays and runs an SQL statement in the buffer N Makes line N current n text Replaces lines n with text 0 text Inserts a line before line 1 CLEAR SCREEN Clears screen
  • 51. FORMATTED REPORT Buffer SQL*Plus Server SQL Queries SQL Queries SQL * Plus Commands Result
  • 52. • A query typed at the prompt is loaded in to the SQL*Plus buffer. • When the query is sent to the server, the server processes data and sends back the result to the client computer, which can be formatted using SQL*Plus formatting commands
  • 53. ORACLE ERRORS AND ONLINE HELP • SQL*Plus prompt you make a syntax error, Oracle will display an error message showing the line number and the error location on that line. • Oracle places an asterisk (*) at the location of the error and also displays an error code, followed by a brief description. • Any programming language compiler, some error messages aren’t user friendly and get used to some of the common error messages as you start experimenting. • Some queries take up a few lines – and for a typist like typing mistake are bound to happened. • Some errors are easy to find and aren’t. • To fix an error, always start at the line where the error is shown, but keep in mind that the error might not be on that line.
  • 54. • Check for common mistakes like misspelled keywords, missing commas, misplaced commas, miss parentheses, invalid user-defined names or repeated user-defined identifiers. • Each Oracle product has its own specific help file. • The help application opens up a window, similar to Microsoft Windows help, you can click on the Index • tab and type error code • Example: ORA-00XXXX • It provides the user with an explanation of the cause of the error and the user action required to • rectify it. • Oracle Help option in the programs menu, search for ora.hlp file and open it. • Online help line • https://docs.oracle.com/cd/B19306_01/server.102/b14219.pdf • https://www.oracle.com/support/ • http://download-west.oracle.com/docs/cd/B10501_01/mix.920/a99625/toc.htm
  • 55. • The URL is working at this time, but such URL’s change frequently. • Oracle’s Home page (www.oracle.com) and search for help on your Oracle product. • Register  Oracle Technology Network (otn.oracle.com) to access this page is free and membership benefits include free software downloads and also access to online documentation. • SQL*Plus also provides the user with Help on its various commands and SQL language. • HELP INDEX command at SQL>prompt to list the SQL*Plus commands type INDEX [TOPIC] and HELP DESCRIBE • SQL*Plus returns a brief description and syntax on the topic.
  • 56. ALTERNATE TEXT EDITORS • The SQL*Plus editor is a line editor similar to EDLIN in MS-DOS. • It is not fun working with line editors. • The user doesn’t have control over the screen. • Line editors don’t allow a user to move the cursor up and down, and clicking with a mouse is definitely out of the question. • An alternate text editor such as Notepad or any other text editor in Windows to type your SQL queries. • The query typed in a full-screen text editor has to be saved in a file with an .sql extension or copied to the clipboard.
  • 58. • The query can be loaded from a file or pasted from the clipboard into SQL*Plus to execute it at the SQL>prompt. • The Edit command can be used to invoke an alternate text editor from the SQL*Plus command prompt. • SQL*Plus allows the user to select an alternate editor, and in most cases, Window’s popular text editor, Notepad, is the default alternate editor. • The EDIT command involves the alternated editor the contents from the buffer or with an existing file. • The user can make necessary changes to the query and transfer the contents back to SQL*Plus.
  • 60. SQL*PLUS WORKSHEET • The SQL*Plus Worksheet is another environment available with Oracle’s Enterprise Manager. • It enables to enter, edit and execute SQL*Plus code and run client-side scripts. • It maintains a history of the commands you have issued, so can easily retrieve and execute previous commands. • By double-clicking on the SQL*Plus Worksheet icon in the windows desktop.
  • 61. START ] [All] Programs | Oracle – OraHome92 Application Development | SQL Plus Worksheet • An Enterprise Manager login screen is the displayed. • The user logs in with username, password and host string like logging into SQL*Plus. • On a successful login, the user enters the SQL*Plus Worksheet with database connection. • On left side, a tool bar is displayed with connection, execute, command history, previous command, next command and help icons from top to bottom, respectively. • The user can select same options from the file or Worksheet menu.
  • 62.
  • 63. • The SQL*Plus Worksheet screen has two horizontal halves. • The user issues an SQL query or SQL*Plus command in the upper half and then clicks on the lightening bolt icon to execute it. • It output is displayed in the lower half. • During a session, the user issues many commands and statements. • Unlike SQL*Plus Worksheet keeps all commands and statements in history. • The user can click on the command history icon to view them in reverse order, with the most recent command at the top. • The user can the select a command/statement and click GET to load it again and execute it.
  • 64. The SQL Plus system variable SQL PROMPT is disabled by default The SQL Plus system variable SQL NUMBER is set to OFF by default. The SQL Plus system variable PAGE SIZE is set to its maximum by default. The SQL Plus system variable TAB is set to OFF by default. If there are any prompt characters “&” in a script, SQL*Plus treats its as a “define” prompt. The HOST command is not supported in SQL*Plus Worksheet The SQL*Plus user variable_EDITOR is disabled by default. If you enable is by using “DEFINE_EDITOR ‘editorname’,” the specified editor launches on the server when you type EDIT command. As a result, are unable to access normal SQL*Plus Worksheet functionalities. Remote execution is not supported Remote load and save of script files is not supported