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

Update Clinique_RO.sql

parent dccff7f2
CREATE OR REPLACE TYPE traitement AS OBJECT ( CREATE OR REPLACE TYPE traitement AS OBJECT (
id_traitement NUMBER NOT NULL, id_traitement NUMBER,
debut DATE NOT NULL, debut DATE,
duree NUMBER NOT NULL, duree NUMBER,
quantite NUMBER NOT NULL, quantite NUMBER,
veterinaire VARCHAR(30) NOT NULL, veterinaire VARCHAR(30),
medicament VARCHAR(30) NOT NULL medicament VARCHAR(30)
); );
/ /
CREATE OR REPLACE TYPE numero AS OBJECT(
numero VARCHAR(12)
);
/
CREATE OR REPLACE TYPE listNumeros AS TABLE OF numero;
/
CREATE OR REPLACE TYPE listTraitements AS TABLE OF traitement; CREATE OR REPLACE TYPE listTraitements AS TABLE OF traitement;
/ /
CREATE OR REPLACE TYPE animal AS OBJECT ( CREATE OR REPLACE TYPE animal AS OBJECT (
id_animal NUMBER NOT NULL, id_animal NUMBER,
nom VARCHAR(20), nom VARCHAR(20),
poid FLOAT, poid FLOAT,
TAILLE FLOAT, TAILLE FLOAT,
dn DATE, dn DATE,
traitements listTraitements NOT NULL, traitements listTraitement,
PRIMARY KEY (id_animal) PRIMARY KEY (id_animal)
) NESTED TABLE traitements STORED AS l_traitements; ) NESTED TABLE traitements STORE AS l_traitements;
/ /
CREATE OR REPLACE TYPE listeAnimals AS TABLE OF animal; CREATE OR REPLACE TYPE listAnimals AS TABLE OF animal;
/ /
CREATE OR REPLACE TABLE clients ( CREATE OR REPLACE 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,
dn DATE NOT NULL, dn DATE NOT NULL,
adresse VARCHAR(50) NOT NULL, adresse VARCHAR(50) NOT NULL,
n_tel NUMBER NOT NULL,
animals listeAnimals NOT NULL, animals listeAnimals NOT NULL,
numeros listNumeros NOT NULL,
PRIMARY KEY(id_client) PRIMARY KEY(id_client)
)NESTED TABLE animals STORED AS l_animals; )NESTED TABLE animals STORE AS l_animals,
NESTED TABLE numeros STORE AS l_numeros;
/ /
CREATE OR REPLACE TABLE classeEspece( CREATE OR REPLACE TABLE classeEspece(
...@@ -47,4 +56,4 @@ CREATE OR REPLACE TABLE espece( ...@@ -47,4 +56,4 @@ CREATE OR REPLACE TABLE espece(
PRIMARY KEY(espece), PRIMARY KEY(espece),
FOREIGN KEY (classeEspece) REFERENCES classeEspece(classeEspece) FOREIGN KEY (classeEspece) REFERENCES classeEspece(classeEspece)
); );
/ /
\ 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