List:General Discussion« Previous MessageNext Message »
From:Ilia KATZ Date:May 14 2009 2:11pm
Subject:RE: MAC address as primary key - BIGINT or CHAR(12)
View as plain text  
Not exactly. The allowed letters are A,B,C,D, E, F. Every 2 characters
(not including separators) can be treated as a hexadecimal number that
can be represented with one byte. 6 bytes in total.

 

for example: 00:1D:7D:48:08:8F 

 

pair                   value                 

00                     0                      1st byte

1D                    29                     2nd byte

7D                    125                   3rd byte

48                     72                     4th byte

08                     8                      5th byte

8F                    143                   6th byte

 

the last 2 bytes (of the BIGINT) left unused.

 

Ilia

________________________________

From: Fish Kungfu [mailto:fish.kungfu@stripped] 
Sent: Thursday, May 14, 2009 3:54 PM
To: Ilia KATZ
Cc: mysql@stripped
Subject: Re: MAC address as primary key - BIGINT or CHAR(12)

 

Since MAC addreses also contain letters, BIGINT wouldn't work.  So, yes,
I would say go with CHAR(12).

	On May 14, 2009 9:43 AM, "Ilia KATZ" <ikatz@stripped>
wrote:
	
	Hi.
	Currently I have a table:
	1. MAC address defined as BIGINT
	2. MAC address set as primary key
	
	Should I consider changing it to CHAR(12)?
	
	Replies will be appreciated.
	Ilia
	
	
	




************************************************************************
************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals &
computer viruses.
************************************************************************
************


Thread
MAC address as primary key - BIGINT or CHAR(12)Ilia KATZ14 May
  • Re: MAC address as primary key - BIGINT or CHAR(12)Fish Kungfu14 May
    • Re: MAC address as primary key - BIGINT or CHAR(12)kabel14 May
    • RE: MAC address as primary key - BIGINT or CHAR(12)Ilia KATZ14 May
  • RE: MAC address as primary key - BIGINT or CHAR(12)Jerry Schwartz14 May
  • Re: MAC address as primary key - BIGINT or CHAR(12)Thomas Spahni14 May
  • Re: MAC address as primary key - BIGINT or CHAR(12)Jim Lyons14 May
  • RE: MAC address as primary key - BIGINT or CHAR(12)Daevid Vincent14 May
Re: MAC address as primary key - BIGINT or CHAR(12)Pete Wilson14 May
  • Re: MAC address as primary key - BIGINT or CHAR(12)Jim Lyons14 May
Re: MAC address as primary key - BIGINT or CHAR(12)Pete Wilson14 May
RE: MAC address as primary key - BIGINT or CHAR(12)Gavin Towey15 May
Re: MAC address as primary key - BIGINT or CHAR(12)Gavin Towey15 May