Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

The University of Cambodia

Team Members

Name Major

Yoeurn Sonita Computer Science

Un Kosal Information Technology

Summary: System Analysis and Design – Lesson 5-7

Lesson 5

1. Keywords:
- IN: Filters rows based on a list of values.
- BETWEEN: Filters rows within a specific range.
2. DUAL Table: A simple table with one row and one column, used for testing
purposes.
3. Aggregate Functions: Functions that perform calculations on a set of values:
- AVG: Calculates the average.
- COUNT: Counts rows.
- MAX: Finds the maximum value.
- MIN: Finds the minimum value.
- SUM: Adds up values.
4. Numeric Functions: Perform math operations on numeric data.
5. String Functions: Manipulate text data (e.g., trimming, concatenation).
6. Date Functions: Work with date and time data.
7. GROUP BY Clause: Groups rows based on a column value(s) and performs
aggregate functions.
8. HAVING Clause: Filters groups created by GROUP BY based on a condition.
9. ORDER BY Clause: Sorts the result set based on one or more columns.
10. Joins: Combine data from multiple tables based on relationships.
11. Subqueries: Nested queries used within SELECT, WHERE, or HAVING clauses.
12. NULL Values: Special markers for missing or unknown data.
13. Data Definition Language (DDL) Statements: Used to create, modify, and
manage database objects like tables.
Lesson 6

1. PL/SQL is a procedural programming language that improves upon SQL by


adding structured programming features for processing business logic in
information systems.
2. PL/SQL is used to develop the business logic layer of applications that run on the
server-side.
3. The features of server-side code in PL/SQL include good performance, reduced
network traffic, high security, and high reusability.
4. SQL commands can be categorized into three types: DDL (Data Definition
Language), DML (Data Manipulation Language), and DCL (Data Control
Language).
5. DDL commands are used for creating, modifying, and removing database
objects.
6. DML commands are used for manipulating data, including selecting, inserting,
deleting, and updating records.
7. PL/SQL allows for the declaration of variables before using them in the program.
8. PL/SQL data types are similar to Oracle database data types, but some sizes
may differ.
9. Assignment is an important operator in PL/SQL, allowing for the assignment of
values or expressions to variables.
10. Control structures like IF statements, loop statements (including WHILE and FOR
loops), and case statements are used for conditional and iterative execution of
code.
11. Cursors are used to store the address of records returned from select
statements.
12. Triggers are special procedures or subprograms that are bound to a table's
transaction and are executed when the table receives a transaction.
13. There are two types of triggers: row triggers, which execute for each row affected
by a transaction, and statement triggers, which execute once for each
statement.
14. Procedures and functions are reusable blocks of code that can be called from
other parts of the program.
15. Parameters are used to receive and pass values between procedures, functions,
and their callers.

These main points provide an overview of the topics covered in this lesson on PL/SQL.
Lesson 7

1. Creating Users: Users are essential for accessing the database and require
privileges to access database objects and perform tasks.

Syntax for creating a user:

CREATE USER UserName IDENTIFIED BY password [PASSWORD EXPIRE]


[DEFAULT TABLESPACE name-of-tablespace] [TEMPORARY TABLESPACE name-
of-temporary-tablespace] [QUOTA {SIZE | UNLIMITED} ON tablespace-name]

2. Privileges: Privileges grant rights to access the Oracle system, categorized as


system privileges or object privileges. There are two types of Privileges:
System Privilege and Object Privileges.

• System Privilege: Right to access system resources.


System Privileges consist of:
- Create Session
- Select ANY TABLE
- INSERT ANY TABLE
- UPDATE ANY TABLE
- DELETE ANY TABLE
- CREATE TABLE, CREATE VIEW, CREATE TABLESPACE...

• Object Privilege: Right to access data in table, view and execute store
procedure, function, and package.
Object Privileges consist of:
- Select
- Insert
- Delete
- Update
- Execute

3. Role is a set of privileges use to grant to users.


4. Auditing User use to control action of users who access to oracle system.

You might also like