inserts_JSON.sql 3.51 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
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",
Gaetan Carabetta's avatar
Gaetan Carabetta committed
31
32
33
34
35
36
          "posologie":
          {
            "debut": "2019-06-17",
            "duree": 10,
            "quantité": 4
          }
Gaetan Carabetta's avatar
Gaetan Carabetta committed
37
38
39
        },
        {
          "nom": "DOLIPRANE",
Gaetan Carabetta's avatar
Gaetan Carabetta committed
40
41
42
43
44
45
          "posologie":
          {
            "debut": "2019-06-17",
            "duree": 10,
            "quantité": 3
          }
Gaetan Carabetta's avatar
Gaetan Carabetta committed
46
47
48
49
50
51
52
53
54
55
56
57
        }
      ]
    },
    {
      "veterinaire":
      {
        "nom": "ZAMORA",
        "prenom": "Gisela"
      },
      "medicaments":[
        {
          "nom": "LEVOTHYROX",
Gaetan Carabetta's avatar
Gaetan Carabetta committed
58
59
60
61
62
63
          "posologie":
          {
            "debut": "2019-06-17",
            "duree": 10,
            "quantité": 4
          }
Gaetan Carabetta's avatar
Gaetan Carabetta committed
64
65
66
        },
        {
          "nom": "DOLIPRANE",
Gaetan Carabetta's avatar
Gaetan Carabetta committed
67
68
69
70
71
72
          "posologie":
          {
            "debut": "2019-06-17",
            "duree": 10,
            "quantité": 3
          }
Gaetan Carabetta's avatar
Gaetan Carabetta committed
73
74
75
        },
        {
          "nom": "LEVOTHYROX",
Gaetan Carabetta's avatar
Gaetan Carabetta committed
76
77
78
79
80
81
          "posologie":
          {
            "debut": "2019-06-17",
            "duree": 10,
            "quantité": 2
          }
Gaetan Carabetta's avatar
Gaetan Carabetta committed
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
        }
      ]
    }
  ]', 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",
Gaetan Carabetta's avatar
Gaetan Carabetta committed
101
102
103
104
105
106
          "posologie":
          {
            "debut": "2019-06-17",
            "duree": 10,
            "quantité": 2
          }
Gaetan Carabetta's avatar
Gaetan Carabetta committed
107
108
109
        },
        {
          "nom": "FORLAX",
Gaetan Carabetta's avatar
Gaetan Carabetta committed
110
111
112
113
114
115
          "posologie":
          {
            "debut": "2019-06-17",
            "duree": 10,
            "quantité": 3
          }
Gaetan Carabetta's avatar
Gaetan Carabetta committed
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
        }
      ]
    }
  ]', 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",
Gaetan Carabetta's avatar
Gaetan Carabetta committed
134
135
136
137
138
139
          "posologie":
          {
            "debut": "2019-06-17",
            "duree": 10,
            "quantité": 2
          }
Gaetan Carabetta's avatar
Gaetan Carabetta committed
140
141
142
143
        }
      ]
    }
  ]', 3,'hamster');