--Due to consistency requirements first add categories. These categories are being refrenced by PRoduct etc.

insert into ParentChild values('Product','Arts and Collections');
insert into ParentChild values('Product','Books and Magazines');
insert into ParentChild values('Product','Electronics');
insert into ParentChild values('Product','Toys and Games');
insert into ParentChild values('Product','Fashion');
insert into ParentChild values('Product','Furniture');
insert into ParentChild values('Product','Miscellaneous');
insert into ParentChild values('Product','Computers');
insert into ParentChild values('Product','Automobile');




insert into ParentChild values('Computers','Accessories');
insert into ParentChild values('Accessories','Ram');
insert into ParentChild values('Accessories','Monitor');
insert into ParentChild values('Computers','Hardware');
insert into ParentChild values('Hardware','Hard Disk');
insert into ParentChild values('Hardware','Floppy Drive');
insert into ParentChild values('Automobile','SportsCar');


insert into ParentChild values('Arts and Collections','Paintings');
insert into ParentChild values('Arts and Collections','Coins');
insert into ParentChild values('Arts and Collections','Stamps');



-----------------------------------------------------------------

insert into CategoryFeature values('Ram','company','string');
insert into CategoryFeature values('Ram','ramtype','string');
insert into CategoryFeature values('Ram','size','integer');

insert into CategoryFeature values('Monitor','company','string');
insert into CategoryFeature values('Monitor','size','integer');

insert into CategoryFeature values('SportsCar','company','string');
insert into CategoryFeature values('SportsCar','colour','string');
insert into CategoryFeature values('SportsCar','tyreType','string');
insert into CategoryFeature values('SportsCar','mileage','integer');


insert into CategoryFeature values('Hard Disk','company','String');
insert into CategoryFeature values('Hard Disk','StorageCapacity_GB','integer');
insert into CategoryFeature values('Hard Disk','Type_EIDE_SCSI','String');


insert into CategoryFeature values('Floppy Drive','company','String');
insert into CategoryFeature values('Floppy Drive','StorageCapacity_MB','integer');
--------------------------------------------------------------------


insert into Product values('RAM for no price',34,null,'Ram');

insert into Product values('10 days old monitor',21,null,'Monitor');

insert into Product values('Best Condition GT',05,null,'SportsCar');

insert into Product values('128MB SRAM',11,null,'Ram');

insert into Product values('New DRAM ',15,null,'Ram');

--------------------------------------------------------------
insert into ProductStringAttributes values(34,'company','Hundai');

insert into ProductStringAttributes values(34,'ramtype','Dram');

insert into ProductIntegerAttributes values(34,'size(in MB)',128);


insert into ProductStringAttributes values(11,'company','No name');

insert into ProductStringAttributes values(11,'ramtype','SRAM');

insert into ProductIntegerAttributes values(11,'size(in MB)',128);


insert into ProductStringAttributes values(15,'company','Hundai');

insert into ProductStringAttributes values(15,'ramtype','Dram');

insert into ProductIntegerAttributes values(15,'size(in MB)',64);



insert into ProductStringAttributes values(21,'company','Samsung');

insert into ProductIntegerAttributes values(21,'size(inch)',17);

insert into ProductStringAttributes values(05,'company','GT1');

insert into ProductStringAttributes values(05,'colour','red');

insert into ProductIntegerAttributes values(34,'mileage',150);

insert into ProductStringAttributes values(34,'tyreType','Rainy');

-------------------------------------------------------------
insert into CurrentAuction
values(10023,34,'sandeep',560,00,'09-OCT-01',TO_DATE('29-DEC-2001-08:00:00
A.M.','DD-MON-YYYY-HH:MI:SS A.M.'),10,'New York');

insert into CurrentAuction values(10024,11,'hjain',400,00,'09-DEC-01',TO_DATE('05-DEC-2001-12:59:28 P.M.','DD-MON-YYYY-HH:MI:SS A.M.'),10,'Calcutta');

insert into CurrentAuction values(9050,15,'sandy',230,50,'10-DEC-01',TO_DATE('29-DEC-2001-11:13:28 P.M.','DD-MON-YYYY-HH:MI:SS A.M.'),10,'Calcutta');

--insert into CurrentAuction values(10050,15,'sandy',230,50,'10-OCT-01','27-OCT-2001-11:34:34',10,'Ghat dopar');

insert into CurrentAuction values(10323,21,'sandy',56,00,'09-MAR-01','15-DEC-01',10,'Mumbai');


insert into CurrentAuction values(8923,05,'hjain',20,50,'03-APR-01','10-NOV-01',04,'Powai');




---------------------------------------------------------------
insert into Users values('sandeep','sandeep','pandey@cse.iitb.ac.in','Male','02-APR-1982','Sandeep','Pandey','so and so','Mumbai','no');


insert into Users values('sandy','sandy','pankajj@cse.iitb.ac.in','Male','02-APR-1982','Pankaj','Jain','so and so','Jaipur','no');


insert into Users values('hjain','hjain','hjain@cse.iitb.ac.in','Male','16-NOV-1981','Himanshu','Jain','yo and yo','Pune','no');

--------------------------------------------------------------



insert into BidHistory values(123456,10023,'hjain',562,'n','10-OCT-01');

insert into BidHistory values(132310,10023,'sandy',566,'n','11-OCT-01');

insert into CurrentBid values(133456,10023,'hjain',600,'y',700,'12-OCT-01');

insert into CurrentBid values(173456,10024,'hjain',6000,'y',700,'12-OCT-01');


insert into BidHistory values(103150,10323,'sandeep',58,'n','10-MAR-01');

insert into CurrentBid values(113050,10323,'hjain',62,'n',null,'10-APR-01');

insert into BidHistory values(8900,8923,'sandeep',22,'n','10-APR-01');

insert into CurrentBid values(10000,8923,'sandy',32,'y',40,'15-APR-01');

--------------------------------------------------------------


insert into Feedback values(1031,'hjain','sandeep','good', 'good');
insert into Feedback values(1023,'hjain','nilesh','neutral', 'bad');
insert into Feedback values(1041,'sandeep','sandy','good', 'good');
insert into Feedback values(1201,'nilesh','sandeep','bad', 'bad');
insert into Feedback values(1091,'pachu','sandeep','good', 'neutral');
insert into Feedback values(1671,'hjain','nilesh','good', 'good');

------------------------------------------------------------------

-------------------------------------------------------------------



--I am adding new entries
-- I will put all inserts corresponding to a  new category at one place

-- I won't add any entries that are related to bidding or auction right now
--insert into CurrentAuction values(8923,05,'hjain',20,50,'03-APR-01','10-NOV-01',04,'Powai');

--insert into Product values(05,null,'SportsCar');


--Adding features to final categories
---------



----------



-----------


--Building Tree Structure level=1


-------------------------------------------------------------------

--select * from parentchild;

--select * from parentchild where parentName='Hardware';
















