Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 
CREATE OR REPLACE TYPE hypothesis AS TABLE OF VARCHAR2(20);
/
CREATE OR REPLACE TYPE Hypoth_pr AS OBJECT (prob_content VARCHAR2(20), pr NUMBER);
/
CREATE OR REPLACE TYPE Hypoth_po AS OBJECT (possib_content VARCHAR2(20), po NUMBER);
/
CREATE OR REPLACE TYPE focal_element AS OBJECT(focal_element_content hypothesis, focal_element_mass NUMBER);
/
CREATE OR REPLACE  TYPE bba AS TABLE OF focal_element;
/
CREATE OR REPLACE TYPE Pr_Dist AS TABLE OF Hypoth_pr;
/
CREATE OR REPLACE TYPE po_Dist AS TABLE OF Hypoth_po;
/
CREATE OR REPLACE TYPE confidence_level AS OBJECT(bel NUMBER, pl NUMBER);
/
CREATE TABLE edb (pid VARCHAR2(10) PRIMARY KEY, Disease bba, Symptom Pr_Dist, Age po_Dist, cl CONFIDENCE_LEVEL)
NESTED TABLE Disease STORE AS Diseases (NESTED TABLE focal_element_content STORE AS focal_element_contents_fs),
NESTED TABLE Symptom STORE AS Symptoms
NESTED TABLE Age STORE AS Ages;
/
INSERT INTO edb VALUES ('1', bba(focal_element(hypothesis('Pneumonia',1)) ),
pr_Dist(Hypoth_pr('Cough',0.5), Hypoth_pr('Headcaches',0.5)),
po_Dist(Hypoth_po('Old',1), Hypoth_po('Teenager',0.7)), 
CONFIDENCE_LEVEL(0.4,0.8));

Erreur commençant à la ligne: 26 de la commande -
INSERT INTO edb VALUES ('2', bba(focal_element(hypothesis('Pneumonia',0.2))),
pr_Dist(Hypoth_pr('Cough',0.5), Hypoth_pr('Headcaches',0.5)),
po_Dist(Hypoth_po('Old',1), Hypoth_po('Teenager',0.7)),
CONFIDENCE_LEVEL(0.4,0.8))
Erreur à la ligne de commande: 26 Colonne: 34
Rapport d'erreur -
Erreur SQL : ORA-02315: nombre d'arguments non valide pour constructeur par défaut
02315. 00000 - "incorrect number of arguments for default constructor"
*Cause: The number of arguments specified for the default constructor
doesn't match the number of attributes of the object type.
*Action: Specify the correct number of arguments for the default
constructor and retry the operation.