0% found this document useful (0 votes)
5 views29 pages

DBMS2 WK1

Uploaded by

Geramier Apostol
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views29 pages

DBMS2 WK1

Uploaded by

Geramier Apostol
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 29

DBMS 2


Week one
Introduction
This presentation will focus on
what the course is all about.
/ 01 # recap
Briefly discuss last semester’s

1 lessons.

agenda # PL/SQL
What is PL/SQL?
OF THE DAY
2
# Basic syntax
What is the basic syntax of

3 PL/SQL.
/ 02

oracle
is a relational database
management system (RDBMS).
It is widely used for enterprise-level
applications due to its robustness,
scalability, and security features.
/ 03

SQL
which stands for Structured
Query Language, is a
programming language used for
managing and manipulating
relational databases.
/ 04 # Database
management system
It is software that provides an

1 interface for interacting with


databases and managing the storage,
retrieval, and organization of data

Key POINTS # Data definition language


are used to create, modify, and
OF SQL
2 delete database objects such
as tables, indexes, and views.

# Data manipulation language


are used to insert, update, and

3 delete data, as well as retrieve


data from the database.
/ 05 # Data query
language
specifically designed for

4 querying and retrieving data


from a database.

Key POINTS # Data control language


for managing access to data
OF SQL
5 within a database.

Any Questions?
Keep it related to our agenda if
you have one…
/ 06

Pl/sql
Procedural Language / Structure
Query Language
is a programming language designed
specifically for interacting with
Oracle Database.
/ 07 Pl/sql features
• PL/SQL is tightly integrated with SQL.
• It offers extensive error checking.
• It offers numerous data types.
• It offers a variety of programming structures.

• It supports structured programming through functions and


procedures.
• It supports object-oriented programming.
• It supports the development of web applications and server
pages.
/ 08

Environme
nt?
We will still be using Oracle
Database XE and SQL Developer.

Basic Syntax
Let’s begin with basic syntax
/ 09

Basic
syntax
It is a block-structured
language; this means that the
PL/SQL programs are divided
and written in logical blocks of
code.
/ 10 # DECLARATIONS
This section starts with the

1 keyword DECLARE.

basic # EXECUTABLE COMMANDS


This section is enclosed between
SYNTAX
2
the keywords BEGIN and END
and it is a mandatory section.

# EXCEPTION HANDLING
This section starts with the

3 keyword EXCEPTION.
/ 11
/ 12

Any Questions?
Keep it related to our agenda if
you have one…
/ 13

DATA
TYPES
he PL/SQL variables, constants
and parameters must have a
valid data type, which specifies
a storage format, constraints,
and a valid range of values.
/ 14 Pl/sql DATA TYPES
S.No Category & Description
Scalar
1 Single values with no internal components, such as a NUMBER,
DATE, or BOOLEAN.

Large Object (LOB)


2 Pointers to large objects that are stored separately from other data
items, such as text, graphic images, video clips, and sound waveforms.

Composite
3 Data items that have internal components that can be accessed
individually. For example, collections and records.

4 Reference
Pointers to other data items.
/ 15 SCALAR
S.No Category & Description

1 Numeric
Numeric values on which arithmetic operations are performed.

2 Character
Alphanumeric values that represent single characters or strings of characters.

3 Boolean
Logical values on which logical operations are performed.

4 Datetime
Dates and times.
/ 16 SCALAR / NUMERIC
S.No Data Type & Description

1 PLS_INTEGER
Signed integer in range -2,147,483,648 through 2,147,483,647, represented in 32 bits

2 BINARY_INTEGER
Signed integer in range -2,147,483,648 through 2,147,483,647, represented in 32 bits

3 BINARY_FLOAT
Single-precision IEEE 754-format floating-point number

4 BINARY_DOUBLE
Double-precision IEEE 754-format floating-point number

NUMBER(prec, scale)
5 Fixed-point or floating-point number with absolute value in range 1E-130 to (but not
including) 1.0E126. A NUMBER variable can also represent 0

6 DEC(prec, scale)
ANSI specific fixed-point type with maximum precision of 38 decimal digits

7 DECIMAL(prec, scale)
IBM specific fixed-point type with maximum precision of 38 decimal digits
/ 16 SCALAR / NUMERIC
S.No Data Type & Description

8 NUMERIC(pre, secale)
Floating type with maximum precision of 38 decimal digits

DOUBLE PRECISION
9 ANSI specific floating-point type with maximum precision of 126 binary digits (approximately 38 decimal
digits)

FLOAT
10 ANSI and IBM specific floating-point type with maximum precision of 126 binary digits (approximately
38 decimal digits)

11 INT
ANSI specific integer type with maximum precision of 38 decimal digits

12 INTEGER
ANSI and IBM specific integer type with maximum precision of 38 decimal digits

13 SMALLINT
ANSI and IBM specific integer type with maximum precision of 38 decimal digits

14 REAL
Floating-point type with maximum precision of 63 binary digits (approximately 18 decimal digits)
/ 17

Any Questions?
Keep it related to our agenda if
you have one…
# is a programming language
used for managing and

1 manipulating relational
databases.

Short quiz # is a programming language


designed specifically for

2
1/4 YELLOW PAPER interacting with Oracle
Database.

# Single values with no


internal components

3
# Values on which arithmetic
operations are performed.

4
Short quiz # What does the 2 in
number(2,7) mean?
1/4 YELLOW PAPER
5
# Logical values on which
logical operations are

6
performed
# Pointers to other data items

7
Short quiz # It is an optional section and
defines all variables, cursors,
subprograms, and other
1/4 YELLOW PAPER
8 elements to be used in the
program.

# This optional section


contains exclusion(s) that

9
handle errors in the
program.
# Data items that have
1 internal components that
can be accessed
individually.
0
Short quiz
1/4 YELLOW PAPER

Time to Check
Exchange papers
classmate.
with your

See you next week!
More on Data Types on our next
meeting.

You might also like