Vous êtes sur la page 1sur 2

Oracle/SQL Basics

• Database Management Systems


1. It is a system intended to organize, store, and retrieve large amounts of
data easily.
2. Some of DB Objects examples are tables, snapshots/views, procedures,
functions, and triggers.
3. We use Relational database management system (RDBMS).

• Relational database management system


1. It is DBMS in which data is stored in the form of tables and the
relationship among the data is also stored in the form of tables.
2. It has rows and columns and thus form a matrix in which attributes has a
relation amongst themselves. For example, we can form a tuple.
3. Most RDBMS employ SQL as their query language.

• SQL – Structured Query Language


1. Structured Query Language, is a database computer language designed
for managing data in relational database management systems (RDBMS).
2. Its scope includes data insert, query, update and delete, schema creation
and modification, and data access control.

• Tables and Attributes


1. A table is uniquely identified by its name and consists of rows that contain
the stored information.
2. Each row contains exactly one tuple (or record).
3. A column is made up of a column name and a data type, and it describes
an attribute of the tuple.
4. The structure of a table, also called relation schema, thus is defined by its
attributes.
5. The type of information to be stored in a table is defined by the data types
of the attributes

• Primitive Data Types


1. Char(n): Fixed-length character data (string), n characters long. Can be
memory consuming.
2. Varchar2(n): Variable-length character string. Only the bytes used for a
string require storage.
3. Number(o,d): Numeric data type for integers and reals. o = overall
number of digits, d = number of digits to the right of the decimal point.
Data types derived from number are int[eger], dec[imal], smallint and real.
4. long: Character data up to a length of 2GB. Only one long column is
allowed per table.
5. Date and Time:
DATE — for date values (e.g., 2010-05-30)
TIME — for time values (e.g., 14:55:37)
TIMESTAMP — This is a DATE and a TIME put together in one variable
(e.g., 2010-05-30 14:55:37)

• Data Definition Language

The Data Definition Language (DDL) is subset of SQL, manages table and index
structure. The most basic items of DDL are the CREATE, ALTER, RENAME, DROP and
TRUNCATE statements.

• Data Manipulation Language

The Data Manipulation Language (DML) is the subset of SQL used to ADD,
UPDATE and DELETE data.

Vous aimerez peut-être aussi