Update Clinique_RO.sql

parent 32d05388
CREATE OR REPLACE TYPE traitement AS OBJECT (
CREATE TYPE traitement AS OBJECT (
id_traitement NUMBER,
debut DATE,
duree NUMBER,
......@@ -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,
nom VARCHAR(20) NOT NULL,
prenom VARCHAR(20) NOT NULL,
......@@ -27,20 +27,14 @@ CREATE OR REPLACE TABLE client (
)NESTED TABLE numeros STORE AS l_numeros;
/
CREATE OR REPLACE TABLE classeEspece(
classeEscpece VARCHAR(30) NOT NULL PRIMARY KEY
);
/
CREATE OR REPLACE TABLE espece(
CREATE TABLE espece(
classeEspece VARCHAR(30) NOT NULL,
espece VARCHAR(20) NOT NULL,
PRIMARY KEY(espece),
FOREIGN KEY (classeEspece) REFERENCES classeEspece(classeEspece)
PRIMARY KEY(espece)
);
/
CREATE OR REPLACE TABLE animal(
CREATE TABLE animal(
id_animal NUMBER NOT NULL,
id_client NUMBER NOT NULL,
espece VARCHAR(20) NOT NULL,
......@@ -53,4 +47,4 @@ CREATE OR REPLACE TABLE animal(
FOREIGN KEY (id_client) REFERENCES client(id_client),
FOREIGN KEY (espece) REFERENCES espece(espece)
) 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