Rdbms
This presentation is the property of its rightful owner.
Sponsored Links
1 / 51

第六章 RDBMS 的扩展 PowerPoint PPT Presentation


  • 91 Views
  • Uploaded on
  • Presentation posted in: General

第六章 RDBMS 的扩展. 关系模型中概括与聚合的扩展 支持共享与递归的分子对象概念 关系查询语言 QUEL 的扩展及其支持 关系模型中的抽象数据类型 XSQL 语言的扩展 嵌套的关系模型 NF2. ※6.1 关系模型中概括与聚集的扩展. 例 1 :关于人的特化模型示例. Persons. maritalStatus. nationality. sex. Singles. Austrians. Females. …. Canadians. Married. Males. 关系扩展模型 —— 一般化的 m 维特化示例. R. S km.

Download Presentation

第六章 RDBMS 的扩展

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Rdbms

RDBMS

  • QUEL

  • XSQL

  • NF2


Rdbms

6.1

  • 1

Persons

maritalStatus

nationality

sex

Singles

Austrians

Females

Canadians

Married

Males


Rdbms

m

R

Skm

Sk1

R1p1

Rmpm

R11

Rm1


Rdbms

var R : generic

sk1=(R11,,R1p1);

skm=(Rm1,,Rmpm);

of

aggregate keylist

s1: key R1;

sn: key Rn;

end


Rdbms

  • genericRn

    generickey

  • Rmsk1skm

  • skiRpiR


Rdbms

  • RmRmRPiRi1,,Ripi)

  • Msk1,,skmR

    s1,,sn


Generic r

genericR

  • RnRi1in

    (1)key Ri

    (2)generickey,

  • Keylist{s1,,sn}


Rdbms

  • Rij1im1jPigenericRcopy

  • Ski1imRSj 1jn

  • SkiSjSjRjRi1,,Ripi


Rdbms

CSG

  • P31CSG

    <mechanical part> ::= <object>

    <object> ::= <primitive>|

    <object> <motion op> <motion arguments>|

    <object> <set operator> <object>

    <primitive> ::= cube | cylinder | cone |

    <motion op> ::= rotate | scale | translate |

    <set operator> ::= union | intersection |difference |


Rdbms

  • object

    1. Prim_obj

    2. Mot_obj

    3. Comp_obj


Rdbms

CSG

ID

Mech_obj

MAN

LEFT_ARG

RIGHT_ARG

ARG_OBJ

TYPE

Comp_obj

Prim_obj

Mot_obj

OP_CODE

PRICE

MAT

T

PTYPE

LENGTH

WIDTH

cylinder

cuboid

HEIGHT


Rdbms

CSG

(1) var mech_obj: generic

(2) TYPE = (prim_obj, mot_obj, comp_obj);

(3) of

(4) aggregate [ID]

(5) ID : identifier;

(6) MAN: manufacturer;

(7) TYPE: structural_comp

(8) end


Mech obj

Mech_obj

var prim_objgeneric prim_obj mech_obj

PTYPE =(cylinder,,cuboid);

of PTYPE

aggregate[ID]

ID:identifier;

MAN:manufacturer; TYPE

MAT:material;

PRICE:money;

PTYPE:geom_form;

end


Rdbms

var cuboid cuboidgeneric

aggregate [ID]

ID:identifier;

MAN:manufacturer;

MATmaterial;

PRICE:money;

LENGTH:real; cuboid

WIDTH:real;

HEIGHT:real;

end


Rdbms

var mot_obj mot_objgeneric

aggregate [ID]

ID:identifier;

MAN:manufacturer;

ARG_OBJ: key mech_obj;

T : matrix;

end


Rdbms

var comp_obj

aggregate [ID]

ID:identifier;

MAN:manufacturer;

LEFT_ARG_OBJ:key mech_obj;

RIGHT_ARG_OBJ: key mech_obj;

OP_CODE :( union,difference,intersection,)

end


Bracket csg

bracketCSG


Rdbms

1.

,

2.

1.

2.

3.

4.


6 2 generic

