create table CurrentAuction(
			auctionId integer,
			productId integer,
			sellerLogin varchar(20),
			thresholdPrice integer,
			reservePrice integer,
			startDate date,
			closingDate date,
			minIncrement integer,
			location varchar(20),
			primary key(auctionId)
			    );
				


create table Users(
		   userLogin varchar(20),
		   passwd varchar(20) ,
		   email varchar(40) ,
		   gender varchar(10),
		   dob date ,
		   firstName varchar(20) ,
		   lastName varchar(20) ,
		   address varchar(200),
		   city	varchar(20) ,
		   isSuspended varchar(2) ,
		   primary key(userLogin)
		);

create table CurrentBid(
		bidId integer,
		auctionId integer ,
		bidderLogin varchar(20) ,
		bidValue integer ,
		autobid varchar(1),
		maxAmount integer,
		bidTime date,        -- See it  ===============
		primary key(bidId)	
		);

create table ParentChild(
	     parentName varchar(30) ,
	     childName varchar(30),
	     primary key(childname)
			);

-- I am changing the type attribute of picture from blob to varchar
create table Product(
		      productName varchar(40)  , 	
		      productId integer,
		      imageURL varchar(40),
		      categoryName varchar(20) ,
		      primary key(productId) 
		    );


create table ProductStringAttributes(
				      productId integer ,
				      attributeName varchar(20) ,
				      attributeValue varchar(20) 
				   );

create table ProductIntegerAttributes(
				     productId integer ,
				     attributeName varchar(20) ,
				     attributeValue integer 
				    );


create table CategoryFeature(
			     categoryName varchar(30) ,
			     featureName varchar(30) ,
			     featureType varchar(30) 
			     );





create table BidHistory(
			bidId integer,
			auctionId integer ,
			bidderLogin varchar(20) ,
			bidValue integer ,
			autobid varchar(1),
			bidTime date            --see it =================
			);


create table Feedback(-- changed productId from auctionId
		       productId integer ,
		       winnerLogin varchar(20) ,
		       sellerLogin varchar(20) ,
		       winnerRatedSellerAs varchar(10),
		       sellerRatedWinnerAs varchar(10)		
		     );


create table SuccAuctHistory(
			      auctionId integer ,
			      productId integer , --
			      sellerLogin varchar(20) ,
			      thresholdPrice integer ,
			      reservePrice integer,
			      winnerLogin varchar(20) ,
			      winnerPrice integer 
			      -- productPicture varchar(20) no need of this now
			   );

create table UnsuccAuctHistory(
				auctionId integer , 
				productId integer , 
				sellerLogin varchar(20) ,
				thresholdPrice integer ,
				reservePrice integer,
				startDate date ,
				closingDate date ,
				minIncrement integer,
				location varchar(20)
			      );				   	



