p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   SQL Server 2000 (http://p2p.wrox.com/forumdisplay.php?f=20)
-   -   database problem (http://p2p.wrox.com/showthread.php?t=42586)

rahul8346 May 16th, 2006 01:04 AM

database problem
 
Hi,
I am preparing the Help Ticket for each an every Asset in my Application.

1) I wish to relate the HelpTicket with the S/W Asset but there are
multiple S/w license present with a S/W Asset..i.e, they have
1-Many relationship
2) Each pair of S/W License and S/W Product is considered an Asset
so i need to store some composite id for that to Uniquely
Identify it.

Consider my table,
Table
--------------
Software ---Similarly all Type of Assets Like H/W...
--------------
Productid [PK]

------------------------
HelpTicket_RelatedAsset
------------------------
ticketid [FK]
assetCategoryID [FK] ----Type Of Asset Like S/W
Typeid [FK] ----SubType of Asset Like for S/W it can be
System program,
Application program
Productid [FK] ----Particular AssetId as SoftwareProdID


Options1
------------
1) I can create an extra field in HelpTicket_RelatedAsset as
Licenseid , which will be empty for other Assets
2) I create an unique assetid which is not there and will be
require modify the existing code for H/W and Peripherals (In the
Sense create an assetID whenever an Asset is added to the
Application)


Is There Any other Way out.........Any Sugggestion would be HelpFull
Txs for reading....


rstelma May 16th, 2006 11:13 AM

Are you saying in part 2 that you have a many to many relationship? If that's the case, then you can use an intermediary table with a composite key but you probably already know how to do that. Not sure if I'm understanding what the problem is.



All times are GMT -4. The time now is 09:32 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.