6.2 generic

  • (Molecular Object

    ()


Rdbms

  • /

    /

    /

    /

/


Rdbms

  • /


Rdbms

  • /


Rdbms

  • /

    CSG

    3.2


Rdbms

  • /

    CSG

    DAG


Rdbms

CSG1

CSG2


6 3 quel

6.3 QUEL

  • QUEL:Ingres

  • QUEL

    range offromrange of t is r(tr)

    retrieveselectrangeretrive t.AtA

    where PP

    *


Rdbms

M

N

boundary

mech-part

faces

  • E-R


Rdbms

QUEL

  • range of m is mechanical_part

    range of f is faces

    range of b is boundary

    retrive m.all,f.all

    where m.ID = cube#1

    and m.ID = b.GEO_ID

    and f.ID = b.FACE_ID

  • range of m is mechanical_part

    retrive m.all, m.FACE_JOIN

    where m.ID = cube#1

  • range of f is faces

    retrive f.GEO_JOIN

    where f.ID= f1


Rdbms

  • QUEL

  • QUELQUEL

  • QUELboundary


Rdbms


Rdbms

QUEL

  • mech-partFACE-JOINfacesGEO-JOIN

    range of m is mech-part

    retrieve m.all,m.FACE-JOIN

    where m.ID = cube#1

    range of f is faces

    retrieve f.GEO-JOIN

    where f.ID=f1


Rdbms

  • range of m is mech-part

    retrive m.FACE-JOIN.SURFACE

    where m.ID = cube#1

  • QUEL.


Rdbms

  • (QUEL)


Rdbms

()

  • range of m is mechanical_part

    retrivesum(m.FACE-JOIN.SURFACE)

    where m.ID = cube#1

    range of m is mechanical_part

    retrivesum(m.FACE_JOIN.SURFACE)

    where m.ID = cube#3


Rdbms

6.4

  • INGRESCADT-INGRES

    POSTGRES


Rdbms

  • ADT

  • cuboids ( id: integer,

    material: char(10),

    description: char(20),

    V1: ADT: vertex_type,

    V2: ADT: vertex_type,

    V8: ADT: vertex_type)


Rdbms

()

  • ADT

  • define ADT

    (typename = vertex_type,

    bytesin = 9,

    bytesout = 9,

    inputfunc = to_internal_vertex,

    outputfunc = to_external_vertex,

    filename = /usr/ingres//vertex)

X

Y

Z

to_external_vertex

to_internal_vertex

X%%Y%%Z


Rdbms

()

  • C(informixjava)ADT

  • ADT


Rdbms

  • range of c is cuboids

    retrieve (c.material, c.description,c.V1)

    where c.id = 5


Rdbms

  • ADT

  • informixUDR

  • define adtop

    (opname = Ry,

    funcname = rotate_abount_y,

    filename = /usr/ingres/../rotate_y,

    result = ADT: vertex_type,

    arg1 = ADT: vertex_type,

    arg2 = ADT: angle_type,

    prec like +)


6 5 xsql

6.5 XSQL

  • XSQLKifer1992SQL

  • SQL-3SQL

  • XSQL


Rdbms

XSQL

  • Surrogates

    • DB

processor ID

date & time


Rdbms

componet of

R1

E1

E2

  • component of XSQL

    part-of

    component-of1:11:N

  • E-R

  • create table E1(E1-ID:identifier,

    E1_DATA:)

    create table E2(E2-ID:identifier,

    E2_FATHER:component of (E1),

    E2_DATA:)

  • component of E2e2R1E1e1ID

1

N


Rdbms

E1

(0,*)

(0,*)

1 1

R2

R1

(1,1)

N

N

(1,1)

E2

E3

1

(0,*)

R3

(1,1)

N

E4

create table E1(E1-ID:identifier,

E1_DATA:)

create table E2(E2-ID:identifier,

E2_FATHER:component of (E1),

E2_DATA:)


Rdbms

  • ID

  • mapTIDs


Rdbms

N:M

  • XSQLN:MR

  • reference


Rdbms

N

M

R1

E1

E2

N:M

  • E-R

  • create table E1(E1-ID:identifier,

    E1_DATA:)

    create table E1(E2-ID:identifier,

    E2_DATA:)

    create table R(R-ID:identifier,

    RtoE1: reference(E1),

    RtoE2: reference(E2))


Rdbms

XSQL

  • QUEL

  • component-of1:N


Rdbms

()

  • referenceJOIN

  • map(clustering)()


  • Login