Bài giảng điện tử môn tin học: ORACLE docx

135 417 0
Bài giảng điện tử môn tin học: ORACLE docx

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

1 1 ORACLE RÈN LUYỆN ORACLE RÈN LUYỆN CƠ BẢN CƠ BẢN Date Date : : 2002/06/26 2002/06/26 2 2 O O Introduction Introduction 3 NỘI DUNG MÔN HỌC NỘI DUNG MÔN HỌC Oracle Database Architecture 0.5 hrs Oracle Database Architecture 0.5 hrs Gíơi Thiệu về Ứng Dụng Trong SQL 3.5 hrs Gíơi Thiệu về Ứng Dụng Trong SQL 3.5 hrs Gíơi Thiệu về Ứng Dụng TrongPL/SQL 4 hrs Gíơi Thiệu về Ứng Dụng TrongPL/SQL 4 hrs 4 4 I I Database Architecture Database Architecture 5 Instance Overview Overview Database SGA Redo log buffer Data buffer cache Shared pool Data dict. cache Library cache PMON DBW0 SMON LGWRCKPT Others User process Server process PGA Control files Data files Redo log files Archived log files Parameter file Password file 6 Oracle Instance Oracle Instance Background Background processes processes An Oracle instance: An Oracle instance: Is a means to access an Oracle Is a means to access an Oracle database database Always opens one and only one Always opens one and only one database database Memory Memory structures structures Instance SGA Redo log buffer Data buffer cache Shared pool PMON DBW0SMON LGWRCKPT Others 7 Oracle Database file Oracle Database file Password file Parameter file Archived log files Control files Data files Redo log files Database 8 Other Key Physical Structures Other Key Physical Structures Database Password file Parameter file Archived log files 9 Database storage hierarchy Database storage hierarchy Database Logical Physical Tablespace Data file OS block Oracle block Segment Extent 10 Connecting to an Instance Connecting to an Instance Server User Client Client User Server Oracle server Oracle server Server Server User Server Application server Application server [...]... Grant, Revoke 13 The Basic Query block SELECT [distinct] {*, column [alias],……} FROM table  Distinct *  Alias Không cho trùng lắp dữ liệu Hiện thị tất cả các column Đưa ra tên khác của column 14 Select all column all rows Câu lệnh SQL đơn giản nhất cần bao gồm 2 mệnh đề: : SELECT clause - * is select all data : FROM clause SELECT * FROM s_dept; 15 Selecting specific column SELECT dept_id, last_name,... first_name, last_name, start_date FROM s_emp WHERE last_name LIKE ’_a%’ 28 Is NULL Operator SELECT id, name,credit_rating FROM s_customer WHERE sales_rep_id = NULL ; No rows selected SELECT id, name,credit_rating FROM s_customer WHERE sales_rep_id = ‘ ‘ ; No rows selected SELECT id, name,credit_rating FROM s_customer WHERE sales_rep_id IS NULL 29 Character Functions LOWER thường UPPER INITCAP hoa CONCAT SUBSTR... NVL(start_date,’01-JAN-95’) NVL(title, ‘No Title Yes’) NVL (salary, 1000) 21 Limiting Selected Rows dùng ORDER BY để sắp xếp Dùng WHERE để truy tìm theo điều kiện 22 The ORDER BY Clause ASC tăng dần (Default) DESC giảm dần Sau ORDER BY có thể dùng aliases SELECT last_name EMPLOYEE, dept_id, start_date FROM s_emp ORDER BY EMPLOYEE DESC 23 Sorting by Multiple Columns Dùng vị trí để sắp xếp SELECT last_name , salary... kiện số dư 32 Number Function ROUND(45.923,2) ROUND(45.923,0) ROUND(45.923,-1) TRUNC(45.923,2) TRUNC(45.923) TRUNC(45.923,-1) MOD(1600,300) → 45.92 → 46 → 50 → 45.92 → 45 → 40 → 100 33 Oracle Date Formate nội dung ngày của Oracle gồm:  thế kỵ : năm : tháng : ngày : giờ : phút : giây kiểu hiện thị mặc định DD-MON-YY Có thể dùng SYSDATE function để hiện thị ngày hiện hành : SYSDATE có thể lấy giá trị ngày...Sessions mỗI một kết nối : một Session    khi user login tới oracle server sẽ sinh ra một Process : Process này gọI là server process mỗI một Server Process xử lý 1 user process User logout hoặc disconnect : thì Session END MTS (Multithreaded server)  một Server... ,first_name 24 ; Comparison and Logical Operators Logical comparison operators  = > >= < . files Parameter file Password file 6 Oracle Instance Oracle Instance Background Background processes processes An Oracle instance: An Oracle instance: Is a means to access an Oracle Is a means to access an Oracle database database Always. 1 1 ORACLE RÈN LUYỆN ORACLE RÈN LUYỆN CƠ BẢN CƠ BẢN Date Date : : 2002/06/26 2002/06/26 2 2 O O Introduction Introduction 3 NỘI DUNG MÔN HỌC NỘI DUNG MÔN HỌC Oracle Database. Physical Tablespace Data file OS block Oracle block Segment Extent 10 Connecting to an Instance Connecting to an Instance Server User Client Client User Server Oracle server Oracle server Server Server User Server Application

Ngày đăng: 11/08/2014, 23:20

Mục lục

  • ORACLE RÈN LUYỆN CƠ BẢN

  • O

  • NỘI DUNG MÔN HỌC

  • I

  • Overview

  • Oracle Instance

  • Oracle Database file

  • Other Key Physical Structures

  • Database storage hierarchy

  • Connecting to an Instance

  • Sessions

  • II

  • SQL Statement

  • The Basic Query block

  • Select all column all rows

  • Selecting specific column

  • sử dụng các phép tính

  • Column Aliases

  • Concatenation Operator

  • Managing Null Values

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan