Difference between revisions of "Ds"

From Wikivyuka
Jump to: navigation, search
m
m
Line 34: Line 34:
 
  SDO_ORDINATE_ARRAY(5,10 , 4,10 , 2,10 , 9,15 , 9,16 , 20,10, 5,10 )
 
  SDO_ORDINATE_ARRAY(5,10 , 4,10 , 2,10 , 9,15 , 9,16 , 20,10, 5,10 )
 
  )
 
  )
 +
);
 +
 +
create table vlastnictvi(
 +
idVlastnictvi number primary key,
 +
idVlastnik number(6) not null,
 +
idParcela number(6) not null,
 +
odVlastni date not null,
 +
doVlastni date,
 +
constraints vla_vla foreign key (idVlastnik) references vlastnik,
 +
constraints vla_pa foreign key (idParcela) references parcela
 
  );
 
  );

Revision as of 08:34, 1 March 2012

create table parcela
(idParcela number primary key,
ku varchar2(8),
tvarParcely sdo_geometry
);
INSERT INTO parcela VALUES(
0,
'ova01',
SDO_GEOMETRY(2003,
NULL,
NULL, 
SDO_ELEM_INFO_ARRAY(1,1003,3), --obdelnik
SDO_ORDINATE_ARRAY(1,1,5,10)
)
);
INSERT INTO parcela VALUES(
1,
'bu02',
SDO_GEOMETRY(2003,
NULL,
NULL, 
SDO_ELEM_INFO_ARRAY(1,1003,3), --obdelnik
SDO_ORDINATE_ARRAY(2,6, 9.9)
)
);
INSERT INTO parcela VALUES(
2,
'ova005',
SDO_GEOMETRY( 2003,
NULL, NULL, SDO_ELEM_INFO_ARRAY(1,1003,1), -- polygon
SDO_ORDINATE_ARRAY(5,10 , 4,10 , 2,10 , 9,15 , 9,16 , 20,10, 5,10 )
)
);
create table vlastnictvi(
idVlastnictvi number primary key,
idVlastnik number(6) not null, 
idParcela number(6) not null,
odVlastni date not null,
doVlastni date,
constraints vla_vla foreign key (idVlastnik) references vlastnik,
constraints vla_pa foreign key (idParcela) references parcela
);