Escolar Documentos
Profissional Documentos
Cultura Documentos
Objects
Dell Confidential
Agenda
1)Overview on database objects
2)Table and its structure
3)Temporary tables
4)External tables
Dell Confidential
Database objects
Database objects are the logical entities which Oracle
manages for users.
Users will interact with them through Oracle.
Each object has a unique name.
These objects fit together to form a database.
Database objects are classified into 2 main types:
1)Schema Objects
2)Non Schema Objects
Dell Confidential
Dell Confidential
Dell Confidential
Overview of Tables
Tables
Data
You define a table with a table name (such as employees) and set of
columns. You give each column a column name (such as employee_id,
last_name, and job_id), a datatype (such as VARCHAR2, DATE, or
NUMBER), and a width.
The
record.
Dell Confidential
More on tables
After you create a table, insert rows of data using
SQL statements.
Table data can then be queried, deleted, or updated
using SQL.
You can specify rules for each column of a table.
These rules are called integrity constraints.
Dell Confidential
Dell Confidential
Dell Confidential
Dell Confidential
10
Dell Confidential
11
Dell Confidential
12
Dell Confidential
13
Dell Confidential
14
Dell Confidential
Temporary Tables
Addition
Data in temporary tables is
automatically delete at the end of the
database session, even if it ends
abnormally.
Indexes ,views and triggers can be
created on temporary tables. The
content of the index and the scope of
the index is that same as the database
session.
Dell Confidential
.
Temporary tables are ideal for holding
intermediate data used by the current
SQL session.
EX:
Select *
into global temporary customer_india
from customer
where state=KARNATAKA
Dell Confidential
Creation..
..
Dell Confidential
External Tables
External tables access data in external sources as
if it were in a table in the database
External tables are largely used as a convenient
way of moving data into and out of the database.
Dell Confidential
21
22
Dell Confidential
23
24
6.Perform the following select operation to verify that the information in the
.dat file was loaded into the emp table:
SQL> SELECT * FROM emp; EMP_NO LAST_NAME FIRST_NAME M
------ ------------------------- -------------------- 56 baker mary a
87 roper lisa m
Dell Confidential
25
Dell Confidential
26