oracle11g-database-architecture

advertisement
Oracle 11g
Database Architectures
Advanced Databases
Learning Objectives
• Understand the client / server system.
• Understand the DBMS role in that system.
• Explain the architecture of the modern
DBMS.
Advanced Databases
A Simple Client / Server System
Components
• Client
• Server
• Network
Database
server
Network
Client
Client
Client
– LAN
– WAN
– Internet
• Way more clients than
servers.
Advanced Databases
Example of C/S Architecture
Client w/ Web
Browser
TCP/IP Network
Server w/
Web Server
GET /index.html
Data Stream: <html><head>….
128.230.11.84
1.
2.
3.
HTTP protocol implemented
by both browser and web server
www.syr.edu
Typing http://www.syr.edu in client web browser sends
GET request to web server
Web server processes GET request by finding file on
server and sending it back to 128.230.11.84 as a stream of
HTML
Client parses the HTML and draws the web page in the
browser window.
Advanced Databases
Client/Server Architectures
The application consists of:
2 Tier – client and server
3-Tier – client, application,
database
N-Tier – client, application(s),
database(s)
Advanced Databases
Two-Tier Client/Server
SQL queries
Results
Client
Application software
Data access API
Database server
Database management system
Database
• Client talks directly to server
• Eg’s: SQL Management Studio in IST359
Advanced Databases
Middleware
• The application layer protocol and its
implementation which facilities
communication among client and server.
• Web HTTP / SOAP / REST
• Database ODBC / JDBC
Advanced Databases
Three-Tier Client/Server
User request
SQL queries
Response
Client
User interface
Results
Application server
Business components
Database server
DBMS
Database
• Middleware exists between each tier.
• More Complex than Two-tier
• More Scalable than Two-tier
Advanced Databases
Three-Tier Web
User request
User request
SQL queries
Internet
Response
Client
Web browser
Results
Response
Web server
Web applications
Web services
• Middleware:
Database server
DBMS
Database
– Client – Web Server  HTTP
– Web Server – Database Server  ODBC / Pipes /
JDBC
• Web / Db Servers in data center on same
network.
Advanced Databases
N-Tier
3 Tier plus
•
•
•
•
•
•
Caching Frameworks
Load Balancers
Multiple Application Tiers
Cryptographic Accelerators
Heterogeneous DBMS’s
Web Scale:
– Varnish, Memcached, Ngnix, Tomcat, AppFabric
Advanced Databases
Sample N-Tier Setup
Web Server
1
Internet
Reverse
Proxy +
Cache +
Load
Balancer
Web Server
2
Web Server
3
DBMS
1
Clients
Advanced Databases
Replication
DBMS
2
Service-Oriented Architecture
• You can do business with a company:
– Via their user interface.
– Programmatically using their API’s
• Think Twitter, Foursquare, Amazon, Netflix,
Google Maps, Twilio, etc…
• Customers and business partners can build
applications using the company’s APIs as a
“service”
• Allows for a greater level of integration than is
otherwise possible
Advanced Databases
DBMS Architecture
Advanced Databases
General Architecture of the Modern DBMS
• SERVER- computer hosting the database service.
• INSTANCE – Install of the product. Most products can install
multiple instances.
• LISTENER – Background process that manages the listener.
• CATALOG – Unique named set of schemas. This is a database
at the MySQL, SQL Server and Oracle products.
• SCHEMA – Logical Grouping of objects within the CATALOG
• OBJECTS – Tables, Keys, Constraints, Views, Procedures.
Advanced Databases
General Architecture of the Modern DBMS
Server
Instance
Catalog (db)
Schema
Catalog (db)
Schema
Objects
Instance
Catalog (db)
Schema
Catalog (db)
Schema
Objects
Advanced Databases
An Oracle
Instance
And
Database
Advanced Databases
Oracle vs. SQL Server – Architecture
Comparison
Oracle
• Instances can use separate
listeners.
• Oracle designed to work
independently from the
OS.
• Oracle uses Tablespaces
(storage independent of
database)
• Users given access to
Tablespace.
SQL Server
• All instances use same
listener.
• SQL Server designed to
only work on Windows.
• SQL Server does not have
tablespaces.
• Users given access to
Database to achieve same
result.
Advanced Databases
Oracle vs. SQL Server – Cheat Sheet
SQL Server Concept
Oracle Equivalent Concept
Connect to server
Connect to database
Your database
Your Schema
IP / Port for connection
Listener
Database login
Schema login
You were not the DBA
You are the DBA
You had access to ONE
database on the SQL server
and used ONE login
You have access all the
schemas on the database
and will use multiple logins.
Advanced Databases
Oracle Enterprise Manager
• User account must have DBA role
• Oracle Enterprise Manager (OEM)
– Three-tier architecture
– Console
• Oracle Management Server (OMS)
– Interacts with repository
– Makes it easier for DBAs to administer multiple
databases in organization’s network
Advanced Databases
19
OEM Architecture
Advanced Databases
20
OEM Screenshot
Advanced Databases
Walk-Through 1/2
1. Connect to ITELL via vSphere Client
2. Logon to Virtual Machine
– Administrator / SU2orange
3. Takes a while for Oracle to load (Taskmgr)
4. Oracle Enterprise Manager
– SYS / SU2orange
(as SYSDBA)
Advanced Databases
Walk-Through 2/2
• SQL Plus – Command line utility
• Two ways to log in:
1. Logon, connect to a database
Database
Listener
Login
– SYS@localhost.orcl as SYSDBA
2. Logon, do not connect to a database
– SYS as SYSDBA
Advanced Databases
Database Architectures
Questions? Comments?
Advanced Databases
Download