PL/SQL
Beban Kredit : 3 SKS (Matakuliah Pilihan)
Prasyarat : Perancangan Basis Data
2. Memperagakan 3. Studi kasus 4. Praktikum 5. Diskusi/Presentasi 2. OHP+transparansi 3. LCD+computer 4. kertas 2. Kuis 3. Paper/proyek 4. PR 5. Ujian Uraian : Mata Kuliah ini memberikan pengetahuan kepada mahasiswa tentang SQL dan PL/SQL Oracle 10g
Sasaran : Mahasiswa mengetahui fitur-fitur dasar kemampuan dari Oracle 10g
Mahasiswa mengetahui perintah-perintah SQL (DDL, DML, dan DCL), cara penggunaannya serta fungsinya terhadap data dalam database Mahasiswa dapat membuat prosedur program dengan menggunakan PL/SQL
Daftar Pustaka : 1. Oracle Database 10g: SQL Fundamentals I (D17108GC21), Edition 2.1, Desember 2006 2. Oracle Database 10g: PL/SQL Fundamentals (D17112GC21), Edition 2.1, December 2006
SATUAN ACARA PERKULIAHAN Tatap
Muka
Pokok Bahasan Tujuan Instruksional
Materi Strategi Media
Eva-luasi Sumber Umum Khusus I Introduction Oracle Database 10g: SQL Fundamentals I Mahasiswa dapat mengetahui secara umum tentang kemampuan dari Oracle 10g serta Mahasiswa dapat mengetahui tentang database ralational Mahasiswa dapat mengetahui tentang RDBMS dan ORDBMS, serta mengetahui cara instalasi Oracle 10g untuk kebutuhan PL/SQL
1. Fitur – fitur Oracle 10g
2. RDBMS dan ORDBMS
3. Singkat tentang SDLC 4. Storing Information 5. Entity Relationship Model
6. Instalasi Oracle 10g untuk PL/SQL (*ISQL Plus)
1,4 1,3 1. Intro
II Retrieving Data Using
the SQL SELECT Statement, Restricting Mahasiswa dapat mengetahui,mem ahami, Mahasiswa dapat menampilkan
1. Basic select statement
2. Selecting specific column, all data from different tables
1,4 1,3 2 1. Les01
and Sorting Data menjalankan basic select statement, dan cara untuk membatasi serta mengurutkan data
baris dan kolom dari table. Mahasiswa
3. Performing arithmetic calculations and specifying column names
4. Selecting data and changing the order of the rows that are displayed 5. Restricting rows by using the WHERE
clause(comparison conditions, Use the BETWEEN, IN, LIKE, and NULL conditions, Apply the logical AND, OR, and NOT operators)
6. Sorting rows by using the ORDER BY clause
III Using Single-Row
Functions to Customize Output (Single-Row Functions, character-number-date function, conversion function) Mahasiswa dapat memahami Fungsi-fungsi single row Mahasiswa dapat memahami character, number, date, convertion function 1. Single-Row Functions 2. Character Function 3. Number Function 4. Data Function 5. Convertion Function
6. Implicit and Explicit data type
1,4 1,3 1. Les03 IV Using Single-Row Functions to Customize Output (General Functions) NVL, NVL2, Coalesce, Case, Decode - Tugas I Mahasiswa dapat memahami fungsi-fungsi umum dan kondisi IF-ELSE 1. RR Date Format 2. Nesting Functions 3. General Functions 4. NVL, NVL2 Functions 5. NullIF, Coalesce Functions
6. Conditional Expression (Case,
Decode)
1,4 1,3 2 1. Les03
V Reporting Aggregated Data Using the Group Functions Mahasiswa dapat mengetahui dan memahami cara untuk mengelompokan data dengan Mahasiswa dapat menggunakan fungsi group untuk menampilkan
1. Group Functions (AVG, Sum, Count, Max, Min, Count, Distinct Keyword) 2. Group Functions and null values 3. Having Clause
4. Nesting Group Functions
menggunakan fungsi group
kelompok data
VI Displaying Data from Multiple Tables Mahasiswa mengetahui dan memahami tentang bagaimana cara untuk menampilkan data dari beberapa table Mahasiswa dapat menampilkan data, baik baris dan atau kolom dari beberapa table yang dihubungkan secara relasi (PK-FK) 1. Type of Joins 2. Natural Joins 3. Using Clause
4. Self-Joins Using the ON Clause 5. Additional Conditions
to a Join
6. Three-Way Joins with the ON Clause
7. Nonequijoins 8. Outer Joins
9. INNER Versus OUTER Joins 10. Left, Right, Full Outer Join 11. Cartesian Product
1,4 1,3 2 1. Les05
VII Using Subqueries to Solve Queries, Using the Set Operators
Mahasiswa dapat mengetahui dan memahami tentang subqueris, serta set operator Mahasiswa dapat memecahkan masalah penampilan data dengan menggunakan subqueris, serta mahasiswa dapat mengkombinasik an beberapa query menjadi single query dengan menggunakan 1. Types of Subqueries 2. Single-Row Subqueries
3. Using Group Functions in a Subquery 4. Multiple-Row Subqueries 5. Set Operators 6. UNION/UNION ALL 7. INTERSECT 8. MINUS 1,4 1,3 1. Les06 1. Les07
set operators
VIII Mid Test Materi minggu I – VIII 5
IX Manipulating Data,
Using DDL Statements to Create and Manage Tables Mahasiswa dapat mengetahui dana memahami cara untuk memanipulasi data, serta dapat mengolah tables Mahasiswa dapat menambahkan, mengubah, serta menghapus data dari table Mahasiswa dapat membuat table serta mengolahnya
1. Describe each data manipulation language (DML) statement 2. Insert rows into a table 3. Update rows in a table 4. Delete rows from a table 5. Control transactions (Commit,
Rollback, Savepoint) 6. Create Table 7. Constraint Data 8. Edit table, drop table
1,4 1,3 1. Les08
1. Les09
X Creating Other
Schema Objects, Managing Objects with Data Dictionary Views
Mahasiswa dapat mengetahui tentang object schema dan Data Dictionary Mahasiswa dapat mengetahui tentang object schema dan Data Dictionary
1. Data Object (Table, View, Sequence, Index, Synonym)
2. Data Dictionary Views
3. Query various data dictionary views
1,4 1,3 3 1. Les10 2. Les11 XI Introduction PL/SQL, Declaring PL/SQL Variables, Mahasiswa dapat mengetahui dan memahami dan manfaat dari PL/SQL Mahasiswa dapat membuat Block program sederhana menggunakan PL/SQL 1. About PL/SQL 2. PL/SQL Environment 3. Benefits of PL/SQL 4. PL/SQL Block Structure
5. Block Types (Anonymous, Procedure, Function)
6. Variables and Identifiers 7. Types of Variables
8. Guidelines for Declaring and Initializing PL/SQL Variables 9. %TYPE Attribute 10. Bind Variables 1,4 1,3 2 - Intro 2 - Les01 2 - Les02
XII Writing Executable Statements,
Interacting with the Oracle Server, Writing Control Structures, Working with
Composite Data Types
1. Lexical Units in a PL/SQL Block 2. PL/SQL Block Syntax and Guidelines 3. Commenting Code
4. SQL Functions in PL/SQL 5. Data Type Conversion 6. Nested Blocks
7. Variable Scope and Visibility 8. Qualify an Identifier
9. Determining Variable Scope 10. Operators in PL/SQL 11. SQL Statements in PL/SQL 12. Controlling Flow of Execution
13. IF, IF THEN ELSE Statements, IF ELSIF ELSE Clause
14. CASE Expressions
15. Iterative Control: LOOP Statements 16. Basic, WHILE, FOR Loops
17. Nested Loops and Labels
1,4 1,3 2 - Les03
2 - Les04 2 - Les05 2 - Les06
XIII Using Explicit Cursors Mahasiswa dapat mengetahui dan memahami Explicit Cursors Mahasiswa dapat mengetahui dan memahami Explicit Cursors 1. Cursors
2. Explicit Cursor Operations 3. Controlling Explicit Cursors 4. Declaring the Cursor 5. Opening the Cursor
6. Fetching Data from the Cursor 7. Closing the Cursor
8. Cursors and Records 9. Cursor FOR Loops 10. Explicit Cursor Attributes 11. %ISOPEN Attribute
12. %ROWCOUNT and %NOTFOUND
13. Cursor FOR Loops Using Subqueries
14. Cursors with Parameters 15. WHERE CURRENT OF Clause 16. Cursors with Subqueries
XIV Exception Handling, Stored Procedured and Function Mahasiswa dapat mengetahui dan memahami tentang fungsi dari penanganan eksepsi. Mahasiswa dapat mengetahui dan memahami tentang prosedur dan fungsi
1. Handling Exceptions with PL/SQL 2. Exception Types
3. Trapping Exceptions 4. Procedures and Functions
5. Differences Between Anonymous Blocks and Subprograms
6. Passing a Parameter to the Function
1,4 1,3 2 - Les08
3 - Les09
XV Stored Procedured and Function + Review Mahasiswa dapat mengetahui dan memahami tentang prosedur dan fungsi 1. Procedures 2. Functions
3. Passing a Parameter to the Function 4. Invoking the Function with a
Parameter
1,4 1,3 2 – Les09