Naming Convention for Informix Database Objects
Posted in 2003
A developer asked whether Informix has an established naming convention for database objects (tables, views, indexes, columns), akin to the Leszynski/Reddick standard, noting that IDS 9.4 supports long identifiers, and hoped for a document to reuse. Replies included a joke about verbose prefixes and some off-topic banter. The only substantive answer said there is no Informix standard: names just need to be descriptive, and recommended short 8-10 character abbreviations like pat_dob/fir_nam rather than long names, which are tedious to type and display poorly in dbaccess. No formal convention or write-up was identified.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Versions, Editions & End-of-Life
Can anyone recommend a good naming convention for database objects in Informix? Generally, I use my own variation on Hungarian, but I wondered if there is an equivalent of the RVBA (also known as Leszynski/Reddick) standard among Informix developers. I would also be thrilled to find a write-up I can reuse or just plain plagiarize. As an aside, this is to be implemented on IDS 9.4, so long identifiers are not an issue. Sincerely, Christopher Coleman Database Analyst Pharmacy Division Mediware Information Systems, Inc.
Christopher wrote: > Can anyone recommend a good naming convention for database objects in > Informix? > > Generally, I use my own variation on Hungarian, but I wondered if > there is an equivalent of the RVBA (also known as Leszynski/Reddick) > standard among Informix developers. > > I would also be thrilled to find a write-up I can reuse or just plain > plagiarize. > > As an aside, this is to be implemented on IDS 9.4, so long identifiers > are not an issue. I generally prefix tables with this_is_a_table_called_, views with this_is_a_view_called_, indexes with this_is_a_index_called_ ... -- "C'est pas parce qu'on n'a rien ''' dire qu'il faut fermer sa gueule" - Coluche
Obnoxio The Clown wrote: > > I generally prefix tables with this_is_a_table_called_, views with > this_is_a_view_called_, indexes with this_is_a_index_called_ ... hehehh You won't be laughing after tomorrow.
Obnoxio The Clown enlightened us all with: > I generally prefix tables with this_is_a_table_called_, views with > this_is_a_view_called_, indexes with this_is_a_index_called_ ... Glad to see you'll never change. Sincerely, Christopher Coleman Database Analyst Pharmacy Division Mediware Information Systems, Inc. Coluche a eu tort.
Christopher wrote: > Obnoxio The Clown enlightened us all with: >> I generally prefix tables with this_is_a_table_called_, views with >> this_is_a_view_called_, indexes with this_is_a_index_called_ ... > > Glad to see you'll never change. > > Sincerely, > > Christopher Coleman > > Database Analyst > Pharmacy Division > Mediware Information Systems, Inc. > > Coluche a eu tort. And what if I ever should change? Not let marketing make me deranged? Kiss a salesman's ass? 'fess to Oracle's class? not show Mark B's thoughts still have got mange? Would ever this hell come to pass and my sad brain just lost all my sass Should I pull out a gun just to end all my fun and wind up six feet under grass For though thousands would certainly cheer of my sad, lonely end just to hear perhaps I would think "ah, hell, they all stink" and carry on drinking my beer. :o) -- "C'est pas parce qu'on n'a rien ' dire qu'il faut fermer sa gueule" - Coluche
Christopher wrote:
> Can anyone recommend a good naming convention for database objects in
> Informix?
>
> Generally, I use my own variation on Hungarian, but I wondered if
> there is an equivalent of the RVBA (also known as Leszynski/Reddick)
> standard among Informix developers.
>
>
As far as I know, there is no hard-and-fast rule about names for data
bases, tables, columns, and the like other than that they ought to be
descriptive so either you or somebody else knows what they are six
months later -- I think that understanding and ease of use is far more
important than following some "system" somebody made up. I've always
thought that if you can't write out something on the back of your
business card, you haven't thought it through -- if a "system" takes a
manual to use, well...
I've always followed an old-time rule that names of things should fit in
eight to ten characters (many systems would only recognize the first N
characters as significant; some still do). I tend to name things aaa_bbb
what aaa is the abbreviation of a first descriptive word and bbb the
second. I work with hospital information so patient information would
look something like this:
fir_nam patient first name
mid_nam patient middle name or initial
las_nam patient last or surname
pat_ad1 patient address line 1
pat_ad2 patient address line 2
pat_cit patient city
pat_sta patient state, region, or province
pat_zip patient ZIP Code or postal code
pat_dob patient date of birth
pat_ssn patient Social Security Number
pat_mar patient marital status
pat_eth patient ethnicity (stupid stuff required by government)
pat_rac patient race (stupider stuff required by government)
and so on. I don't know, but I think the left-hand column is a lot
easier to read that the right-hand one.
I do this because they're easy to type and easy for somebody (including
me!) to figure out what they mean. I do the same sort of thing in
programing; i.e., variables are declared three_three, maybe
three_three_01, three_three_02.. I use, because I'm old, i, j, k, l, m,
n for loop controls, how many (n) and things like that.
Some practitioners like things like patient_first_name,
patient_middle_name, patient_address_line_01, etc. I don't simply
because they're such a pain in the butt to type when you're trying to
write code to deal with the data (plus, you may notice, dbaccess doesn't
display loooonnnnnnnggggg table or column names too well).
I'm sure you'll hear from the click-click crowd about long, descriptive
variable names, but, well, the choice is yours so go with whatever makes
you comfortable.