If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > table and column organization for snmp OIDs

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-19-10, 13:17
tetra tetra is offline
Registered User
 
Join Date: Dec 2010
Posts: 4
table and column organization for snmp OIDs

Hello,
We have got an applications where we query about 50 types of snmp OIDs. The types of OIDs are drops into several types such as integer, double, date, string and float.

We are planning a structure to keep type information in a different table and keep the data in single column in a different table. Our aim is to build an architecture flexible to be able to add new OIDs in future.

Some of the OID needs to be pulled a lot more than the others.

Our question is what will be the performance figures as oppose solution. The oppose solution would be to have each OID in a table column with its type known.

I hope description is enough for you to see the problem.

Regards
Reply With Quote
  #2 (permalink)  
Old 12-19-10, 14:56
r937 r937 is online now
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,534
what is an snmp OID?

how can it have different values? it's either numeric or it's a string...
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 12-19-10, 15:24
tetra tetra is offline
Registered User
 
Join Date: Dec 2010
Posts: 4
OID examples

Hi,
Assume they are name of variables such as

1.2.4.1.1.2 is an integer
1.2.4.1.1.4 is an double
1.2.4.1.1.5 is and string

we need to put all these variables in a column and put their type to another table. While retrieving them use a join with types column and data column.

The other alternative would be to put all variables to a different column but when the number of OIDs increase management becomes a problem.

We are just wondering if this type of mechanism cause trouble in long term as number of data increase.
Reply With Quote
  #4 (permalink)  
Old 12-19-10, 17:19
r937 r937 is online now
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,534
Quote:
Originally Posted by tetra View Post
Hi,
Assume they are name of variables such as

1.2.4.1.1.2 is an integer
1.2.4.1.1.4 is an double
1.2.4.1.1.5 is and string
what? that doesn't make any sense

those are strings, full stop


Quote:
Originally Posted by tetra View Post
we need to put all these variables in a column and put their type to another table.
huh? need to?
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #5 (permalink)  
Old 12-20-10, 04:10
tetra tetra is offline
Registered User
 
Join Date: Dec 2010
Posts: 4
Hi,
Its very common, SNMP, may be need to look at a SNMP tutorial at google.


1.2.4.1.1.2 is an integer
1.2.4.1.1.4 is an double
1.2.4.1.1.5 is and string

1.2.4.1.1.2 this is variable's name, it has a integer type and its value will be placed in to database.

its just like int i = 50 ; int is type , i is name of variable and 50 is value
1.2.4.1.1.2 (int) = 50

My question is conceptual. Don't couple your self with OIDs.

Question is if you have 50 different variables and has to be put in a database and we expect it to be flexible for future additions of new variables.
Reply With Quote
  #6 (permalink)  
Old 12-20-10, 04:36
shammat shammat is offline
Registered User
 
Join Date: Nov 2003
Posts: 2,408
Quote:
Originally Posted by tetra View Post
Question is if you have 50 different variables and has to be put in a database and we expect it to be flexible for future additions of new variables.
Search for the (anti) pattern "Entity Attribute Value"
Reply With Quote
  #7 (permalink)  
Old 12-20-10, 04:38
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,262
Im guessing 1.2.4.1.1.2 is an IPv6 address
the value is the response or reading for that IP address
however what is missing in your schema is the OID itself and a datestamp indicating when the event was logged
id expect
IPaddress
OID
EventTime
Response

I guess it depends on what you want to do with the information. if its purely for logging purposes then you could log the response as a string and coerce it back to numeric at a later date if required. all though it runs fingernails down the blackboard of my soul to suggest such things.

if however you need to analyse the response then you may need to thin of redesigning the response to a super/subtype.
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On