Friends i am building a shopping site project in asp.net.
i have used these table for my database
LoginInfo
Column Name Data Type Constraint
UserName Varchar(100) Primary key
Password Varchar(100)
RoleName Varchar(100)
EmailID Varchar(100) Unique key
SecurityQuestion Varchar(1000)
SecurityAnswer Varchar(100)
LastLogin Datetime
ProductCategory
Column Name Data Type Constraint
CategoryID Varchar(20) Primary key
CategoryNam Varchar(100) Unique key
Description Varchar(1000)
ProductSubCategory
Column Name Data Type Constraint
SubCategoryID Int Auto increment , Primary key
SubCategoryName Varchar(100)
Description Varchar(1000)
CategoryID Varchar(20) Foreign key with Product Category
ProductSubCategory2
Column Name Data Type Constraint
SubCategory2ID Int Auto increment , Primary key
SubCategory2Name Varchar(100)
Description Varchar(1000)
SubCategoryID Varchar(20) Foreign key with Product SubCategory
CompanyInfo
Column Name Data Type Constraint
CompanyID Varchar(20) Primary key
CompanyName Varchar(100) Unique key
Description Varchar(1000)
ProductInfo
Column Name Data Type Constraint
ProductID Int Primary key , auto increment
ProductName Varchar(100)
SubCategoryID Int Foreign key with ProductSubCategory
CompanyID Varchar(20) Foreign key with CompanyInfo
Price Float
Quantity Int
Description Varchar(1000)
ProductStock
Column Name Data Type Constraint
StockID Int Primary key,auto increment
ProductID Int Foreign key with ProductInfo
Quantity Int
StockType Enum(‘IN’,’OUT’)
StockDate Datetime
ProductPhoto
Column Name Data Type Constraint
PhotoID Int Primary key,auto increment
PhotoName Varchar(100)
ExtName Varchar(100)
PhotoType Varchar(100)
PhotoSize Int
ProductID Int Foreign key with product info
So now my Question is in every shopping site there exist 4-5 photos for every product. So i should add the in database or the will be managed at client side. Currently i have added only single photo for every product.