Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I think you're trying to use the same field for two things: a unique ID, and a human-readable name. You can do that, but there are going to be trade-offs, and one of them is that your unique ID field, in order to remain human-readable, will be longer than would otherwise be necessary. You can use abbreviations up to a point, but eventually you're going to run into "I don't remember what L stands for, was that Lexmark or Luminox or Lenoc or Linksys or what?"

Personally, I would use two fields: a unique ID field (which could just be an auto_increment field if you're storing these in a RDBMS) and a separate human-readable name field that doesn't have to be so short. (You can put a must-be-unique constraint on the name field or not, depending on your preference.)

Just a thought.


In reply to Re: Generate unique ids of maximum length by jonadab
in thread Generate unique ids of maximum length by lima1

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2024-04-18 02:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found