RelationalDesign: vnesuvanje.sql

File vnesuvanje.sql, 3.4 KB (added by 201144, 2 years ago)
Line 
1insert into appuser(ime,prezime,pass,phone_number,city_of_residency,datumragj)
2values ('Filip','Trajkovski','ft12','111-111-111','Skopje',TO_DATE('15/04/2001', 'DD/MM/YYYY')),
3 ('Blagoja','Nikolovski','bn12','111-111-111','Skopje',TO_DATE('01/01/2001', 'DD/MM/YYYY')),
4 ('Darko','Nikolov','dn23','123-234-444','Ohrid',TO_DATE('02/06/1979', 'DD/MM/YYYY')),
5 ('Aleksandar','Aleksandrov','aa23','222-222-222','Veles',TO_DATE('05/05/1994', 'DD/MM/YYYY')),
6 ('Ana','Ristova','ar23','444-222-111','Bitola',TO_DATE('11/12/1989', 'DD/MM/YYYY'));
7
8insert into apartment_owner(ownerid)
9values (1),
10 (2),
11 (3);
12
13insert into administrator(adminid,adminrole)
14values (4,'mod'),
15 (5,'mod'),
16 (6,'mod');
17
18insert into city(cityname)
19values ('Skopje'),
20 ('Veles'),
21 ('Ohrid'),
22 ('Kumanovo'),
23 ('Stip');
24
25insert into building(cityname,building_adress)
26values ('Skopje','Blaze Koneski 10'),
27 ('Skopje','Gologanov 24'),
28 ('Ohrid', 'Rade Koncar 1'),
29 ('Kumanovo', 'Gologanov 3'),
30 ('Stip', 'Kiro Gligorov 3');
31
32
33
34insert into faculty(facultyname,cityname)
35values ('FINKI','Skopje'),
36 ('PMF','Skopje'),
37 ('Gastronomija','Ohrid');
38
39insert into student(studentid,facultyid,age,gender)
40values (2,1,21,'male'),
41 (1,1,21,'male');
42
43
44insert into apartment(buildingid,ownerid,apartment_adress,apartment_size)
45values (1,1,'Vlez 4 Stan 3','60m2'),
46 (2,2,'Vlez 1 Stan 12','55m2'),
47 (3,3,'Vlez 3 Stan 6','70m2');
48insert into apartment_agreement(apartmentid,ownerid,date_signed,date_expires,apartment_rent)
49values (4,1,TO_DATE('10/09/2022', 'DD/MM/YYYY'),TO_DATE('30/06/2023', 'DD/MM/YYYY'),250),
50 (5,2,TO_DATE('10/09/2022', 'DD/MM/YYYY'),TO_DATE('30/06/2023', 'DD/MM/YYYY'),300);
51insert into apartment_agreement(apartmentid,ownerid,date_signed,date_expires,apartment_rent)
52values (4,3,TO_DATE('10/09/2022', 'DD/MM/YYYY'),TO_DATE('30/06/2023', 'DD/MM/YYYY'),250);
53
54insert into student_signs(studentid,agreementid)
55values (2,3),
56 (1,3);
57
58insert into student_signs(studentid,agreementid)
59values (2,4),
60 (1,5);
61
62insert into post(cityname,number_of_roommates,price,date_posted,description)
63values ('Skopje',2,250,TO_DATE('10/09/2022', 'DD/MM/YYYY'),'baram cimer'),
64 ('Skopje',2,300,TO_DATE('10/09/2022', 'DD/MM/YYYY'),'izdavam stan'),
65 ('Skopje',2,300,TO_DATE('10/09/2022', 'DD/MM/YYYY'),'izdavam stan'),
66 ('Skopje',2,300,TO_DATE('10/09/2022', 'DD/MM/YYYY'),'baram cimer');
67
68
69
70insert into post(cityname,number_of_roommates,price,date_posted,description)
71values ('Skopje',3,250,TO_DATE('10/09/2022', 'DD/MM/YYYY'),'baram cimeri');
72insert into post(cityname,number_of_roommates,price,date_posted,description)
73values ('Ohrid',4,400,TO_DATE('10/09/2022', 'DD/MM/YYYY'),'izdavam stan');
74
75
76
77insert into owner_post(owner_postid,apartmentid,ownerid)
78values (2,4,1),
79 (3,5,2);
80insert into owner_post(owner_postid,apartmentid,ownerid)
81values (6,6,3);
82
83insert into apartment_photos(postid,photosurl)
84values (2,'link1'),
85 (3,'link3');
86insert into apartment_photos(postid,photosurl)
87values (6,'link4');
88
89insert into student_post(student_postid,studentid)
90values (1,1),
91 (4,2);
92insert into student_post(student_postid,studentid)
93values (5,2);
94
95insert into moderates_posts_for(cityname,adminid)
96values ('Skopje',4),
97 ('Skopje',5),
98 ('Stip',6);
99
100
101
102
103