Ask Experts Questions for FREE Help!
  Advanced
Register  |  Log in  
   Ask    
 Answer  
  Help  

Ask QuestionsprogressAnswer QuestionsprogressBuild ReputationprogressBecome an Expert
 
Free Answers in 3 Easy Steps

Register Now
3 Steps

At Ask Me Help Desk you can ask questions in any topic and have them answered for free by our experts. To ask questions or participate in answering them you must register for a free account. By registering you will be able to:
  • Get free answers from experts in any of our 300+ topics.
  • Accept money for answers that you provide.
  • Communicate privately with other members (PM).
  • See fewer ads.

Home > Computers & Technology > Programming > Databases > Access   »   Proper database design?

 
Question Tools Search this Question Display Modes
Question
 
 
#1  
Old Apr 26, 2008, 05:59 PM
Scleros
Hardware Expert
Scleros is offline
 
Join Date: Feb 2007
Location: Virginia USA
Posts: 755
Scleros See this member's comment history on his/her Profile page.
Proper database design?

I have an inventory asset database that I would like to add a treeview control to that would show all the different types of assets by location, or by asset type, or by whatever sort I choose to implement. Selecting an item in the lefthand treeview would show summary info common to all assets (vendor, model, cost, date acquired, etc.) on a righthand summary tab. There would also be one or more righthand details tabs showing data specific to an asset type (routers, for example). Currently, all my asset types have their own tables and unique forms.

I am thinking I could have a global "entity" table for all assets for common data, and then details tables for asset specific data. My problem is I cannot envision how to have the correct details subform displayed automatically when the asset is selected in the treeview without having an asset type field and manually displaying the proper subform via code. Many of the assets have multiple specific subforms as well and coding everything could get complicated and it doesn't seem very elegant.

I'm wondering if there is a design I'm not seeing where Access would do the bulk of the work?

Reply With Quote
 
     

Answers
 
 
Old Apr 27, 2008, 07:17 AM   #2  
ScottGem
Computer Expert
ScottGem is offline
 
ScottGem's Avatar
 
Join Date: Jan 2003
Location: LI, NY - USA
Posts: 23,108
ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.
Pay to call ScottGem for advice ($.75/min)
Call ScottGem via Skype™
First, let me say I'm not a big fan of the treeview control (though I know people who are) and I rarely use it. I'm not even visualizing how you want this to work.

You definitely do not have proper design if you have all your asset types in separate tables. The way I have set up such an app is to have an Asset table. That table lists the data that identifies the asset and is specific to the asset itself (i.e make, model, type, serial number, locationID, etc.)

I would then have a second table for asset attributes that would be more specific to the asset type. That table would look like this:

tblAssetAttributes
AssetAttributeID (PK Autonumber)
AssetID (FK)
AttributeID (FK)
AttributeValue

You would then add a lookup table for attributes:

tluAttributes
AttributeID (PK Autonumber)
Attribute
AssetTypeID (FK)

For example, lets consider routers. you might add an asset record for a router with 16 ports. So you would select the asset, select Ports as the attribute and enter 16 as the value. By including the AssetTypeID in the lookup you can restrict the Attribute list to those specific to that asset type.

I think this would then work well in your treeview, allowing you to drill down to a listing of attributes.
  Reply With Quote
 
     
 
 
Old Apr 27, 2008, 11:49 PM   #3  
Scleros
Hardware Expert
Scleros is offline
 
Join Date: Feb 2007
Location: Virginia USA
Posts: 755
Scleros See this member's comment history on his/her Profile page.
I understand what you're saying, but the lightbulb hasn't come on. Attached is a sample image of what I had in mind. How do I make the tabs on the right come and go depending on the asset selected in the treeview as not all assets have the same data. Is there a sample database somewhere like this I could dissect?
Attached Images
 
  Reply With Quote
 
     
 
 
Old Apr 28, 2008, 04:34 AM   #4  
ScottGem
Computer Expert
ScottGem is offline
 
ScottGem's Avatar
 
Join Date: Jan 2003
Location: LI, NY - USA
Posts: 23,108
ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.
Pay to call ScottGem for advice ($.75/min)
Call ScottGem via Skype™
OK, Now I see what you are looking for, and its a good use of the Treeview control. However, as I indicated, I really don't use that control so I'm not the best person to help here. What I can tell you is that when you get to the level of the actual asset, you will need to capture the PK value of the asset and pass that to the form to filter the data for that asset. How to do that I'm not sure.

What I suggest is that you repost this at utteraccess.com. You can attach the screenshot to your post. There are a number of Access gurus there and I'm sure they can help with this one, better than I.
  Reply With Quote
 
     
 
 
Old Apr 28, 2008, 10:23 PM   #5  
Scleros
Hardware Expert
Scleros is offline
 
Join Date: Feb 2007
Location: Virginia USA
Posts: 755
Scleros See this member's comment history on his/her Profile page.
Quote:
Originally Posted by ScottGem
What I suggest is that you repost this at utteraccess.com.

Ok, thanks.
  Reply With Quote
 
     
 
 
Old Apr 29, 2008, 04:40 AM   #6  
ScottGem
Computer Expert
ScottGem is offline
 
ScottGem's Avatar
 
Join Date: Jan 2003
Location: LI, NY - USA
Posts: 23,108
ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.ScottGem See this member's comment history on his/her Profile page.
Pay to call ScottGem for advice ($.75/min)
Call ScottGem via Skype™
Send me a link to your post there. I'd like to followup on this.
  Reply With Quote
 
     


Question Tools Search this Question
Search this Question:

Advanced Search
Display Modes

 
Similar Sponsors

Similar Questions
Question Asker Topic Answers Last Post
act database 2000 entering notes to entire database or printing group notes samshort Other Databases 0 Feb 1, 2008 07:28 AM
Plastic Product design, Mold design, Plastics, srinuti Engineering 1 Apr 6, 2007 08:58 PM
Access Database Design ScottGem Service and Trade 0 Mar 3, 2006 02:40 PM
Database reetika Other Databases 2 Sep 10, 2003 07:13 AM
Database paulfish64 Other Databases 1 Jan 23, 2003 08:33 AM




Copyright ©2003 - 2007, Ask Me Help Desk.
All times are GMT -8. The time now is 05:51 PM.

Content Relevant URLs by vBSEO 3.0.0 RC6 © 2006, Crawlability, Inc.