Commit bdbbfd8d authored by Osvaldo Valdivia Salas's avatar Osvaldo Valdivia Salas
Browse files

Update Clinique_RO.sql

parent 32d05388
CREATE OR REPLACE TYPE traitement AS OBJECT ( CREATE TYPE traitement AS OBJECT (
id_traitement NUMBER, id_traitement NUMBER,
debut DATE, debut DATE,
duree NUMBER, duree NUMBER,
...@@ -9,14 +9,14 @@ CREATE OR REPLACE TYPE traitement AS OBJECT ( ...@@ -9,14 +9,14 @@ CREATE OR REPLACE TYPE traitement AS OBJECT (
/ /
CREATE OR REPLACE TYPE listNumeros AS TABLE OF varchar(10); CREATE TYPE listNumeros AS TABLE OF VARCHAR(10);
/ /
CREATE OR REPLACE TYPE listTraitements AS TABLE OF traitement; CREATE TYPE listTraitements AS TABLE OF traitement;
/ /
CREATE OR REPLACE TABLE client ( CREATE TABLE client (
id_client NUMBER NOT NULL, id_client NUMBER NOT NULL,
nom VARCHAR(20) NOT NULL, nom VARCHAR(20) NOT NULL,
prenom VARCHAR(20) NOT NULL, prenom VARCHAR(20) NOT NULL,
...@@ -27,20 +27,14 @@ CREATE OR REPLACE TABLE client ( ...@@ -27,20 +27,14 @@ CREATE OR REPLACE TABLE client (
)NESTED TABLE numeros STORE AS l_numeros; )NESTED TABLE numeros STORE AS l_numeros;
/ /
CREATE OR REPLACE TABLE classeEspece( CREATE TABLE espece(
classeEscpece VARCHAR(30) NOT NULL PRIMARY KEY
);
/
CREATE OR REPLACE TABLE espece(
classeEspece VARCHAR(30) NOT NULL, classeEspece VARCHAR(30) NOT NULL,
espece VARCHAR(20) NOT NULL, espece VARCHAR(20) NOT NULL,
PRIMARY KEY(espece), PRIMARY KEY(espece)
FOREIGN KEY (classeEspece) REFERENCES classeEspece(classeEspece)
); );
/ /
CREATE OR REPLACE TABLE animal( CREATE TABLE animal(
id_animal NUMBER NOT NULL, id_animal NUMBER NOT NULL,
id_client NUMBER NOT NULL, id_client NUMBER NOT NULL,
espece VARCHAR(20) NOT NULL, espece VARCHAR(20) NOT NULL,
...@@ -53,4 +47,4 @@ CREATE OR REPLACE TABLE animal( ...@@ -53,4 +47,4 @@ CREATE OR REPLACE TABLE animal(
FOREIGN KEY (id_client) REFERENCES client(id_client), FOREIGN KEY (id_client) REFERENCES client(id_client),
FOREIGN KEY (espece) REFERENCES espece(espece) FOREIGN KEY (espece) REFERENCES espece(espece)
) NESTED TABLE traitements STORE AS l_traitements; ) NESTED TABLE traitements STORE AS l_traitements;
/ /
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment