Commercial RDBMSs Access and Oracle. Access DBMS Architchecture Can be used as a standalone system...

Preview:

Citation preview

Commercial RDBMSs

Access and Oracle

Access DBMS Architchecture

Can be used as a standalone system on a single PC:

-JET Engine-Microsoft Data Engine (MSDE)

Can be used as a multi-user system on a PC network

-File/server solutions-Client/server solutions-Database replication solutions-Web based database solutions

Creating a Table in Access

Use Table WizardUse Datasheet

-Access creates table from sample of data

Use Design ViewUse CREATE TABLE statement in SQL

View

Access Enterprise Constraints

Validation rules for fieldsValidation rules for records

-Records will not be written unless they are valid

Validation rules for forms using Visual Basic for Applications

-Used to add validation rules to Forms

Forms and Reports in Access

Form is GUI for entering data-Use VBA for custom logic

Reports are for displaying data in a formatted manner.

Access Macros

Access uses event driven paradigm-Mouse / Keyboard Events-Focus Events-Data events

Data Events can be used as triggers

Oracle DBMS Architechture

Tablespaces-Group related logical structures

Schemas-Named collection of schema objects

Data Blocks-Smallest unit of storage

Oracle Tables and Relationships

Create table with SQL CREATE TABLECreate table with Create Table Wizard

-Equivalent to Access Design View

Specify relationships in FOREIGN KEY property of create table

Does not support ON UPDATE, CASCADE, SET DEFAULT, SET NULL

-Can get around this by using triggers

Oracle Enterprise Constraints

Several ways to enforceSQL, via CHECK and CONSTRAINT

clause of CREATE TABLEStored procedures and functionsTriggersMethods

PL/SQL

Oracle Procedural extension to SQLCursors allow data to be accessed one row

at a timePL/SQL block has three parts

- Declare variables, constants, cursors (optional)- Execution block- Exception block (optional)

Oracle Stored Procedures

PL/SQL block that can take parameters and be invoked.

Specify direction of parameters with IN, OUT, IN OUT

Package is a collection of procedures, functions, variables, and SQL statements that are grouped together.

Oracle Triggers

Trigger is an action to take when some event occurs under a certain condition

Types of eventsINSERT, UPDATE, DELETECREATE, ALTER, DROP

The action will only execute if the condition is satisfied when the event occurs.

QUESTIONS ?

Recommended