Hi

I am trying to design db to coupon site
my problem:
item can be in several areas.
like : chair in South and North
for that I have created the extra categorytoarea table but i dont know how the relationship should be with other tables

Hi

I am trying to design db to coupon site
my problem:
item can be in several areas.
like : chair in South and North
for that I have created the extra categorytoarea table but i dont know how the relationship should be with other tables

please help...

if you are saying that the item is to be available in multiple but not necessarily all areas then you need to create a new table call ItemArea, for example.

ItemArea (ItemAreaId, AreaId, ItemId)

then change the relationship to insert this table between Item and Area in you model.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.