Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Staff table */
- CREATE TABLE Staff
- (
- StaffID smallint,
- StaffName VarChar(70) NOT NULL,
- StaffContactNo Char(8) NOT NULL,
- StaffDateJoined smalldatetime NOT NULL,
- StaffRole VarChar(50) NOT NULL,
- CONSTRAINT PK_Staff PRIMARY KEY (StaffID)
- );
- /*Condo table*/
- CREATE TABLE Condo
- (
- CondoID smallint,
- CondoName varchar(50) NOT NULL,
- CondoAddress varchar(150) NOT NULL,
- CONSTRAINT PK_Condo PRIMARY KEY (CondoID)
- );
- /*Account table*/
- CREATE TABLE Account
- (
- AccID Char(10),
- AccName VarChar(70) NOT NULL,
- AccAddress VarChar(150) NULL,
- AccCtcNo Char(8) NULL,
- AccEmail VarChar(50) NULL,
- CondoID smallint NOT NULL,
- ApprovedBy smallint NOT NULL,
- CONSTRAINT PK_Acc PRIMARY KEY (AccID),
- CONSTRAINT FK_Acc_Condo FOREIGN KEY (CondoID) REFERENCES Condo(CondoID),
- CONSTRAINT FK_Acc_Staff FOREIGN KEY (ApprovedBy) REFERENCES Staff(StaffID)
- );
- /*CondoMgmt table*/
- CREATE TABLE CondoMgmt
- (
- CondoMgmtID Char(10),
- ContactPerson VarChar(70) NOT NULL,
- CtcPersonMobile Char(8) NOT NULL,
- CONSTRAINT PK_CondoMgmt PRIMARY KEY (CondoMgmtID),
- CONSTRAINT FK_CondoMgmt_AccID FOREIGN KEY (CondoMgmtID) REFERENCES Account(AccID)
- );
- /*Announcement table*/
- CREATE TABLE Announcement
- (
- AnnID smallint,
- AnnText VarChar(200) NOT NULL,
- AnnStartDate smalldatetime NOT NULL,
- AnnEndDate smalldatetime NULL,
- CondoMgmtID Char(10) NOT NULL,
- CONSTRAINT PK_Announcement PRIMARY KEY (AnnID),
- CONSTRAINT FK_Announcement FOREIGN KEY (CondoMgmtID) REFERENCES CondoMgmt(CondoMgmtID)
- );
- /*Message table*/
- CREATE TABLE Message
- (
- MsgID smallint,
- MsgText VarChar(200) NOT NULL,
- MsgType VarChar(50) NOT NULL,
- PostedBy Char(10) NOT NULL,
- ReplyTo smallint NULL,
- CONSTRAINT PK_Message PRIMARY KEY (MsgID),
- CONSTRAINT FK_Message_PostedBy FOREIGN KEY (PostedBy) REFERENCES Account(AccID),
- CONSTRAINT FK_Message_ReplyTo FOREIGN KEY (ReplyTo) REFERENCES Message(MsgID),
- CONSTRAINT CHK_Message CHECK (MsgType IN ('Chatterbox', 'Garage Sale', 'Find a Buddy'))
- );
- /*ContactCat table*/
- CREATE TABLE ContactCat
- (
- CtcCatID smallint,
- CtcCatDesc varchar(100) NULL,
- CONSTRAINT PK_ContactCat PRIMARY KEY (CtcCatID)
- );
- /*Facility table*/
- CREATE TABLE Facility
- (
- FacID smallint,
- FacName varchar(50) NOT NULL,
- Deposit smallmoney NULL,
- CondoID smallint NOT NULL,
- CONSTRAINT PK_Facility PRIMARY KEY (FacID),
- CONSTRAINT FK_Facility_CondoID FOREIGN KEY (CondoID) REFERENCES Condo(CondoID)
- );
- /*FacTimeSlot table*/
- CREATE TABLE FacTimeSlot
- (
- FacID smallint,
- TimeSlotSN smallint,
- SlotDesc VarChar(100) NOT NULL,
- CONSTRAINT PK_FacTimeSlot PRIMARY KEY (FacID,TimeSlotSN),
- CONSTRAINT FK_FacTimeSlot_FacID FOREIGN KEY (FacID) REFERENCES Facility(FacID)
- );
- /*FeedbkCat table*/
- CREATE TABLE FeedbkCat
- (
- FbkCatID smallint,
- FbkCatDesc varchar(100) NOT NULL,
- CONSTRAINT PK_FeedbkCat PRIMARY KEY (FbkCatID)
- );
- /* Feedback table */
- CREATE TABLE Feedback
- (
- FbkID smallint,
- FbkDesc VarChar(200) NOT NULL,
- FbkDateTime smalldatetime NOT NULL,
- FbkStatus VarChar(20) NOT NULL,
- ByAccID Char(10) NOT NULL,
- FbkCatID smallint NOT NULL,
- CondoMgmtID Char(10) NOT NULL,
- CONSTRAINT PK_Feedback PRIMARY KEY(FbkID),
- CONSTRAINT FK_Feedback_ByAccID FOREIGN KEY(ByAccID) REFERENCES Account(AccID),
- CONSTRAINT FK_Feedback_FbkCatID FOREIGN KEY(FbkCatID) REFERENCES FeedbkCat(FbkCatID),
- CONSTRAINT FK_Feedback_CondoMgmtID FOREIGN KEY(CondoMgmtID) REFERENCES CondoMgmt(CondoMgmtID)
- );
- /*ItemCategory table*/
- CREATE TABLE ItemCategory
- (
- ItemCatID smallint,
- ItemCatDesc varchar(100) NOT NULL,
- CONSTRAINT PK_ItemCategory PRIMARY KEY (ItemCatID)
- );
- /*ItemRelated table*/
- CREATE TABLE ItemRelated
- (
- ItemID smallint,
- ItemDesc VarChar(200) NULL,
- ItemPrice smallmoney NULL,
- ItemStatus VarChar(9) NOT NULL,
- SaleOrRent Char(4) NOT NULL,
- ItemCatID smallint NOT NULL,
- CONSTRAINT PK_ItemRelated PRIMARY KEY (ItemID),
- CONSTRAINT FK_ItemRelated_ItemID FOREIGN KEY (ItemID) REFERENCES Message(MsgID),
- CONSTRAINT CHK_ItemRelated CHECK (ItemStatus IN ('Available', 'Sold', 'Reserved') AND SaleOrRent IN ('Rent','Sale')),
- CONSTRAINT FK_ItemRelated_ItemCatID FOREIGN KEY (ItemCatID) REFERENCES ItemCategory(ItemCatID)
- );
- /*ItemPhoto table*/
- CREATE TABLE ItemPhoto
- (
- ItemID smallint,
- Photo varchar(100) NOT NULL,
- CONSTRAINT PK_ItemPhoto PRIMARY KEY (ItemID,Photo),
- CONSTRAINT FK_ItemPhoto_ItemID FOREIGN KEY (ItemID) REFERENCES ItemRelated(ItemID)
- );
- /*BookSlot table*/
- CREATE TABLE BookSlot
- (
- FacID smallint,
- TimeSlotSN smallint NOT NULL,
- SlotDate smalldatetime NOT NULL DEFAULT(GETDATE()),
- SlotStatus VarChar(15) NOT NULL,
- CONSTRAINT PK_BookSlot PRIMARY KEY(FacID,TimeSlotSN,SlotDate),
- CONSTRAINT FK_BookSlot FOREIGN KEY(FacID, TimeSlotSN) REFERENCES FacTimeSlot(FacID, TimeSlotSN),
- CONSTRAINT CHK_BookSlot CHECK (SlotStatus in ('Booked', 'Available', 'Maintenance'))
- );
- /*Likes table*/
- CREATE TABLE Likes
- (
- AccID Char(10),
- MessageID smallint,
- CONSTRAINT PK_Likes PRIMARY KEY (AccID, MessageID),
- CONSTRAINT FK_Likes_AccID FOREIGN KEY (AccID) REFERENCES ACCOUNT(AccID),
- CONSTRAINT FK_Likes_MessageID FOREIGN KEY (MessageID) REFERENCES Message(MsgID)
- );
- /*Owner table*/
- CREATE TABLE Owner
- (
- OwnerID Char(10),
- OwnStartDate smalldatetime NOT NULL,
- CheckedBy Char(10) NOT NULL,
- CONSTRAINT PK_Owner PRIMARY KEY (OwnerID),
- CONSTRAINT FK_Owner_OwnerID FOREIGN KEY (OwnerID) REFERENCES Account(AccID),
- CONSTRAINT FK_Owner_CheckedBy FOREIGN KEY (CheckedBy) REFERENCES CondoMgmt(CondoMgmtID)
- );
- /*TempVehLabel table*/
- CREATE TABLE TempVehLabel
- (
- VehLblAppID smallint,
- TempStartDate smalldatetime NOT NULL,
- TempExpiryDate smalldatetime NOT NULL,
- CONSTRAINT PK_TempVehLabel PRIMARY KEY (VehLblAppID)
- );
- /*Tenant table*/
- CREATE TABLE Tenant
- (
- TenantID Char(10),
- ContractStartDate smalldatetime NOT NULL,
- ContractEndDate smalldatetime NULL,
- VerifiedBy Char(10) NOT NULL,
- CONSTRAINT PK_Tenant PRIMARY KEY (TenantID),
- CONSTRAINT FK_Tenant_TenantID FOREIGN KEY (TenantID) REFERENCES Account(AccID),
- CONSTRAINT FK_Tenant_VerifiedBy FOREIGN KEY (VerifiedBy) REFERENCES CondoMgmt(CondoMgmtID)
- );
- /* UsefulContact Table */
- CREATE TABLE UsefulContact
- (
- UsefulCtcID smallint,
- UsefulCtcName VarChar(50) NOT NULL,
- UsefulCtcDesc VarChar(100) NULL,
- UsefulCtcPhone Char(8) NOT NULL,
- CtcCatID smallint NOT NULL,
- CONSTRAINT PK_UsefulContact PRIMARY KEY (UsefulCtcID),
- CONSTRAINT FK_UsefulContact_CtcCatID FOREIGN KEY(CtcCatID) REFERENCES ContactCat(CtcCatID)
- );
- /*CondoUsefulContact table*/
- CREATE TABLE CondoUsefulContact
- (
- CondoID smallint,
- UsefulCtcID smallint NOT NULL,
- CONSTRAINT PK_CondoUsefulContact PRIMARY KEY (CondoID,UsefulCtcID),
- CONSTRAINT FK_CondoUsefulContact_CondoID FOREIGN KEY (CondoID) REFERENCES Condo(CondoID),
- CONSTRAINT FK_CondoUsefulContact_UsefulCtcID FOREIGN KEY (UsefulCtcID) REFERENCES UsefulContact(UsefulCtcID)
- );
- /*Vehicle table*/
- CREATE TABLE Vehicle
- (
- VehicleNo varchar(10),
- IUNo char(10) NOT NULL,
- Ownership varchar(50) NOT NULL,
- Make varchar(50) NOT NULL,
- Model varchar(50) NOT NULL,
- CONSTRAINT PK_Vehicle PRIMARY KEY (VehicleNo)
- );
- /*Booking table*/
- CREATE TABLE Booking
- (
- BookingID smallint,
- BookingDate smalldatetime NOT NULL,
- BookingStatus VarChar(20) NOT NULL,
- AccID Char(10) NOT NULL,
- FacID smallint NOT NULL,
- TimeSlotSN smallint NOT NULL,
- SlotDate smalldatetime NOT NULL,
- CONSTRAINT PK_Booking PRIMARY KEY(BookingID),
- CONSTRAINT FK_Booking_FacIDTimeSlotSNSlotDate FOREIGN KEY (FacID,TimeSlotSN,SlotDate) REFERENCES BookSlot(FacID,TimeSlotSN,SlotDate),
- CONSTRAINT FK_Booking_AccID FOREIGN KEY (AccID) REFERENCES Account(AccID)
- );
- /*VehicleLabel table*/
- CREATE TABLE VehicleLabel
- (
- VehLblAppID smallint,
- VehLblStatus Varchar(10) NOT NULL,
- VehLblNum Varchar(10) NULL,
- VehicleNo Varchar(10) NOT NULL,
- AppliedBy Char(10) NOT NULL,
- IssuedBy Char(10) NOT NULL,
- CONSTRAINT PK_VehicleLabel PRIMARY KEY(VehLblAppID),
- CONSTRAINT FK_VehicleLabel_VehicleNo FOREIGN KEY(VehicleNo) REFERENCES Vehicle(VehicleNo),
- CONSTRAINT FK_VehicleLabel_AppliedBy FOREIGN KEY(AppliedBy) REFERENCES Account(AccID),
- CONSTRAINT FK_VehicleLabel_IssuedBy FOREIGN KEY(IssuedBy) REFERENCES CondoMgmt(CondoMgmtID),
- CONSTRAINT CHK_VehicleLabel CHECK (VehLblStatus in ('Pending', 'Approved', 'Rejected'))
- );
- INSERT INTO Staff
- VALUES
- (1, 'Leon Kennedy', '94326543','20120305','Customer Service'),
- (2, 'Kurt Tay', '82534544','20151108','Tech Support'),
- (3, 'Jill Valentine', '96489453','20191215','Admin'),
- (4, 'Walter White', '87651234','20220111','Customer Service'),
- (5, 'John Tan', '91415555','20170605','Tech Support'),
- (6, 'Freddie Mercury', '94456784','20140522','Customer Service'),
- (7, 'Wong Boon Kiat', '82563759','20120824','Customer Service'),
- (8, 'Xiao Ming', '94326543','20100913','Admin'),
- (9, 'Ron Lee', '92476733','20230506','Tech Support'),
- (10, 'Brandon Koh', '88376470','20130912','Tech Support');
- INSERT INTO Condo
- VALUES
- (1, 'Hillview View', '59 Hillview Avenue 5'),
- (2, 'Bukit View', 'Bukit Batok Avenue 23'),
- (3, 'Hume Park', 'Hume Avenue 2'),
- (4, 'Clementi Town', 'Clementi Avenue 3'),
- (5, 'Serangoon Vista', '5 Serangoon Street'),
- (6, 'Yishun Home', 'Yishun Central 1'),
- (7, 'Mi Casa', 'Choa Chu Kang Avenue 3'),
- (8, 'King of Albert', ' 664 Bukit Timah Road'),
- (9, 'Marina', 'Raffles Avenue 54'),
- (10, 'The View of The Seas', '21 Keppel Bay')
- INSERT INTO Account
- VALUES
- ('1025700010', 'James Charles', '59 Hillview Avenue 5 Blk69 #01-04', '93691269', 'jamesc@gmail.com',1,3),
- ('1536750790', 'Tom Scott', '59 Hillview Avenue 5 Blk69 #29-01', '96389264', 'tomscott@hotmail.com',1,3),
- ('1000006783', 'Daniel Robert Middleton', '59 Hillview Avenue 5 Blk99 #19-02', '91459087', 'danTDM@yahoo.com',1,8),
- ('1134397390', 'Charles Christopher White Jr.', 'Bukit Batok Avenue 23 Blk 1 #03-04', '93824561', 'moistCritical@yahoo.com',2,8),
- ('1254397420', 'Albert Spencer Aretz', 'Bukit Batok Avenue 23 Blk 3 #05-01', '63134587', 'albertstuff@gmail.com',2,8),
- ('1948567869', 'Felix Arvid Ulf Kjellberg', 'Bukit Batok Avenue 23 Blk 3 #05-01', '90267891', 'pewdiepie@gmail.com',2,3),
- ('1114398950', 'Jake Paul', 'Hume Avenue 2 Blk 3 #11-01', '63134587', 'JakePaul@yahoo.com',3,3),
- ('1432604331', 'Ludwig Anders Ahgren', 'Hume Avenue 2 Blk 3 #11-01', '81942340', 'Ludwig@hotmail.com',3,8),
- ('1074910486', 'Orr Piamenta', 'Clementi Avenue 3 Tower 4 #22-01', '92386710', 'pinely@hotmail.com',4,8),
- ('1920715644', 'Vladislav Vashketov ', '5 Serangoon Street Blk3 #02-01', '91890094', 'VladAndNiki@outlook.com',6,3),
- ('1301890675', 'Nikita Vashketov', '5 Serangoon Street Blk3 #02-01', '92345890', 'VladAndNiki@outlook.com',6,3),
- ('1056790881', 'Chris P. Bacon', ' 5 Serangoon Street Blk1 #01-03', '57619081', ' ParashockX @outlook.com',6,8),
- ('1048558391', 'Abigail Thorn', 'Choa Chu Kang Avenue 3 Blk65 #014-03', '91867816', 'PhilosophyTube@outlook.com',7,3),
- ('1069438594', 'Adam Bahner', 'Choa Chu Kang Avenue 3 Blk70 #01-03', '81623045', 'TayZonday@outlook.com',7,8),
- ('1584809167', 'Adin Ross', '664 Bukit Timah Road Blk4 #01-03', '65430981', 'AdinRoss@outlook.com',8,8),
- ('1202848607', 'Nicholas Kolcheff ', '664 Bukit Timah Road Blk2 #05-05', '98375021', 'NICKMERCS@gmail.com',8,8),
- ('1039576914', 'PJ Liguori', '664 Bukit Timah Road Blk2 #07-03', '89750456', 'PJTheKick@gmail.com',8,3),
- ('1908715639', 'Ryan Higa', 'Raffles Avenue 54 #07-03', '98713902', 'higatv@gmail.com',9,3),
- ('1739154783', 'Sabine Hossenfelder', 'Raffles Avenue 54 #15-04', '91725899', 'SabineHossenfelder@gmail.com',9,8),
- ('1654103865', 'Salman Khan', 'Raffles Avenue 54 #25-03', '86513555', 'KhanAcedemy@yahoo.com',9,8),
- ('1000247813', 'Sara Maria Forsberg', '21 Keppel Bay Blk 5 #12-03', '61530977', 'SAARA@gmail.com',10,8),
- ('1333091845', 'Vi Hart', '21 Keppel Bay Blk 1 #08-02', '63450914', 'ViHart@gmail.com',10,3),
- ('2010234890', 'Lee P.', NULL, '98751045', NULL,1,8),
- ('2094015869', 'Long Mush Jr.', NULL, '87160985', NULL,2,3),
- ('2034590184', 'Tom Law', NULL, NULL, '67815607',3,3),
- ('2010385869', 'Saul Goodman', NULL, '98554015', NULL,4,3),
- ('2095867861', 'Tim Cooking', NULL, '81764132', NULL,5,8),
- ('2034958493', 'E. Long Mask', NULL, '82907819', NULL,6,8),
- ('2098475749', 'Jeff Pesos', NULL, '84965823', NULL,7,3),
- ('2064758343', 'Bill Hates ', NULL, '61789087', NULL,8,3),
- ('2078104785', 'Warrant Buffet', NULL, '91833145', NULL,9,8),
- ('2038485941', 'Surgay Brin', NULL, '91132013', NULL,10,3)
- INSERT INTO CondoMgmt
- VALUES
- ('2010234890', 'Lee P.', '98751045'),
- ('2094015869', 'Long Mush Jr.', '87160985'),
- ('2034590184', 'Tom Law', '67815607'),
- ('2010385869', 'Saul Goodman', '98554015'),
- ('2095867861', 'Tim Cooking', '81764132'),
- ('2034958493', 'E. Long Mask', '82907819'),
- ('2098475749', 'Jeff Pesos', '84965823'),
- ('2064758343', 'Bill Hates ', '61789087'),
- ('2078104785', 'Warrant Buffet', '91833145'),
- ('2038485941', 'Surgay Brin', '91132013')
- INSERT INTO Announcement
- VALUES
- (1, 'Fire Alarm testing will be commenced on 09/12 some time between 2pm and 3pm', '2022-12-01 00:00:00', '2022-12-10 00:00:00', '2010234890'),
- (2, 'Christmas Celebrations. There will be a Christmas lunch buffet from 11am to 2pm on December 25. Free of charge.', '2022-12-10 00:00:00', '2022-12-25 15:00:00', '2010234890'),
- (3, 'Mosquito fogging will be carried out between 4 to 5pm near the pool and carpark areas on Jan 3', '2023-12-30 00:00:00', '2024-01-03 18:00:00', '2094015869'),
- (4, 'Due to reports of residents smoking in the reading rooms, smoking detectors have been installed. Reminder that smoking in the reading rooms are prohibited. ', '2023-11-10 00:00:00',NULL, '2034590184'),
- (5, 'There will be lift repair works from 8pm to 11pm for Blk 3 on 20 Feb. During this time, both lifts in the block will be not operational', '2023-02-15 00:00:00', '2023-02-21 00:00:00', '2034590184'),
- (6, 'The Fire Alarm will be tested on 10 Jan, 1pm-2pm', '2024-01-05 00:00:00', '2024-01-10 14:30:00', '2095867861'),
- (7, 'Pool Maintenance. The swimming pools will be undergoing maintenance to fix the tiles and lights. It will be closed on November 20, from 10am to 1pm', '2023-11-14 00:00:00', '2023-11-20 14:00:00', '2034958493'),
- (8, 'The Gym has re-opened for resident use.', '2023-12-14 00:00:00',NULL, '2034958493'),
- (9, 'Blk 12 unit 12-03 will be undergoing construction works on 24 March. Apologies for the inconvenience.', '2023-3-18 00:00:00', '2022-03-25 00:00:00', '2034958493'),
- (10, 'Chinese New year. A special lion dance event has been organised to celebrate Chinese New Year at the main lobby on 31 Jan at 2pm', '2022-01-25 00:00:00', '2022-01-31 22:00:00', '2098475749'),
- (11, 'One of the lifts at block 4 will be undergoing maintenance from 5pm to 7pm on 8 April. Apologies for any inconvenience caused.', '2023-04-01 00:00:00', '2023-04-08 20:00:00', '2064758343'),
- (12, 'There will be mosquito fogging around block 5 from 4pm to 5pm on 20 Oct.', '2023-10-10 00:00:00', '2023-10-20 20:00:00', '2078104785'),
- (13, 'The tennis courts are now open. The rollers and nets have been replaced with new ones', '2024-01-03 00:00:00',NULL, '2078104785'),
- (14, ' Portable CCTVs has been placed for enhanced security monitoring at Block 71', '2024-01-06 00:00:00',NULL, '2038485941')
- INSERT INTO Message
- VALUES
- (1, 'Hitachi Fridge', 'Garage Sale', '1025700010', NULL),
- (2, ' Fear of God Essentials Hoodie. ', 'Garage Sale', '1000006783', NULL),
- (3, ' Dell latitude 15.6 fully HD display core i5 gen 8 Ram', 'Garage Sale', '1000006783', NULL),
- (4, ' I3 budget gaming desktop ', 'Garage Sale', '1000006783', NULL),
- (5, ' Pandora Bracelet', 'Garage Sale', '1025700010', NULL),
- (6, '5-Port Gigabit Desktop Switch', 'Garage Sale', '1025700010', NULL),
- (7, 'Two-seat sofa/couch', 'Garage Sale', '1301890675', NULL),
- (8, '3Sixty, Pikes, Loop Trifold Bicycle', 'Garage Sale', '1254397420', NULL),
- (9, 'Foldable bicycle', 'Garage Sale', '1254397420', NULL),
- (10, ' [RARE] ROLEX BUBBLEBACK ROSE GOLD1', 'Garage Sale', '1114398950', NULL),
- (11, 'Anyone free to play tennis over the weekend?', 'Find a Buddy', '1301890675', NULL),
- (12, 'Im down, where?', 'Find a Buddy', '1432604331', 3),
- (13, 'At my place, Serangoon Vista. Does 10am sound good?', 'Find a Buddy', '1301890675', 4),
- (14, 'Sure', 'Find a Buddy', '1432604331', 5),
- (15, 'Anyone know where good chicken rice is at queenstown?', 'Chatterbox', '1432604331', NULL),
- (16, 'I like the one at the mei ling hawker centre', 'Chatterbox', '1074910486', 7),
- (17, 'How much do you guys give away in your ang paos', 'Chatterbox', '1114398950', NULL),
- (18, 'Cats or dogs?', 'Chatterbox', '1114398950', NULL),
- (19, 'Mountain lions', 'Chatterbox', '1254397420', 10)
- INSERT INTO ContactCat
- VALUES
- (1, 'Businesses'),
- (2, 'Emergency Services'),
- (3, 'Condo Management')
- INSERT INTO Facility
- VALUES
- (1, 'Tennis Court 1',NULL,1),
- (2, 'Tennis Court 2',NULL,1),
- (3, 'Barbeque Pit 1',NULL,1),
- (4, 'Barbeque Pit 2',NULL,1),
- (5, 'Tennis Court A',NULL,2),
- (6, 'Tennis Court B',NULL,2),
- (7, 'Barbeque Pit A',5,2),
- (8, 'Barbeque Pit B',5,2),
- (9, 'Badminton Court A',NULL,3),
- (10, 'Badminton Court B',NULL,3),
- (11, 'Function Room A',NULL,3),
- (12, 'Function Room B',NULL,3),
- (13, 'Function Room C',NULL,3),
- (14, 'Function Room 1',10,4),
- (15, 'Function Room 2',10,4),
- (16, 'Function Room 3',10,4),
- (17, 'Squash Court',4,5),
- (18, 'Tennis Court' ,3,5),
- (19, 'Barbeque Pit',10,6),
- (20, 'Game Room A',NULL,7),
- (21, 'Game Room B',NULL,7),
- (22, 'Karaoke Room A',10,7),
- (23, 'Function Room',10,7),
- (24, 'Badminton Court 1',NULL,8),
- (25, 'Badminton Court 2',NULL,8),
- (26, 'Badminton Court 3',NULL,8),
- (27, 'Squash Court 1',NULL,8),
- (28, 'Squash Court 2',NULL,8),
- (29, 'Tennis Court',NULL,9),
- (30, 'Barbeque Pit 1',5,9),
- (31, 'Barbeque Pit 2',NULL,9),
- (32, 'Badminton Court',NULL,10)
- INSERT INTO FacTimeSlot
- VALUES
- (2, 1, '9-10AM'),
- (2, 2, '1-2PM'),
- (3, 1, '3-4PM'),
- (5, 1, '3-4PM'),
- (14, 1, '9-10AM'),
- (14, 2, '12-2PM'),
- (18, 1, '8-9AM'),
- (22, 1, '9-10AM'),
- (22, 2, '10-11AM'),
- (22, 3, '1-3PM'),
- (22, 4, '5-6PM'),
- (25, 1, '2-4PM'),
- (25, 2, '5-6PM')
- INSERT INTO FeedbkCat
- VALUES
- (1, 'Suggestions'),
- (2, 'Maintenance'),
- (3, 'Noise'),
- (4, 'Plumbing'),
- (5, 'Security'),
- (6, 'Facilities'),
- (7, 'Parking'),
- (8, 'Landscaping'),
- (9, 'Accessibility'),
- (10, 'Pets'),
- (11, 'Cleanliness')
- INSERT INTO Feedback
- VALUES
- (1, 'The grass at the entrance walkway is severely overgrown', '2023-12-01 09:23:00', 'Attended', '1025700010', 8, '2010234890'),
- (2, 'The hallway lights on the 5th floor are flickering. It creates a safety concern for residents and visitors.', '2021-05-12 14:30:00', 'Sent', '1025700010', 5, '2010234890'),
- (3, 'The water tap in the kitchen of unit #29-01 is leaking. It needs urgent attention to avoid water damage.', '2022-08-21 09:45:00', 'In Progress', '1536750790', 4, '2094015869'),
- (4, 'The elevator in Block 1, Unit #03-04 is making strange noises. It may need maintenance.', '2020-11-30 12:15:00', 'Attended', '1134397390', 2, '2034590184'),
- (5, 'There is a suspicious individual loitering near the entrance. Security needs to investigate.', '2023-01-17 18:20:00', 'Attended', '1948567869', 5, '2010385869'),
- (6, 'The swimming pool gate is not closing properly, posing a safety risk. It requires immediate attention.', '2020-07-05 16:10:00', 'In Progress', '1114398950', 6, '2095867861'),
- (7, 'The designated parking space for Unit #02-01 is frequently occupied by other vehicles.', '2022-03-28 07:55:00', 'Sent', '1432604331', 7, '2034958493'),
- (8, 'The flower beds in the common area look neglected. They need attention to enhance the landscaping.', '2021-09-14 11:40:00', 'Attended', '1074910486', 8, '2098475749'),
- (9, 'The wheelchair ramp near Block 3 is damaged, making it difficult for residents with mobility challenges.', '2022-05-03 13:25:00', 'In Progress', '1920715644', 9, '2064758343'),
- (10, 'A resident reported a neighbour not adhering to the pet policy, allowing their dog to roam freely.', '2023-04-02 20:05:00', 'Sent', '1301890675', 10, '2078104785'),
- (11, 'The common areas, especially the lobby, need more frequent cleaning to maintain a high standard of cleanliness.', '2020-12-10 10:30:00', 'Attended', '1056790881', 11, '2038485941'),
- (12, 'The playground equipment needs repairs. Some items are broken and may pose a risk to children.', '2022-06-18 15:50:00', 'Sent', '1025700010', 6, '2010234890'),
- (13, 'The hallway carpet on the 19th floor has a persistent stain. It affects the aesthetic appeal of the building.', '2021-08-02 11:15:00', 'In Progress', '1536750790', 11, '2094015869'),
- (14, 'The lighting in the parking lot near Block 4 is insufficient. It raises safety concerns for residents and their vehicles.', '2023-02-28 08:40:00', 'Attended', '1000006783', 7, '2034590184'),
- (15, 'Residents have observed unfamiliar individuals entering the premises without proper authorization. Security needs to investigate.', '2020-10-14 19:30:00', 'In Progress', '1134397390', 5, '2010385869'),
- (16, 'The communal garden needs more seating arrangements. It would enhance the facilities for residents to relax outdoors.', '2022-04-25 14:20:00', 'Sent', '1254397420', 6, '2095867861');
- INSERT INTO ItemCategory
- VALUES
- (1, 'Homeware'),
- (2, 'Furniture'),
- (3, 'Fashion'),
- (4, 'Electronics'),
- (5, 'Books and Stationery'),
- (6, 'Sports and Outdoors'),
- (7, 'Toys and Games'),
- (8, 'Health and Fitness'),
- (9, 'Collectibles and Art'),
- (10, 'Music and Instruments'),
- (11, 'Others');
- INSERT INTO ItemRelated
- VALUES
- (1, 'Hitachi Fridge 7/10 condition used for 3 years', 200, 'Available', 'Sale', 4),
- (2, 'FOG Essentials hoodie bought in 2022 but worn only thrice', 75, 'Sold', 'Sale', 3),
- (3, ' Dell laptop for work. Selling as I have upgraded already', 1500, 'Reserved', 'Sale', 4),
- (4, 'budget gaming desktop, can play games like valorant and cs:go at 60fps and above', 800, 'Available', 'Sale', 4),
- (5, 'pandora marvel series bracelet. Comes with Spider man charm', 85, 'Available', 'Sale', 3),
- (6, 'switch used for 3 months, condition is like new and everything is working', 30, 'Sold', 'Sale', 4),
- (7, 'sofa couch from ikea. Bought at 400', 245, 'Reserved', 'Sale', 2),
- (8, '3Sixty, Pikes, Loop Trifold Bicycle from RodaLink store, used once, no scratches and in perfect condition', 325, 'Available', 'Sale', 6),
- (9, 'Foldable bicycle, from Polygon, 14 inch wheel, 3 speed, V brake. Weight: 7.6kg. ', 195, 'Sold', 'Sale', 6),
- (10, ' Today i will be selling a 32mm Rolex bubbleback in rose gold (Watch only). Well condition', 2799, 'Reserved', 'Sale', 3);
- INSERT INTO ItemPhoto
- VALUES
- (1, 'photo 1'),
- (2, 'photo 2'),
- (3, 'photo 3'),
- (4, 'photo 4'),
- (5, 'photo 5'),
- (6, 'photo 6'),
- (7, 'photo 7'),
- (8, 'photo 8'),
- (9, 'photo 9'),
- (10, 'photo 10');
- INSERT INTO BookSlot
- VALUES
- (2,1, '2023-12-30 00:00:00', 'Available'),
- (2,1, '2023-12-31 00:00:00', 'Booked'),
- (2,2, '2023-12-30 00:00:00', 'Available'),
- (3,1, '2023-12-31 00:00:00', 'Booked'),
- (5,1, '2023-12-30 00:00:00', 'Available'),
- (5,1, '2023-12-31 00:00:00', 'Available'),
- (14,1, '2023-12-30 00:00:00', 'Maintenance'),
- (14,1, '2023-12-31 00:00:00', 'Maintenance'),
- (14,2, '2023-12-31 00:00:00', 'Available'),
- (14,2, '2024-01-01 00:00:00', 'Booked'),
- (18,1, '2023-12-29 00:00:00', 'Booked'),
- (18,1, '2023-12-30 00:00:00', 'Maintenance'),
- (22,1, '2023-12-31 00:00:00', 'Maintenance'),
- (22,2, '2023-12-31 00:00:00', 'Maintenance'),
- (22,3, '2023-12-31 00:00:00', 'Maintenance'),
- (22,4, '2023-12-31 00:00:00', 'Booked'),
- (25,1, '2023-12-31 00:00:00', 'Booked'),
- (25,1, '2024-01-01 00:00:00', 'Available'),
- (25,2, '2024-01-01 00:00:00', 'Maintenance')
- INSERT INTO Likes
- VALUES
- ('1025700010', 14),
- ('1025700010', 8),
- ('1536750790', 14),
- ('1000006783', 6),
- ('1134397390', 1),
- ('1254397420', 17),
- ('1948567869', 2),
- ('1114398950', 19),
- ('1432604331', 3),
- ('1074910486', 10),
- ('1920715644', 5),
- ('1301890675', 12),
- ('1056790881', 7);
- INSERT INTO Owner
- VALUES
- ('1056790881', '2019-12-10 00:00:00', '2010234890'),
- ('1000006783', '2018-10-03 00:00:00', '2010234890'),
- ('1536750790', '2020-12-02 00:00:00', '2095867861'),
- ('1134397390', '2020-04-24 00:00:00', '2010234890'),
- ('1254397420', '2017-12-06 00:00:00', '2078104785'),
- ('1948567869', '2016-07-14 00:00:00', '2078104785'),
- ('1432604331', '2013-01-30 00:00:00', '2098475749'),
- ('1074910486', '2017-03-27 00:00:00', '2078104785'),
- ('1920715644', '2015-12-25 00:00:00', '2038485941'),
- ('1301890675', '2017-12-10 00:00:00', '2038485941');
- INSERT INTO Tenant
- VALUES
- ('1025700010', '2023-04-05', '2025-04-05', '2095867861'),
- ('1114398950', '2023-05-12', '2024-05-12', '2010385869'),
- ('1048558391', '2023-07-18', '2024-07-18', '2034590184'),
- ('1069438594', '2023-09-03', '2024-09-03', '2078104785'),
- ('1584809167', '2023-11-22', '2024-11-22', '2098475749'),
- ('1202848607', '2023-03-15', '2024-03-15', '2034958493'),
- ('1039576914', '2023-01-08', '2024-01-08', '2038485941'),
- ('1908715639', '2023-04-30', '2024-04-30', '2095867861'),
- ('1739154783', '2023-06-25', '2024-06-25', '2064758343'),
- ('1654103865', '2023-08-17', '2024-08-17', '2094015869'),
- ('1000247813', '2023-10-05', '2024-10-05', '2010234890'),
- ('1333091845', '2023-12-12', '2024-12-12', '2094015869');
- INSERT INTO UsefulContact
- VALUES
- (1, 'QQ Barber', 'An affordable barber shop', '83462624', 1),
- (2, 'Fast Plumbing', '24/7 plumbing services', '68971234', 1),
- (3, 'Green Thumb Landscaping', 'Landscaping and garden maintenance', '98763456', 3),
- (4, 'Tech Haven', 'Electronics repair and support', '87654321', 1),
- (5, 'Healthy Bites Grocery', 'Organic and health-focused groceries', '68901234', 1),
- (6, 'Secure Solutions', 'Security systems installation and maintenance', '89012345', 3),
- (7, 'Read & Relax Bookstore', 'A wide selection of books and stationery', '98765432', 1),
- (8, 'FitHub Gym', 'Fitness classes and personal training', '89067890', 3),
- (9, 'Paws and Claws Pet Store', 'Pet supplies and grooming services', '67890123', 1),
- (10, 'Artistry Gallery', 'Exquisite art pieces and collectibles', '78901234', 1),
- (11, 'Melody Instruments', 'Music instruments sales and repair', '89056789', 1),
- (12, 'Tasty Delights Cafe', 'Delicious food and beverages', '67890123', 1),
- (13, 'Express Clean Laundry', 'Laundry and dry-cleaning services', '87654321', 1),
- (14, 'CarCare Auto Services', 'Car maintenance and repairs', '68901234', 1),
- (15, 'Wise Words Legal Services', 'Legal advice and consultation', '89012345', 3);
- INSERT INTO CondoUsefulContact
- VALUES
- (5, 1),
- (9, 2),
- (3, 3),
- (2, 4),
- (8, 5),
- (1, 6),
- (4, 7),
- (7, 8),
- (10, 9),
- (6, 10),
- (2, 11),
- (1, 12),
- (9, 13),
- (7, 14),
- (5, 15);
- INSERT INTO Vehicle
- VALUES
- ('SKA 1234 Y', '1234567890', 'Own', 'Mazda', 'CX-5'),
- ('SKB 5678 B', '2345678901', 'Rented', 'BMW', 'X3'),
- ('SKC 9012 C', '3456789012', 'Company Car', 'Subaru', 'Forester'),
- ('SKD 3456 D', '4567890123', 'Own', 'Mercedes-Benz', 'GLC'),
- ('SKE 7890 E', '5678901234', 'Rented', 'Audi', 'Q5'),
- ('SKF 2345 F', '6789012345', 'Own', 'Lexus', 'RX'),
- ('SKG 6789 G', '7890123456', 'Company Car', 'Volvo', 'XC60'),
- ('SKH 1234 H', '8901234567', 'Own', 'Jeep', 'Grand Cherokee'),
- ('SKJ 5678 J', '9012345678', 'Rented', 'Ford', 'Explorer'),
- ('SKK 9012 K', '2468101214', 'Own', 'Nissan', 'Rogue'),
- ('SKL 3456 L', '1369121518', 'Company Car', 'Chevrolet', 'Equinox'),
- ('SKM 7890 M', '4816326412', 'Own', 'Hyundai', 'Santa Fe'),
- ('SKN 2345 N', '4812162428', 'Rented', 'Kia', 'Sorento'),
- ('SKP 6789 P', '9182754108', 'Own', 'Volkswagen', 'Tiguan'),
- ('SKQ 1234 Q', '6121824307', 'Company Car', 'Porsche', 'Macan');
- INSERT INTO Booking
- VALUES
- (1, '2023-12-20', 'Confirmed', '1025700010', 2,1, '2023-12-31'),
- (2, '2023-12-22', 'Confirmed', '1000006783', 3,1, '2023-12-31'),
- (3, '2023-12-23', 'Pending Payment', '1254397420', 5,1, '2023-12-30'),
- (4, '2023-12-23', 'Cancelled', '1056790881', 14, 1, '2023-12-30'),
- (5, '2023-12-23', 'Cancelled', '1202848607', 5, 1, '2023-12-31'),
- (6, '2023-12-24', 'Confirmed', '1654103865', 14, 2, '2024-01-01'),
- (7, '2023-12-24', 'Confirmed', '1000247813', 18,1, '2023-12-29'),
- (8, '2023-12-25', 'Confirmed', '1333091845', 22,4, '2023-12-31'),
- (9, '2023-12-25', 'Confirmed', '1739154783', 25,1, '2023-12-31'),
- (10, '2023-12-26', 'Pending Payment', '1908715639', 25,1, '2024-01-01')
- INSERT INTO VehicleLabel
- VALUES
- (1, 'Approved', 'AAAAA00000', 'SKB 5678 B', '1000006783', '2010234890'),
- (2, 'Approved', 'KEBAB00001', 'SKC 9012 C', '1134397390', '2094015869'),
- (3, 'Approved', 'AAABB00002', 'SKD 3456 D', '1134397390', '2094015869'),
- (4, 'Approved', 'AAACC00055', 'SKA 1234 Y', '1254397420', '2010385869'),
- (5, 'Pending', 'BABAB10000', 'SKE 7890 E', '1432604331', '2034590184'),
- (6, 'Approved', 'KNNCB42069', 'SKF 2345 F', '1074910486', '2010234890'),
- (7, 'Approved', 'NNBCB55569', 'SKK 9012 K', '1301890675', '2034958493'),
- (8, 'Rejected', 'BBCKA55678', 'SKJ 5678 J', '1056790881', '2078104785'),
- (9, 'Rejected', 'MESSI31234', 'SKN 2345 N', '1048558391', '2038485941'),
- (10, 'Pending', 'VENUS13151', 'SKQ 1234 Q', '1908715639', '2095867861')
- INSERT INTO TempVehLabel
- VALUES
- (1, '2023-10-11', '2023-12-11'),
- (2, '2023-12-01', '2024-02-01'),
- (3, '2023-12-06', '2024-02-06'),
- (4, '2024-01-10', '2024-03-10'),
- (5, '2024-01-11', '2024-03-11'),
- (6, '2024-02-10', '2024-04-10'),
- (7, '2024-02-11', '2024-04-11'),
- (8, '2023-11-11', '2024-01-11'),
- (9, '2024-03-09', '2024-05-09'),
- (10, '2024-03-15', '2024-05-15')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement