1 | -- Inserting data into city table
|
---|
2 | INSERT INTO city (CityName)
|
---|
3 | VALUES ('Skopje'),
|
---|
4 | ('Veles'),
|
---|
5 | ('Ohrid'),
|
---|
6 | ('Kumanovo'),
|
---|
7 | ('Stip');
|
---|
8 |
|
---|
9 | -- Inserting data into faculty table
|
---|
10 | INSERT INTO faculty (FacultyName, CityID)
|
---|
11 | VALUES ('FINKI', 1),
|
---|
12 | ('PMF', 1),
|
---|
13 | ('Gastronomija', 8);
|
---|
14 |
|
---|
15 | -- Inserting data into building table
|
---|
16 | INSERT INTO building (CityID, BuildingAddress)
|
---|
17 | VALUES (1, 'Blaze Koneski 10'),
|
---|
18 | (1, 'Gologanov 24'),
|
---|
19 | (8, 'Rade Koncar 1'),
|
---|
20 | (7, 'Gologanov 3'),
|
---|
21 | (12, 'Kiro Gligorov 3');
|
---|
22 |
|
---|
23 | -- Inserting data into appuser table
|
---|
24 | INSERT INTO appuser (prezime, ime, Password, phone_number , email_address , username)
|
---|
25 | VALUES ('Trajkovski', 'Filip', 'ft12', '111-111-111', 'test@mail.com', 'usernamet'),
|
---|
26 | ('Nikolovski', 'Blagoja', 'bn12', '111-111-111', 'test@mail.com', 'usernamen'),
|
---|
27 | ('Nikolov', 'Darko', 'dn23', '123-234-444', 'test@mail.com', 'usernamenn'),
|
---|
28 | ('Aleksandrov', 'Aleksandar', 'aa23', '222-222-222', 'test@mail.com','usernamea'),
|
---|
29 | ('Ristova', 'Ana', 'ar23', '444-222-111', 'test@mail.com','usernamer');
|
---|
30 |
|
---|
31 | -- Inserting data into apartment_owner table
|
---|
32 | INSERT INTO apartment_owner (OwnerID)
|
---|
33 | VALUES (1),
|
---|
34 | (3),
|
---|
35 | (4);
|
---|
36 |
|
---|
37 | -- Inserting data into administrator table
|
---|
38 | INSERT INTO administrator (AdminID, AdminRole)
|
---|
39 | VALUES (4, 'mod'),
|
---|
40 | (5, 'mod'),
|
---|
41 | (6, 'mod');
|
---|
42 |
|
---|
43 | -- Inserting data into student table
|
---|
44 | INSERT INTO student (StudentID, FacultyID, Age, Gender)
|
---|
45 | VALUES (3, 1, 21, 'male'),
|
---|
46 | (2, 1, 21, 'male');
|
---|
47 |
|
---|
48 | -- Inserting data into apartment table
|
---|
49 | INSERT INTO apartment (BuildingID, OwnerID, ApartmentFloorAndRoomNumber, ApartmentSize)
|
---|
50 | VALUES (1, 1, 'Vlez 4 Stan 3', '60m2'),
|
---|
51 | (2, 2, 'Vlez 1 Stan 12', '55m2'),
|
---|
52 | (3, 3, 'Vlez 3 Stan 6', '70m2');
|
---|
53 |
|
---|
54 | -- Inserting data into apartment_agreement table
|
---|
55 | INSERT INTO apartment_agreement (ApartmentID, OwnerID, DateSigned, DateExpires, ApartmentRent)
|
---|
56 | VALUES (4, 1, TO_DATE('10/09/2022', 'DD/MM/YYYY'), TO_DATE('30/06/2023', 'DD/MM/YYYY'), 250),
|
---|
57 | (5, 2, TO_DATE('10/09/2022', 'DD/MM/YYYY'), TO_DATE('30/06/2023', 'DD/MM/YYYY'), 300),
|
---|
58 | (4, 3, TO_DATE('10/09/2022', 'DD/MM/YYYY'), TO_DATE('30/06/2023', 'DD/MM/YYYY'), 250);
|
---|
59 |
|
---|
60 | -- Inserting data into student_signs table
|
---|
61 | INSERT INTO student_signs (StudentID, AgreementID)
|
---|
62 | VALUES (2, 3),
|
---|
63 | (1, 3);
|
---|
64 |
|
---|
65 | -- Inserting data into post table
|
---|
66 | INSERT INTO post (CityID, NumberOfRoommates, Price, DatePosted, Description)
|
---|
67 | VALUES ((SELECT CityID FROM city WHERE CityName = 'Skopje'), 2, 250, TO_DATE('10/09/2022', 'DD/MM/YYYY'), 'baram cimer'),
|
---|
68 | ((SELECT CityID FROM city WHERE CityName = 'Skopje'), 2, 300, TO_DATE('10/09/2022', 'DD/MM/YYYY'), 'izdavam stan'),
|
---|
69 | ((SELECT CityID FROM city WHERE CityName = 'Skopje'), 2, 300, TO_DATE('10/09/2022', 'DD/MM/YYYY'), 'izdavam stan'),
|
---|
70 | ((SELECT CityID FROM city WHERE CityName = 'Skopje'), 2, 300, TO_DATE('10/09/2022', 'DD/MM/YYYY'), 'baram cimer');
|
---|
71 |
|
---|
72 | -- Inserting data into owner_post table
|
---|
73 | INSERT INTO owner_post (OwnerPostID, ApartmentID, OwnerID)
|
---|
74 | VALUES (2, 3, 1),
|
---|
75 | (3, 2, 2),
|
---|
76 | (6, 4, 3);
|
---|
77 |
|
---|
78 | -- Inserting data into apartment_photos table
|
---|
79 | INSERT INTO apartment_photos (PostID, PhotosURL)
|
---|
80 | VALUES (2, 'link1'),
|
---|
81 | (3, 'link3'),
|
---|
82 | (6, 'link4');
|
---|
83 |
|
---|
84 | -- Inserting data into student_post table
|
---|
85 | INSERT INTO student_post (StudentPostID, StudentID)
|
---|
86 | VALUES (1, 1),
|
---|
87 | (4, 2),
|
---|
88 | (5, 2);
|
---|
89 |
|
---|
90 | -- Inserting data into moderates_posts_for table
|
---|
91 | INSERT INTO moderates_posts_for (CityID, AdminID)
|
---|
92 | VALUES ((SELECT CityID FROM city WHERE CityName = 'Skopje'), 4),
|
---|
93 | ((SELECT CityID FROM city WHERE CityName = 'Skopje'), 5),
|
---|
94 | ((SELECT CityID FROM city WHERE CityName = 'Stip'), 6);
|
---|