inserts_JSON.sql 2.66 KB
Newer Older
Gaetan Carabetta's avatar
Gaetan Carabetta committed
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
INSERT INTO classeEspece (nomClasse) VALUES ('mammifere');
INSERT INTO classeEspece (nomClasse) VALUES ('reptile');
INSERT INTO classeEspece (nomClasse) VALUES ('oiseau');
INSERT INTO classeEspece (nomClasse) VALUES ('autres');

INSERT INTO Client (idClient,nom,prenom,ddn,adresse,numero) VALUES (1,'Harlan','Wise',to_date('1970-09-07', 'YYYY-MM-DD'),'Apdo.:630-5180 Fusce Avenida','0132102368');
INSERT INTO Client (idClient,nom,prenom,ddn,adresse,numero) VALUES (2,'Lee','Munoz',to_date('1985-01-31', 'YYYY-MM-DD'),'5900 Faucibus ','0721229832');
INSERT INTO Client (idClient,nom,prenom,ddn,adresse,numero) VALUES (3,'Gisela','Zamora',to_date('1984-06-18', 'YYYY-MM-DD'),'2165 Donec Avda.','0715456201');

INSERT INTO Espece (nomEspece,classe) VALUES ('hamster','mammifere');
INSERT INTO Espece (nomEspece,classe) VALUES ('chat','mammifere');
INSERT INTO Espece (nomEspece,classe) VALUES ('lapin','mammifere');
INSERT INTO Espece (nomEspece,classe) VALUES ('chien','mammifere');
INSERT INTO Espece (nomEspece,classe) VALUES ('souris','mammifere');
INSERT INTO Espece (nomEspece,classe) VALUES ('moineau', 'oiseau');
INSERT INTO Espece (nomEspece,classe) VALUES ('tortue','reptile');
INSERT INTO Espece (nomEspece,classe) VALUES ('dragon', 'autres');

INSERT INTO animal VALUES (
  1,'Nita',3079,62,to_date('2018-07-26', 'YYYY-MM-DD'),
  '[
    {
      "veterinaire":
      {
        "nom": "MURPHY",
        "prenom": "Carl"
      },
      "medicaments":[
        {
          "nom": "LEVOTHYROX",
          "quantité": 4
        },
        {
          "nom": "DOLIPRANE",
          "quantité": 3
        }
      ]
    },
    {
      "veterinaire":
      {
        "nom": "ZAMORA",
        "prenom": "Gisela"
      },
      "medicaments":[
        {
          "nom": "LEVOTHYROX",
          "quantité": 4
        },
        {
          "nom": "DOLIPRANE",
          "quantité": 3
        },
        {
          "nom": "LEVOTHYROX",
          "quantité": 2
        }
      ]
    }
  ]', 1,'lapin');



  INSERT INTO animal VALUES (
    2,'Tanisha',4107,12,to_date('2018-06-11', 'YYYY-MM-DD'),
  '[
    {
      "veterinaire":
      {
        "nom": "ZAMORA",
        "prenom": "Gisela"
      },
      "medicaments":[
        {
          "nom": "IMODIUM",
          "quantité": 2
        },
        {
          "nom": "FORLAX",
          "quantité": 3
        }
      ]
    }
  ]', 2,'lapin');


    INSERT INTO animal VALUES (
      3,'Rajah',3221,28,to_date('2011-10-12', 'YYYY-MM-DD'),
  '[
    {
      "veterinaire":
      {
        "nom": "ZAMORA",
        "prenom": "Gisela"
      },
      "medicaments":[
        {
          "nom": "PLAVIX",
          "quantité": 2
        }
      ]
    }
  ]', 3,'hamster');