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

MYSQL VIEWS (via Navicat) vs SQL Select Statements to base grids on: Pros and Cons of using one vs the other

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

    MYSQL VIEWS (via Navicat) vs SQL Select Statements to base grids on: Pros and Cons of using one vs the other

    Hello all:

    I have some simple questions, (don't know if the answers are simple) about the pros and cons of using Views created in the MYSQL (Navicat) side of things or using the SQL Query Builder in AA to create the select statements upon which my various grids are based. There are some comments scattered in different posts across this message board which make me suspect that using views is the way to go (and perhaps this is not an a matter of choosing one or the other but knowing when to use each effectively) I would like current opinions from those with more experience than me. Thank you.

    1) Performance: Which of the following is true?
    Views result in faster performance.
    Select Statements made in Query Builder result in faster performance.
    There is no difference in performance between the two choices.
    It depends (if so how and why?)

    2) Features:
    Are there any important features, functions or abilities that using Views gives you over using AA Query Builder Select Statements (AA QBSS) in applications
    Ditto for AA QBSS over views?
    Does using one or the other limit or enhance how web applications, mobile apps or desktop apps work?
    Is there "killer" aspect of either that puts all other considerations aside and makes you choose one over the other?
    Are there situations where you would mix it up using views in some grids and AA QBSS in others in the same application?



    3) Ease of Use to create the select statements:
    Here are my observations:
    Navicat has the "beautify SQL" button, AA QB does not seem to have this feature.
    Navicat has "View Builder" a visual of the tables, selected col's and connections, but it quickly gets like a plate of spaghetti & meatballs,
    its hard to follow the lines and you can't click on the lines and edit the connections.
    Navicat displays keywords in different colors
    Navicat gives you hints about where errors in syntax are

    AAQB automatically creates aliases for duplicate columns, Navicat does not


    4) Any other points to be considered

    Thank you.

    #2
    Re: MYSQL VIEWS (via Navicat) vs SQL Select Statements to base grids on: Pros and Cons of using one vs the other

    I generally use Navicat and views, however if you want to use portable SQL then you do that through Alpha.
    Portable SQL is useful if you may want to run the same grid on 2 database back ends. MySQL and MS SQL/MS ACCESS

    Alpha makes it easy to use Arguments in the builder so this is another reason I would choose Alpha over Navicat.

    If I want to do something simple then I use Alpha, one tool instead of 2.

    I am not an expert on the finer points of SQL so this is all I can offer.

    Comment


      #3
      Re: MYSQL VIEWS (via Navicat) vs SQL Select Statements to base grids on: Pros and Cons of using one vs the other

      I stand to be corrected but my understanding is that generating views via the back end database, in this case mysql is more efficient. When the view is called by alpha only the fields showing in the view are sent back to the application server whereas if you use the AA query builder it has to pull in all data in order to generate the view. If the view is particularly complicated then that may result in a greater load on the server.

      As for Navicat, I personally think it is great for creating views and testing segments of code quickly and efficiently.
      Glen Schild



      My Blog

      Comment


        #4
        Re: MYSQL VIEWS (via Navicat) vs SQL Select Statements to base grids on: Pros and Cons of using one vs the other

        I agree with Glen, but I have the feeling Alpha will do an Ajax call and only return the requested fields. As Glen points out you are increasing the load on the Alpha server slightly.

        Comment


          #5
          Re: MYSQL VIEWS (via Navicat) vs SQL Select Statements to base grids on: Pros and Cons of using one vs the other

          I usually use views in Navicat whenever I have a more complicated select, such as unions or want to manipulate fields in the selection like concatination or IN statements. Generally, with selects taking .02 seconds, I don't worry about speed. I like the view because I can preview the result through Navicat and make sure it is going to work.
          Pat Bremkamp
          MindKicks Consulting

          Comment


            #6
            Re: MYSQL VIEWS (via Navicat) vs SQL Select Statements to base grids on: Pros and Cons of using one vs the other

            Hi Kevin,

            I will use views from other reason as well. Sometimes when there are too many complications then you can break the logic to multiple views and then Join them together. This way it is easier to debug as well.

            Regards,

            Doron
            The Farber Consulting Group, Inc.

            Main Web Site: http://www.dFarber.com

            Avis Car Rental Application
            Custom Software Development

            Comment


              #7
              Re: MYSQL VIEWS (via Navicat) vs SQL Select Statements to base grids on: Pros and Cons of using one vs the other

              Like others here for simple selects I just use Alpha, but generally for views I build them in Navicat and call the view in Alpha. One problem I have noticed is that Alpha doesn't seem to allow you to order the view, you have to use the view order.
              Peter
              AlphaBase Solutions, LLC

              [email protected]
              https://www.alphabasesolutions.com


              Comment


                #8
                Re: MYSQL VIEWS (via Navicat) vs SQL Select Statements to base grids on: Pros and Cons of using one vs the other

                Have done a bit of research on this in the past and it really comes down to just a few points.

                1. Do you need to use the statement in multiple locations. If so, a view might be more convenient.
                2. How big are the tables you'll be accessing.
                3. How many users might be accessing the views at the same time.

                In general, views in MySql can be less efficient than select statements (do s simple Google search on this). However, unless you have a very large/active database, the reality is that it won't matter. Our site is very active during the back-to-school months (aug/sep) and we use several views without issue (including our main one that is a few layers deep). My guess is that there will be little performance difference is most AA user's apps.

                Comment


                  #9
                  Re: MYSQL VIEWS (via Navicat) vs SQL Select Statements to base grids on: Pros and Cons of using one vs the other

                  Originally posted by Peter.Greulich View Post
                  Like others here for simple selects I just use Alpha, but generally for views I build them in Navicat and call the view in Alpha. One problem I have noticed is that Alpha doesn't seem to allow you to order the view, you have to use the view order.
                  Hi Pete

                  Not had that issue but I have noticed that Alpha does not always "remember" a view is read only (assuming it is read only of course!) if you make changes to a component. I have had to go back in and set this attribute on more than one occasion.
                  Glen Schild



                  My Blog

                  Comment


                    #10
                    Re: MYSQL VIEWS (via Navicat) vs SQL Select Statements to base grids on: Pros and Cons of using one vs the other

                    and I should point out most of my work is with ms sql
                    Glen Schild



                    My Blog

                    Comment


                      #11
                      Re: MYSQL VIEWS (via Navicat) vs SQL Select Statements to base grids on: Pros and Cons of using one vs the other

                      I agree with Doron when I am doing something complex then I use multiple views; naming step 1 step 2 much easier to debug. Later if you want to use arguments to debug you can combine them.

                      Comment


                        #12
                        Re: MYSQL VIEWS (via Navicat) vs SQL Select Statements to base grids on: Pros and Cons of using one vs the other

                        Originally posted by Michael1954 View Post
                        I agree with Doron when I am doing something complex then I use multiple views; naming step 1 step 2 much easier to debug. Later if you want to use arguments to debug you can combine them.
                        Do you nest views?
                        Glen Schild



                        My Blog

                        Comment


                          #13
                          Re: MYSQL VIEWS (via Navicat) vs SQL Select Statements to base grids on: Pros and Cons of using one vs the other

                          Hello Glen,

                          Nested views is not recommended. Will slow down performance. In addition, you can create indexes on views and improve performance as well. If you Join 2 views you can create Clustered Index on the PK. There is a difference when you 2 JOIN 2 views to nested views.

                          Regards,

                          Doron
                          The Farber Consulting Group, Inc.

                          Main Web Site: http://www.dFarber.com

                          Avis Car Rental Software
                          MS SQL Blog: http://www.dfarber.com/computer-consulting-blog.aspx

                          Comment


                            #14
                            Re: MYSQL VIEWS (via Navicat) vs SQL Select Statements to base grids on: Pros and Cons of using one vs the other

                            Originally posted by DoronF View Post
                            Hello Glen,

                            Nested views is not recommended. Will slow down performance. In addition, you can create indexes on views and improve performance as well. If you Join 2 views you can create Clustered Index on the PK. There is a difference when you 2 JOIN 2 views to nested views.

                            Regards,

                            Doron
                            The Farber Consulting Group, Inc.

                            Main Web Site: http://www.dFarber.com

                            Avis Car Rental Software
                            MS SQL Blog: http://www.dfarber.com/computer-consulting-blog.aspx
                            Hi Doron

                            That is why I was asking the question. I stay well clear of nested views!! I use views significantly even for data editing (only when one table is being updated)
                            Glen Schild



                            My Blog

                            Comment


                              #15
                              Re: MYSQL VIEWS (via Navicat) vs SQL Select Statements to base grids on: Pros and Cons of using one vs the other

                              We only use views. Our views are where we handle the security filtering and UDF's. We don't see any issues in speed. Alpha will treat our view just like a table. We can order it and CRUD operations work just fine. For really complex requirements we use stored-procedures. Like for cross-tab reports. Again Alpha handles all of it without issue. We try to use Alpha as the presentation layer and SQL for database operations. It's a mindset that usually works...

                              Comment

                              Working...
                              X