I've interacted with SQL DBs for years in project/product management roles, although admittedly still a newbie when it comes to actually building and manipulating things within SQL directly. I've inherited a project and have spent hours trying to figure something by browsing through user docs and other posts and trying things but am still stumped - hence me calling in the experts! :)
What I am trying to finish building seemed like it would be pretty easy - it's basically a compatibility matrix between products. The information types I am working with are:
> Software Product Class (example: Intuit)
> Software Product (Quickbooks 2008, Quickbooks 2004, etc.)
> 3rd Party Product Class (example: Microsoft)
> 3rd Party Product (example: Windows XP, Word 2007, etc.)
> Integration Type (example: Operating System, Import, Sync, etc.)
> Support Level (example: Supported, Not Supported, etc.)
A sample of the end result of the matrix I'm trying to build would be something like:
Software Product | Int. Type | 3rd Party Product | Support Level
--------------------------------------------------------------------------
Intuit Quickbooks 2008 | Operating System | MS Windows XP | Supported
Intuit Quickbooks 2008 | Import | MS Word 2007 | Supported
Intuit Quickbooks 2004 | Import | MS Word 2007 | Not Supported
So here is what has been built so far specifically as far as tables:
LNProdClass
LNProdClassID (PK, int)
LNProdClassName (varchar (60))
LNProd
LNProdID (PK, int)
LNProdVersion (varchar (60))
LNProdRelease (varchar (60))
LNProdClassID (FK, int) <-- relates to LNProdClass.LNP rodClassID
TPProdClass
TPProdClassID (PK, int)
TPProdClassName (varchar (60))
TPProd
TPProdID (PK, int)
TPProdVersion (varchar (60))
TPProdRelease (varchar (60))
TPProdClassID (FK, int) <-- relates to TPProdClass.TPP rodClassID
Type
TypeID (PK, int)
TypeName (varchar (60))
SupLevel
SupLevelID (PK, int)
SupLevelName (varchar (60))
CompMap
MapID (PK, int)
LNProdID (FK, int) <-- relates to LNProd.LNProdID
TypeID (FK, int) <-- relates to Type.TypeID
SupLevelID (FK, int) <-- relates to SupLevel.SupLev elID
TPProID (FK, int) <-- relates to TPProd.TPProdID
I obviously have no problem running a query on CompMap, although since it is all ID-based my results obviously come out something like:
Software Product | Int. Type | 3rd Party Product | Support Level
--------------------------------------------------------------------------
1 | 1 | 1 | 1
1 | 2 | 2 | 1
2 | 2 | 2 | 2
What method that should be used to draw the *names* that relate to the *IDs* from the child tables is where I'm lost. I also haven't ruled out the possibility that a different table construct might accomplish this either.
Any suggestions on what to try or what reference material to view to help me figure this out would be greatly appreciated. Thanks in advance!
What I am trying to finish building seemed like it would be pretty easy - it's basically a compatibility matrix between products. The information types I am working with are:
> Software Product Class (example: Intuit)
> Software Product (Quickbooks 2008, Quickbooks 2004, etc.)
> 3rd Party Product Class (example: Microsoft)
> 3rd Party Product (example: Windows XP, Word 2007, etc.)
> Integration Type (example: Operating System, Import, Sync, etc.)
> Support Level (example: Supported, Not Supported, etc.)
A sample of the end result of the matrix I'm trying to build would be something like:
Software Product | Int. Type | 3rd Party Product | Support Level
--------------------------------------------------------------------------
Intuit Quickbooks 2008 | Operating System | MS Windows XP | Supported
Intuit Quickbooks 2008 | Import | MS Word 2007 | Supported
Intuit Quickbooks 2004 | Import | MS Word 2007 | Not Supported
So here is what has been built so far specifically as far as tables:
LNProdClass
LNProdClassID (PK, int)
LNProdClassName (varchar (60))
LNProd
LNProdID (PK, int)
LNProdVersion (varchar (60))
LNProdRelease (varchar (60))
LNProdClassID (FK, int) <-- relates to LNProdClass.LNP rodClassID
TPProdClass
TPProdClassID (PK, int)
TPProdClassName (varchar (60))
TPProd
TPProdID (PK, int)
TPProdVersion (varchar (60))
TPProdRelease (varchar (60))
TPProdClassID (FK, int) <-- relates to TPProdClass.TPP rodClassID
Type
TypeID (PK, int)
TypeName (varchar (60))
SupLevel
SupLevelID (PK, int)
SupLevelName (varchar (60))
CompMap
MapID (PK, int)
LNProdID (FK, int) <-- relates to LNProd.LNProdID
TypeID (FK, int) <-- relates to Type.TypeID
SupLevelID (FK, int) <-- relates to SupLevel.SupLev elID
TPProID (FK, int) <-- relates to TPProd.TPProdID
I obviously have no problem running a query on CompMap, although since it is all ID-based my results obviously come out something like:
Software Product | Int. Type | 3rd Party Product | Support Level
--------------------------------------------------------------------------
1 | 1 | 1 | 1
1 | 2 | 2 | 1
2 | 2 | 2 | 2
What method that should be used to draw the *names* that relate to the *IDs* from the child tables is where I'm lost. I also haven't ruled out the possibility that a different table construct might accomplish this either.
Any suggestions on what to try or what reference material to view to help me figure this out would be greatly appreciated. Thanks in advance!
Comment