3GL   4GL   5GL   .

-

, Oracle Corporation [D. Beech. Object Data Bases Directions]

  1. SQL3

Oracle . , - SQL ANSI/ISO SQL. , , . "" ( ) , . "--" . SQL , , PL/SQL, .

, , . Oracle . , , .

, , , -, :

1. , , 1995 , ( " ") , , .

2. .

( ). ? , , : - , , ++, , , , 02, . , / . , , , , , , , , , . . , , . , , - SQL.

SQL3

" SQL" , , , , . . ANSI ISO SQL, , SQL2, 1990 SQL3.

ANSI SQL (Oracle - ), , , . SQL3 , PL/SQL. SQL , , "" .

SQL3 , , SQL3 . , . () , ++. , SQL3 , (circumrelational).

, SQL3 , , . , SQL3 - , . , ; - .

SQL2 ISO, ANSI, 1992 SQL-92. SQL-86 SQL-89, , SQL SQL-95. , , , , , , SQL-92, SQL3.

, SQL3, - SQL3 . , , , . (SQL-92 7 , SQL3 . SQL3 , , , , , .) ISO - SQL MultiMedia - , SQL3 (Full Text area), , SQL3 (Spatial Data area).

, , - . , ( ) , - , , ( , ). , , , , , .

SQL3 , () , .

Create type Address
(
 number char (6),
 street char (30),
 aptno integer,
 city char (30),
 state char (2),
 zip integer
);
Create table Addresses of Address;

:

Create table Addresses of new type Address
(
 number char(6),
 street char(30),
 aptno integer,
 city char (30),
 state char(2),
 zip integer
);

"of new type" . , . , "" .

:

Create table HomeAddresses of Address;

:

 reate table People of new type Person
(
 name char (30),
 address Address,
 birthdate date
);

Person - , (composite) ( " "). , , , :

 Create table People of new type Person
(
name char(30),
address Address,
function age
(
: ref(Person)) return interval day;
return ;
function set age(: ref(Person),
:d interval day) returns ref(Person);
begin
:.birthdate:=current_date - :d;
return :p;
end;
private birthdate date
);

( ) birthdate , private. , birthdate . ( , , private). ++, protected - , ( ).

private public . public. , , public (accessible in principle). , , .

, SQL:

 Select birthdate from People;
 / * ,     */
 / *   Person */

SQL3 ++ , , , .

SQL class type, , , . , (Abstract Data Types), .

under.

 Create type Employee under Person
(
 emp no char(10),
 dept ref(Department)
);

, , , - , under. (overloading), (). , .

- , , . , (persistent objects). , ( ).

, , , , - - . , - :

<oid, value>

value .

oid ( ):

Select ha.oid from HomeAddresses
ha where ?;

, Select * value ( !).

oid , :

Insert into HomeAddresses
values(?) alias :chezvous;

alias oid :

Update HomeAddresses set zip=94022
where oid=:chezvous;

ref , , :

ref(Person)

, , , :

Create type Person
(
 name char (30),
 address Address,
 birthdate date,
 bestfriend ref(Person)
);

ref(Person) bestfriend, :

Create table ObjectPeople of new type Person
(
 name char (30),
 address Address,
 birthdate date,
 bestfriend references ObjectPeople
);

, , check unique, . , , - , SQL3 , . . -, ref(T), without oid. -, oid , with oid not visible. , oid , , oid , - rowid. , with oid notvisible, " " , .

ref- :

Insert into ObjectPeoyle (name)
values ('.-J. Dahl')
alias :ole johan;

Ole Johan - ref(Person), , , ObjectPeople, bestfriend.

Insert into ObjectPeople
(name, bestfriend)
values ('. Nygaard', :ole johan)
alias :kristen;

Select op.bestfriend into :bf from
ObjectPeople  where oid=:kristen;

oid , , , .

:

Select name(bestfriend)
from ObjectPeople  where oid=:kristen;

name bestfriend ref(Person), (join). (SQL3 , , , .)

,

, , Create type

 Create type template Set(: type)
(
 );
Create table People of  type Person
(
 name char(30),
 address Set(Address),
 birthdate date
);

Set(Address) , Address :. , .

-, , .

(distinct types) - , :

Create distinct tyge Kilometres as integer;
Create distinct tyge Kilogrammes as integer;

, , .

Create distinct type Sad as
Set(ADDRESS);

.

, . ( ) : , get set, , . , , ( ), SQL3 (virtual) . ; . :

Create table People of new type Person
(
name char(30), address Address,
age virtual, function age(: ref(Person))
return interval day;
return _ ;
function set_age(: ref(Person), :d
interval day) returns ref(Person);
begin :p.birthdate:=current_date -
:d; return :p; end; private birthdate date );

. :

age updatable virtual get with foo
set with bar,

foo bar - , . read only virtual (, ) , get with.

(Insert) (Update) , :

Insert into ObjectPeople
(name, age) values ('. Myhraug',
current_date - date'1932-02-29')
alias :bjorn;
Update ObjectPeople 
set name='B. Myhraug',
age=current date - date '1932-03-29'
where oid=:bjorn;

, . , (private) . "" .

: , ; , , - . - , . , , . , (, , ""), ( " ").

. , ( , ++ ). , , , .

1. SQL, , - ?

, SQL3 . , , , , SQL2, SQL, , . , SQL, - SQL , , , , - , .

2. , " " ?

, . , . ( ), , , (transient) (persistent). (overloading), , ++, . , , , . SQL , , , . , .

3. , ?

3 , - - , , . Oracle , , . , , , , . , , , , .

, 04, 1994

        3GL   4GL   5GL   .

, (. snippet , ) , . , . , , . (IDE) . , Microsoft Visual Studio, Borland Developer Studio, . IDE Geany snippets.conf ( : /home/user/.config/geany) . , Macromedia Dreamweaver Zend Studio, -.




 10.11.2021 - 12:37: - Personalias -> WHO IS WHO - - _.
10.11.2021 - 12:36: - Conscience -> . ? - _.
10.11.2021 - 12:36: , , - Upbringing, Inlightening, Education -> ... - _.
10.11.2021 - 12:35: - Ecology -> - _.
10.11.2021 - 12:34: , - War, Politics and Science -> - _.
10.11.2021 - 12:34: , - War, Politics and Science -> . - _.
10.11.2021 - 12:34: , , - Upbringing, Inlightening, Education -> , - _.
10.11.2021 - 09:18: - New Technologies -> , 5G- - _.
10.11.2021 - 09:18: - Ecology -> - _.
10.11.2021 - 09:16: - Ecology -> - _.
10.11.2021 - 09:15: , , - Upbringing, Inlightening, Education -> - _.
10.11.2021 - 09:13: , , - Upbringing, Inlightening, Education -> - _.
Bourabai Research -  XXI Bourabai Research Institution