Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

naming fields effectively; need word sequence advice

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    naming fields effectively; need word sequence advice

    newbie question:
    When creating fields should I put:
    pt_name_first, pt_name_mid1, pt_name_mid2, pt_name_last,
    pt_ph_cell, pt_ph_home, pt_ph_work.
    or should it be:
    pt_first_name, pt_mid1_name, pt_mid2_name, pt_last_name
    pt_cell_ph, pt_home_ph, pt_work_ph

    My first impulse is that it doesn't matter. But if there is some sorting done by the db when I am looking up fields or if the fields get truncated or if I can only see a part of the field I guess it would matter.
    Thanks

    #2
    Re: naming fields effectively; need word sequence advice

    Hi Doug,
    This has been discussed a lot on the messageboard. There are many suggestions available but the only written down sources would be the short bit by Alpha and the one by Cal Locklin--a link to what Cal has to say on his website
    http://www.aimsdc.net/Tips_Funcs/A5_...onventions.htm

    Do a search on the board and you will find more.
    Mike
    __________________________________________
    It is only when we forget all our learning that we begin to know.
    It's not what you look at that matters, it's what you see.
    Henry David Thoreau
    __________________________________________



    Comment


      #3
      Re: naming fields effectively; need word sequence advice

      Two things that are likely covered in Cal's naming conventions but, I believe, deserve special consideration are....

      The first ten characters of any table name and the first ten characters of each field name in a table should be unique if possible.

      Table and field names should be as short as possible.

      I have seen field naming in other systems that "coded" the names for fields such as F01, F02, F254, F1000. You then maintain a translation list for acutal values those fields represent. Doesn't take too long to memorize the translation with frequent usage.

      Just to point out that while one can try to implement "smart" field names, it isn't necessarily the best choice.
      There can be only one.

      Comment


        #4
        Re: naming fields effectively; need word sequence advice

        Doug,

        I think you were asking about field name display in the Alpha design dialogs. A number of the dialogs allow toggling between design sequence or alphabetically.

        A number of the dialogs show the fields as
        tablename->fieldname

        These dialogs are not resizable so the thing to watch is more likely the length of the tablename. I have a table named cashdisbursement_lineexpense and the display of fields in some Alpha dialogs often does not show entire field names, but I get by.

        Bill.

        Comment


          #5
          Re: naming fields effectively; need word sequence advice

          Originally posted by Stan Mathews View Post
          ... Table and field names should be as short as possible. ...
          Originally posted by Bill Parker View Post
          ...These dialogs are not resizable so the thing to watch is more likely the length of the tablename. I have a table named cashdisbursement_lineexpense and the display of fields in some Alpha dialogs often does not show entire field names, but I get by.
          Just to add some clarification:

          There are "A5/dbf" reasons for using field names and index names that are 10 characters or less. These are described in my document referenced above. (Many good developers do NOT restrict themselves to 10 character names which is fine - as long as they don't make a mistake or are prepared to fix it. I prefer to play it very safe.)

          Table names have no such length restriction. The real issue with table name length is what Bill Parker describes - you can easily get such long names that the rest of the name and/or the field name don't show up in some situations. In other cases it's just annoying. For example, if you have an expression that requires using the table name (common if dealing with sets) something like:
          inv_item->pricef * inv_item->qtyf
          could turn into:
          ABC_tool_and_die_companies_invoice_items->pricef * ABC_tool_and_die_companies_invoice_items->qtyf
          (Don't laugh. I've seen things almost that bad.)

          ANOTHER HINT: use underscores instead of spaces

          This is probably in my document referenced above but, since it's so common, I'll mention it again.

          Many people write table names and form/report (layout) names with blank spaces in them. This is what people are used to seeing and it's easy to push the space bar so that's what people tend to do. However, if you want to make it easier to select specific names when editing and searching scripts, use underscores instead of spaces. (It really doesn't take that long to learn where the underscore key is. I do it without even looking now.)

          There are two reasons for this: (1) in the Alpha editors, double clicking on a name with spaces will only select up to the first space but double clicking on a name with underscores will select the whole name and (2) "readability" - when the name has underscores in it, it is obviously the name of a "thing" (table, form, report, etc.). For example, if I write "click on the main menu" you won't necessarily know what to click on. You would probably be looking for a form named "main menu" but maybe it's actually called something else - and it often is. However, if I write "click on the main_menu" then you'd be pretty sure that the form itself was actually called "main_menu".

          The issue of spaces is usually only a minor annoyance when viewing scripts. However, if you try to run a text search for a specific name like "main menu" that doesn't have underscores, you are likely to find a lot of false hits that can waste a lot of your time.

          Comment


            #6
            Re: naming fields effectively; need word sequence advice

            The real issue with table name length is what Bill Parker describes - you can easily get such long names that the rest of the name and/or the field name don't show up in some situations.
            The issue I've had, which may not be typical, is writing calculation expressions and exceeding the available character limit (1023/1024). The shorter the table and field names, the more of them you can use in the expression buiilder.
            There can be only one.

            Comment


              #7
              Re: naming fields effectively; need word sequence advice

              That too!

              Didn't they increase the allowable size for expressions awhile back? I thought it used to be 1024 but was increased. Could be wrong. I know they increased the size for xbasic scripts but not sure about expressions.

              Comment


                #8
                Re: naming fields effectively; need word sequence advice

                FWIW the documentation for V9 indicates the same 1023/1024 limits.
                There can be only one.

                Comment


                  #9
                  Re: naming fields effectively; need word sequence advice

                  Doug,

                  You have heard the experts and they ARE experts.

                  I have worked where all the fields in tables had names like(the tables were named similarly):

                  a1
                  a2
                  a3
                  a4
                  a5
                  d1
                  d2
                  d3
                  d4
                  d5
                  l1
                  l2
                  l3
                  l4
                  l5

                  And there a was a paper written explaining what each field name represented. VERY Confusing to me, but it worked.

                  Best bet is use your own so a field is recognizable to you. Make them as short as possible. each field has to start with a letter.

                  like names: fname mname lname and cfname cmname clname

                  Hope i helped? At least i gave the 2 cents to you.

                  I don't like using underscores and such(confuses me).



                  .
                  Dave Mason
                  [email protected]
                  Skype is dave.mason46

                  Comment


                    #10
                    Re: naming fields effectively; need word sequence advice

                    Thanks all for the info. Very valuable and I appreciate it, and will put it to good use.

                    Comment

                    Working...
                    X