Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
TD_NF17_goupe4
Clinique Veterinaire
Commits
4ce3f16b
Commit
4ce3f16b
authored
May 31, 2019
by
Xiang Li
Browse files
Update RO_2.sql
parent
9529c365
Changes
1
Hide whitespace changes
Inline
Side-by-side
RO_2/RO_2.sql
View file @
4ce3f16b
...
...
@@ -80,6 +80,21 @@ CREATE OR REPLACE TYPE ListRefTraitement AS TABLE OF TRefTraitement;
----------------------------------------------------------------
CREATE
OR
REPLACE
TYPE
TAnimal
AS
OBJECT
(
id
INTEGER
,
nom
VARCHAR
(
30
),
dernierPoids
INTEGER
,
derniereTaille
INTEGER
,
date_naissance
INTEGER
,
espece
REF
TEspece
,
traitements
ListRefTraitement
,
client
REF
TClients
);
/
CREATE
OR
REPLACE
TYPE
LAnimal
OF
TAnimal
;
/
CREATE
OR
REPLACE
TYPE
TClients
AS
OBJECT
(
id
INTEGER
,
telephone
INTEGER
,
...
...
@@ -96,37 +111,13 @@ nom NOT NULL,
prenom
NOT
NULL
,
date_naissance
NOT
NULL
,
adresse
NOT
NULL
,
animaux
Lanimaux
,
CHECK
(
telephone
>
100000000
AND
telephone
<
999999999
)
);
)
NESTED
TABLE
animaux
STORE
AS
NT_Animaux
(
NESTED
TABLE
traitements
STORE
AS
NT_Animaux_Traitements
);
/
CREATE
OR
REPLACE
TYPE
TAnimal
AS
OBJECT
(
id
INTEGER
,
nom
VARCHAR
(
30
),
dernierPoids
INTEGER
,
derniereTaille
INTEGER
,
date_naissance
INTEGER
,
espece
REF
TEspece
,
traitements
ListRefTraitement
,
client
REF
TClients
);
/
CREATE
TABLE
Animal
OF
TAnimal
(
nom
NOT
NULL
,
dernierPoids
NOT
NULL
,
derniereTaille
NOT
NULL
,
date_naissance
NOT
NULL
,
PRIMARY
KEY
(
id
),
CHECK
(
dernierPoids
>
0
),
CHECK
(
derniereTaille
>
0
),
client
NOT
NULL
,
SCOPE
FOR
(
client
)
IS
Clients
,
espece
NOT
NULL
,
SCOPE
FOR
(
espece
)
IS
Espece
)
NESTED
TABLE
traitements
STORE
AS
NT_Animal_Traitements
;
/
CREATE
TABLE
Veterinaires
(
id
INTEGER
,
telephone
INTEGER
NOT
NULL
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment