RelationalDesign: Dodavanje1.sql

File Dodavanje1.sql, 7.6 KB (added by 184006, 10 months ago)
Line 
1set
2search_path = project;
3
4
5INSERT INTO project.cities
6("name", adress, phonenumber)
7VALUES('Skopje', 'Nikola Parapunov 27', '+389(0)23161019'),
8('Ohrid', 'Bulevar Makedonski Prosvetiteli', '070575881'),
9('Skopje', 'Blvd. Partizanski Odredi 62', '077 698 250');
10
11INSERT INTO project.vet_centers
12("name", description, adress, phonenumber, latitude, longitude, workinghours, citiesid)
13VALUES( 'Vet Svet', 'Тhe best for your pets', 'Nikola Parapunov 27', '+389(0)23161019', 41.9966401, 21.41712, 'Monday-Friday 10-19, Saturday 10-15', 1),
14( 'Veterinarian Ambulance - Dr.Tonit', 'Your pets are safe with us', 'Bulevar Makedonski Prosvetiteli', '070575881', 41.1196292, 20.7996689, 'Monday-Thursday 08-20, Friday-Saturday 08-07', 2),
15( 'Vet In', 'We exist for you and your pets', 'Blvd. Partizanski Odredi 62', '077 698 250', 42.0030601, 21.395752, 'Monday-Friday 9-12, 14-19', 3);
16
17INSERT INTO project.jobs
18(description, predictedsalery, vetcentersid)
19VALUES('doctor', '1500 EUR', 1),
20('secretary', '800 EUR', 1),
21('doctor', '1400 EUR', 3),
22('developer', '1800 EUR', 2);
23
24INSERT INTO project.roles
25("type")
26VALUES('admin'),
27('standard'),
28('manager'),
29('employee');
30
31INSERT INTO project.users
32("name", lastname, email, password, "number", role_id, jobs_id)
33VALUES('Ana', 'Kirova', 'ana.kirova99@gmail.com', 'Ana@123', '071220234', 2, 2),
34('Riste', 'Rizov', 'riste.rizov01@hotmail.com', 'Riste$11', '075450290', 2, 3),
35('Keti', 'Atanasova', 'keti.atanasovaaa@gmail.com', 'Keti12@', '078760330', 2, 1),
36('Elena', 'Rizova', 'elena.rizova05@gmail.com', 'Rizova12!', '071762110', 3, null),
37('Marina', 'Abrasheva', 'marina.abrashevaa@hotmail.com', 'Marina!1', '072324112', 4, null),
38('Angela', 'Pavlova', 'angela.pavlova07@hotmail.com', 'Angela@12', '078765240', 1, null),
39('Marija', 'Kortova', 'marija.kortova199@gmail.com', 'Marija123&', '072231129', 2, 4);
40
41
42INSERT INTO project.blog_post_for_consultations
43(date_askes, title, description, users_id)
44VALUES('2023-12-11', 'Urinary food', 'Can you recommend a urinary food because my kitten has urinary problems.', 1),
45('2023-06-12', 'Frequent vomiting', 'Мy dog is vomiting a lot, despite the therapy from the vet, please advise.', 2),
46('2023-04-10', 'Sterilization', 'When is the best time to sterilize a dog, before or after a period.', 3),
47('2023-05-09', 'Panleukopenia', 'Мy kitten got sick, he does not want to eat or drink water. The vet suspects panleukopenia despite the negative test. I am asking for your experience.', 7);
48
49INSERT INTO project.blog_post_answers
50(parent_id, reply, blogpostconsid, usersid)
51VALUES(1, 'Royal Canin', 1, 2),
52(2, 'Did you change his food?', 2, 1),
53(3, 'before a period', 3, 7),
54(4, 'seek advice from another vet!', 4, 2);
55
56INSERT INTO project.pet_cares
57(title, description, dateending, usersid, vetcentersid)
58VALUES('Аccommodation for a pet', 'I am looking for accommodation for my pet during the summer holidays. From July 12 to July 19', '2023-07-19', 1, 1),
59('Аccommodation for a pet', 'I will be moving to another apartment so I am looking for 2 weeks accommodation for my kitten', '2023-08-10', 2, 2),
60('Veterinary care', 'Мy dog is sick so he needs constant care. I need accommodation for him from 5 days', '2023-06-18', 3, 3);
61
62INSERT INTO project.type_of_pets
63(description, "name")
64VALUES('cat', 'Lana'),
65('dog', 'Roki'),
66('dog', 'Fifi'),
67('cat', 'Mimi'),
68('dog', 'Dzina');
69
70INSERT INTO project.pets
71(color, description, dateofbirthday, usersid, typeofpetsid)
72VALUES('white', 'Scottish Fold silver chincilla', '2022-05-20', 1, 1),
73('grey', 'Persian long hair', '2021-06-16', 2, 4),
74('brown', 'Large brown eyes, hanging ears,', '2020-12-30', 3, 2),
75('black', 'Toy poodle', '2018-04-24', 7, 3),
76('white', 'Toy poodle', '2019-10-20', 1, 5);
77
78INSERT INTO project.pet_galery
79(picture, petsid)
80VALUES('https://thumbs.dreamstime.com/z/scottish-fold-cat-special-friendly-cat-breed-famous-their-folded-little-ears-their-extremely-affectionate-139562562.jpg', 1),
81('https://cyprusanimals.files.wordpress.com/2011/08/persian.jpg',2),
82('https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcTHiFuem-8UxpTNsp3uo1tFYNScsL7CBOPO6hIn5-2XIwzVVI7N',3),
83('https://www.pupvine.com/wp-content/uploads/2021/12/Black-Toy-Poodle-An-Honest-Guide-To-The-Tiny-Teddy-Bear-Dog.jpg',4),
84('https://media.istockphoto.com/id/176894002/photo/close-up-of-white-toy-poodle-sitting.jpg?s=612x612&w=0&k=20&c=o12N6niEkm0AVip1KAk8_b66SFy92nwjhnq0hcg0CDM=',5);
85
86INSERT INTO project.reports
87(description, usersid, petsid)
88VALUES('Аfter receiving therapy for vomiting and diarrhea, the kitten is better, we will monitor his condition', 1, 1),
89('Тhe dog passed the castration well', 3, 3),
90('the kitten had urinary problems, next month he should eat only urine food', 2, 2);
91
92INSERT INTO project."diagnostics"
93(description, usersid)
94VALUES('Diarrhea and vomiting', 1),
95('Castration', 3),
96('Urinary problems', 2),
97('Urinary problems', 7);
98
99INSERT INTO project.manufacturers
100(name,description, city, state)
101VALUES('Sunvet PharmaPrivate','We are themanufacturer of Pharmaceutical Injection', 'Belgrade', 'Serbian'),
102('Macwell Pharmaceuticals Pvt. Ltd','we believe to work according to international quality standards and process reliable','Frankfurt', 'Germany'), --FORTAN,
103('SAM S FIELD','Top quality', 'Nuremberg', 'Germany'),
104('MMG Healthcare','We are offering Veterinary Injections in both wet and dry formulations. ', 'Nuremberg', 'Germany');
105
106
107
108INSERT INTO project.medecines
109(name,description, diagnosticsid, manufacturersid)
110VALUES('Biomix','Vitamin concentrate for cats with a high content of essential amino acids, vitamins, minerals, trace elements, as ideal as a supplement when feeding cats with raw food.', 1, 1),
111('Fortan','For quality, shiny and beautiful fur',3,2),
112('Sam ''s field','Functional semi-moist soft snacks for dogs with a reduced percentage of fat, to stimulate the digestive system and to improve skin and fur',1,3);
113
114INSERT INTO project.pet_status
115("type", node)
116VALUES('received', 'admitted for examination'),
117('weiting','waiting for his turn'),
118('weiting','waiting for surgery'),
119('received','admitted to surgery'),
120('recovers','');
121
122INSERT INTO project.therapy
123(description, appoitmentdate, diagnosticsid, pet_statusid)
124VALUES('antibiotic', '2023-12-12', 3, 1),
125('anesthesiac', '2022-10-09', 2, 3),
126('vitamins', '2023-07-06', 1, 5),
127('antibiotic', '2023-10-12', 3, 1);
128
129
130INSERT INTO project.breeds
131("name")
132VALUES('scottishfold'),
133('beagle'),
134('poodle'),
135('persian'),
136('poodle');
137
138INSERT INTO project.products
139("name", description, price, isactive, dateadded, category)
140VALUES('CAT ROYALE','High quality premium clamping cat litter ', '7 euro', true, '2022-10-09', 'Hygiene and cosmetics'),
141('Superior Care','Intended for white breed dogs to support full vision function', '3.50 euro', true, '2022-10-08', 'Dietary supplements'),
142('Lifestyle','Intended for adult cats over 1 year of age with a sensitive digestive system', '4.40 euro', true, '2022-10-09', 'Dietary supplements'),
143('Veterinary necklacke', 'for protection', '2 euro', 'false', '2022-10-09', 'Hygiene and cosmetics');
144
145INSERT INTO project.orders
146(quantity)
147VALUES(3),
148(10),
149(5);
150
151INSERT INTO project.pets_visit_vet_centers
152(id_pets, id_vet_centers)
153VALUES(1, 1),
154(2,2),
155(3,3),
156(4,1);
157
158
159INSERT INTO project.product_are_made_orders
160(id_products, id_orders)
161VALUES(1, 1),
162(2,2),
163(3,3);
164INSERT INTO project.products_available_type_of_pets
165(id_products, id_type_of_pets)
166VALUES(1, 1),
167(2,5),
168(3,1);
169
170INSERT INTO project.products_there_are_for_pets
171(id_products, id_pets)
172VALUES(1, 1),
173(2, 5),
174(3, 1);
175
176
177INSERT INTO project.therapy_takes_pets
178(id_therapy, id_pets)
179VALUES(1, 3),
180(2, 2),
181(1, 1),
182(3, 2);
183
184