Add new file

parent d88e2a23
DROP TABLE esp-med;
/
DROP TABLE Classe;
/
DROP TYPE listeEspeces;
/
DROP TYPE espece;
/
DROP TABLE medicament;
/
DROP TABLE veterinaire;
/
DROP TABLE clients;
/
DROP TYPE listeAnimals;
/
DROP TYPE animal;
/
DROP TYPE listTraitements;
/
DROP TYPE traitement;
/
CREATE TYPE traitement AS OBJECT (
id_traitement NUMBER,
debut DATE,
duree NUMBER,
quantite NUMBER
);
/
CREATE TYPE listTraitements AS TABLE OF traitement;
/
CREATE TYPE animal AS OBJECT (
id_animal NUMBER,
nom VARCHAR(20),
poid FLOAT,
TAILLE FLOAT,
dn DATE,
traitements listTraitements
);
/
CREATE TYPE listeAnimals AS TABLE OF animal;
/
CREATE TABLE clients (
id_client NUMBER,
nom VARCHAR(20),
prenom VARCHAR(20),
dn DATE,
adresse VARCHAR(50),
n_tel NUMBER,
animal listeAnimals
PRIMARY KET(id_client)
);
/
CREATE TABLE veterinaire (
id_veterinaire NUMBER,
nom VARCHAR(20)
);
/
CREATE TABLE medicament (
nom VARCHAR(20),
traitements listTraitements
);
/
CREATE TYPE espece AS OBJECT(
espece VARCHAR(20)
);
/
CREATE TYPE listeEspeces AS TABLE OF espece;
/
CREATE TABLE Classe (
classe VARCHAR(20),
espece listeEspeces,
PRIMARY KEY(classe),
CHECK (classe in ('mammifere', 'reptiles', 'oiseaux', 'autres'))
);
/
CREATE TABLE esp-med (
med VARCHAR(20),
classe VARCHAR(20),
FOREIGN KEY (med) REFERENCES medicamentt(nom),
FOREIGN KEY (classe) REFERENCES Classe(classe)
);
/
\ 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