Database Layout
Posted: Wed Nov 29, 2006 9:31 am
I have a question where I am leaning to one way.
Here is the current layout
Hosts
-------
id PK
company FK
ip
second_ip
name
Company
------------
id PK
name
abbreviation
log
----
id PK
timestamp
host FK
status
status
--------
id PK
host FK
status
timestamp
Basically what is done, is that hosts are ping'd during different times of the day to make sure they are still up, otherwise our IT looks into what is going on in the location.
Now we have to add some extra functionality here for SNMP hosts. My original thought was to create an SNMP table with id,company,community,ip,obj_id,and version. This table is similar idea to the hosts table yet still not quite the same.
The issue is that if creating a new table, SNMP and hosts will each have their own id which may overlap. I still need to maintain the status and log for the SNMP hosts which would mean creating an entirely new table.
Ex. SNMP_log, SNMP_status
Is there any idea how to create this in a better design? It doesn't quite seem that SNMP and hosts should be in the same table, but in some cases (joining with status and log for certain queries) that seems to be desired.
Here is the current layout
Hosts
-------
id PK
company FK
ip
second_ip
name
Company
------------
id PK
name
abbreviation
log
----
id PK
timestamp
host FK
status
status
--------
id PK
host FK
status
timestamp
Basically what is done, is that hosts are ping'd during different times of the day to make sure they are still up, otherwise our IT looks into what is going on in the location.
Now we have to add some extra functionality here for SNMP hosts. My original thought was to create an SNMP table with id,company,community,ip,obj_id,and version. This table is similar idea to the hosts table yet still not quite the same.
The issue is that if creating a new table, SNMP and hosts will each have their own id which may overlap. I still need to maintain the status and log for the SNMP hosts which would mean creating an entirely new table.
Ex. SNMP_log, SNMP_status
Is there any idea how to create this in a better design? It doesn't quite seem that SNMP and hosts should be in the same table, but in some cases (joining with status and log for certain queries) that seems to be desired.