misscrf
Hint...
The problem I had with an IT database is that some aspects of a device are common and toher are not.
For example, take a workstaiton, a switch and a monitor.
They will most likely share...
- Manufacturer
- Model Number
- Serial Number
plus site specific stuff
- Location
- Asset Tag (if you use such)
- Purchase date
- Warranty info
etc.
But they will also have properties are unique from the other.
Workstation:
- Hard drive size, RAM, Video card, CD / DVD driver, burner, firmware, etc
Switch
- Number of ports, type of ports (CAT 5, Fiber SC or ST), speed of ports (10/100/1000 MB), IOS, memory, firmware
Monitor
- Size, type (CRT, plasma), max resolution (XGA, UXGA)
Now the question I asked was how the heck do I combine the common factors with the uncommon factors???
I created a very unique structure -- used a couple times elsewhere, and it works for me...
Each device has at least two tables - a master device for the common data, and a device specific table(s). This way, I can query things like the serial number, or asset tag from one table (and I dont have to check each table for this info), and I can query the device specific table for the details.
...Moving on... Here is a snippette of the design...
Design
DevMasterTbl
DevID - primary key
DevName
DevType - key to determining device type / table to use
AssetTag
Manufacturer
Model
SerialNum
LocationID - foreign key to location
DHCP - yes / no
Status
PurchaseDate
etc...
DevType is key to the functionality. Examples may include...
Server
WorkStation
Monitor
UPS
Or you can be more complicated...
PRT-Local (local printer)
PRT-Network (network printer)
DevWorkStationTbl
DeviceID - primary key
DevID - foreign key to Device Master
CPUSpeed
CPUNumber
Capactiy
NumDrives
etc...
DevSwicthTbl
DeviceID - primary key
DevID - foreign key to Device Master
SwitchType
NumPorts
etc...
(more on switches later)
I would have device tables for such things as...
- printers
- UPS's
- Servers
- Volumes (volumes belonging to a server)
- Tape drives
- Miscellaneous (catch all)
- Plus Components (catch all for major componetns such as RAID 5 drives)
Okay, I missed a couple of things.
- IP addresses
- Owner
There a couple of ways of approaching the IP address. Most often, the IP address is a one-to-one, so the immediate thought is to place the IP address on the Device Master table. But how do you handle devices with multiple IP addresses - servers, swtiches, and the big one - routers. And then some devices do not have an IP address (monitors)
I use a seperate table tied to the Devices Master...
DevIP
IPID - primary key
DevID - foreign key to the device master
IPAddress
Port (rarely used)
I guess some would wonder why not make the IP address the primary key - devices can change their IP addresses - so much easer to do this if it is not the primary key.
Then ownership
In my environment, I have shared computers - numerous people use one computer (shift work, funcational area), and some users have more than one computer (training is a good example) This means that I have a many-to-many relationship.
DevUserProfile
DevID - foreign key to device master
ContactID - foreign key to contact or owner table
ProfileDate - date profiel was last changed
Primary key is the DevID + ContactID
I could make this into a history file, who owned what computer / when, but maybe later.
Or you may have a simple office one owner / one PC. In this case just add the OwnerID or ContactID to the Device Master table.
I still am trying to improve the handling of the switches and routers. In a sense, the best approach is to tackle the switch or router has a main component and sub components - just like the DevMaster -> DevDevice table idea. And if you think about it, it makes sense to use this type of approach for workstation and servers - break it down to its components - each component - drive, dard, RAM chip as a seperate subcomponent. The problem is that this leads to a lot of complexity. For defining computers - not necessary for my needs (perhaps yours?? For a switch or router, this may be the approach - number of 10 / 100 / 1000 ports for CAT 5 and fiber, AUX port, etc.
DevSwitchTbl
DeviceID - primary key
DevID - foreign key to Device Master
SwitchType
DevPort
PortID - primary key
DeviceID - foreign key to DevSwtich
PortMedia - fiber / cat 5 / aux
PortSpeed
AutoSense
MappedDev - foreign key to device master !!!
Now, if required, I can match a specfic port to a device on the device master table. This port connects to this server, or this printer, or this switch - way, way cool! - this extra step all of a sudden becomes very useful
Enough theory ... Moving on ...
Presentation
With so many tables tied to one device, presentation to the end user (the network admins) becomes a challenge.
I use a main table - device master most commonly used info
I then use a tab subform
- tab for purchasing info
- tab for user info (M:M)
- tab for support tickets (since I track calls against a device and user)
But having 6 or 9 tabs, one for each device is a tad complex. I handle this by using the
visible property. You hide / unhide forms and pages by tweaking this property. For the OnCurrent record event, I use the DevType to control which forms the user see. (And yes, you can have forms on top of each other, and only display the one relavent one).
It took me a few times going back to the basics for this desing - it is very different than the typical 1:M or M:M since it also has 1:1, and multiple tables. But it works very, very well for me.
Richard