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 > General > Database Concepts & Design > MAC Address as Primary Key

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-06-08, 23:11
viper2843 viper2843 is offline
Registered User
 
Join Date: Jul 2008
Posts: 9
MAC Address as Primary Key

Do you think the MAC address is suitable for use as a primary key of a table? I can see both pros and cons for this identifier. The pros are that it is definitely unique since it is how networks manage identity. The cons are for the user. Say you need to modify a MAC address because you typed it in incorrectly. You cannot do that easily if it is the primary key. What does everyone think about the MAC address as a primary key? Thanks.
Reply With Quote
  #2 (permalink)  
Old 09-06-08, 23:37
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,605
First and foremost, what possible purpose can it serve to use a MAC address for any part of a user interface? Unless your target market is networking professionals, this is an incredibly obscure piece of information that means little or nothing to most users.

Many networking devices (such as Cisco wireless routers) support spoofing MAC addresses. Many Asian knock-off manufacturers (who clone hardware from other vendors) also reuse the original vendor's MAC addresses. Learning to spoof a MAC address is one of the first steps to becoming a garden grade hacker. Relying on the uniqueness of MAC addresses is fairly safe for most users, but no where near "iron clad" for these reasons and other reasons too.

The average end user has no clue what a MAC address is. You need to be at least moderately geeky to understand what a MAC address is, much less how to determine what your MAC address is. Since many machines have multiple MAC addresses, it is tricky to get users that can find a MAC address on a machine to consistantly provide you with the correct MAC address.

-PatP
Reply With Quote
  #3 (permalink)  
Old 09-07-08, 00:16
viper2843 viper2843 is offline
Registered User
 
Join Date: Jul 2008
Posts: 9
My bad. I should have mentioned that the database I am designing is for networking professionals. The MAC address will be needed regardless of whether it is the primary key or not.

I fully understand the whole spoofing argument but there isn't much I can do about that in this particular area so its not really important.

I'm not really concerned with the end user knowing what a MAC address is. Suffice to say, the end user will have enough education to provide that information.

All I want to know is whether there are any good arguments for not making the MAC address a primary key. The only one I have heard is giving the user the ability to edit the address just in case they made a typo on the initial input. Thanks.
Reply With Quote
  #4 (permalink)  
Old 09-07-08, 04:27
dportas dportas is offline
Registered User
 
Join Date: Dec 2007
Location: London, UK
Posts: 732
Depends what you are trying to identify with a key.

If you are trying to identify a particular piece of hardware then a tag number would make more sense than a MAC address I think. You can verify a printed tag number even if the hardware is switched off or broken. A tag number doesn't suffer from the other problems already stated.
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