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

Alpha5+xxSQL vs Alpha5+DBF - Any features lost? Why NOT go SQL

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

  • Alpha5+xxSQL vs Alpha5+DBF - Any features lost? Why NOT go SQL

    Hello,
    I am not a full time developer, but would like to become more serious about becoming one. I have used Alpha versions 8-10 and have purchased V11.

    After reading many of the posts on these forums regarding the decision to develop for the web using the DBF backend or some flavor of SQL for the backend I'm 90% sure I'm going to go the SQL route. (Probably MYSQL)
    I see the many reasons that argue positively toward an SQL backend path. (speed, scalability etc...). I am willing to learn different ways to do things and some SQL commands.

    The last question I have that I haven't seen raised about this subject is the following:

    Is there any reason(s)
    to NOT use a SQL backend?
    (other than some amount of added complexity and perhaps it's overkill to use SQL for smaller, simpler applications with smaller amounts of data and fewer users)

    To expand the question:
    Any features of Alpha5 V11 that are not available or don't work when the backend is SQL?
    Any aspect of the xbasic language that is significantly different or not available when the backend is SQL?
    Any aspect of the built-in security system that is significantly different or not available when the backend is SQL?
    Any changes to action scripting?
    Are any features and properties of grids and dialogues no longer available if backend is SQL?
    etc...
    Any web components that no longer work?
    Do we still create sets?

    Another way to pose this question: Does Alpha5 itself, the program not the company, care what the backend database is?

    Thanks to all who have commented on this issue so many times before. I'm not really looking for super detailed responses to all these expanded questions much beyond yes or no. If all the answers are no i can proceed with SQL if many are yes than I need to dig deeper to see what the changes are and then decide.


    Kevin






















  • #2
    Re: Alpha5+xxSQL vs Alpha5+DBF - Any features lost? Why NOT go SQL

    Probably my posts are included so I should respond. This is not a complete answer. But in general Alpha doesn't care if the data is coming from DBF or SQL, the same features are available. I must say that I am extremely happy having moved to SQL. Overall, it is a lot less coding where code is necessary. It IS difficult to grasp at first and I admit to have lost the skill to write new applications using DBF -- you really cannot do both.

    I'd say the most difficult aspects of moving to SQL are:
    • Xbasic syntax for data interaction is different.
    • SQL is not DBF - it does not treat data in the same way you are used to.
    • Because of above, you often have to move results (what came back from the request for data) in to a different format, like to an array or string of characters.
    • You have to get used to your database NOT being attached to your project. You never get a table-in-use error with SQL when editing components.


    If you take the time to understand the following it shows the power from SQL and how you move data in to different forms as necessary (error trapping and arguments left out.) These are what you would use in a script, none of this is required to display data in a grid.

    LONG VERSION - demonstrating changing data format
    dim cn as sql::connection
    dim rs as sql::resultset
    cn.open("::name::conn")
    name = "steve"
    vSql = "SELECT id FROM users WHERE name='{name}'"
    vSql = evaluate_string(vSql)
    cn.execute(vSql)
    rs = cn.resultset

    search_lst = rs.tostring()
    search_lst = *remove_duplicatesI(search_lst)
    search_lst = crlf_to_comma(search_lst) '== search_lst will now be something like "100,101,102..."

    vSql = "SELECT name FROM persons WHERE user_id IN({search_lst})"
    vSql = evaluate_string(vSql)
    cn.execute(vSql)
    rs = cn.resultset '== result set now contains names of all Persons where User Name was "steve"
    '==use result here...
    cn.close()

    SHORT VERSION
    dim cn as sql::connection
    dim rs as sql::resultset
    cn.open("::name::conn")
    vSql = "SELECT name FROM users INNER JOIN people ON users.id = people.user_id WHERE users.name = 'steve'"
    cn.execute(vSql)
    rs = cn.resultset
    '==use result here...
    cn.close()
    Any features of Alpha5 V11 that are not available or don't work when the back-end is SQL?
    Other way around, there are some SQL only features. I'd have to go look at the videos to know which ones. Well, you do lose all of the Operations (Operations tab) in Alpha since those only work against DBF. I have not used an Operation for several years.

    Any aspect of the xbasic language that is significantly different or not available when the backend is SQL?
    Whole language is still open except for any that deal with tables. Like all of the functions for _fetch and tbl.open() are out, because there are no DBF tables to interact with.

    Any aspect of the built-in security system that is significantly different or not available when the backend is SQL?
    Even when your app is SQL, the security can remain in DBF. If you transfer your security to SQL (preferred, but a simple process) you create Active Link tables for each security table, and the security functions (a5ws_*) still run through those Active Link tables. Also, your Users and Groups dialog in Security Config are "live" meaning they point to your active users table (abet localhost) whereas in DBF they point to a non-live copy of users directly in the project.

    Any changes to action scripting?
    If you mean Javascript action scripting, actually no change because that works in the client. Ajax Callbacks would obviously use SQL-syntax rather than DBF.

    Are any features and properties of grids and dialogues no longer available if back-end is SQL?
    None that I have seen. Connecting to SQL database is similar to connecting to DBF. You can connect to one table, or a view, same in both DBF and SQL. You can (or I can) write a much more involved data selection statement for SQL. After a while, you stop using Alpha's point and click and just enter a Select statement.

    Any web components that no longer work?
    No, components are not dependent on t he source of data.

    Do we still create sets?
    Nope. You can build Views in SQL which are the same as Sets, and base reports, etc on those views. Or you can just re-create the table relationships for each report.
    Steve Wood
    Join the ALPHA DEVELOPERS NETWORK
    There is no Cloud. It's just someone else's computer.
    Web - Mobile - Hosting - Products - Frameworks - Developer Resources
    AlphaToGo | IADN (100% Alpha Anywhere Websites)

    Comment


    • #3
      Re: Alpha5+xxSQL vs Alpha5+DBF - Any features lost? Why NOT go SQL

      I have a view with a form writing to two different tables. That worked in dbf, but now I am receiving an error "cannot modify more that one base table through a join view". I guess I will have to write sql code to do what I want, instead of just saving the values in the grid.
      Richard Urban

      Grocery Delivery Software for Stores and Entrepreneurs: http://www.urbangrocery.com

      Comment


      • #4
        Re: Alpha5+xxSQL vs Alpha5+DBF - Any features lost? Why NOT go SQL

        Yeah, MySql won't allow you to save a new child record in a view, whereas dbf does. This is a big P.I.T.A. and you can either use a dialog/ux and/or hand code it.
        Peter
        AlphaBase Solutions, LLC

        Peter@AlphaBaseSolutions.com
        https://www.alphabasesolutions.com


        Comment


        • #5
          Re: Alpha5+xxSQL vs Alpha5+DBF - Any features lost? Why NOT go SQL

          As far as speed on a desktop, dbf is faster with alpha by far.
          It can be the other way around on a web app, but not tested here.

          Comment


          • #6
            Re: Alpha5+xxSQL vs Alpha5+DBF - Any features lost? Why NOT go SQL

            Originally posted by Peter.Greulich View Post
            Yeah, MySql won't allow you to save a new child record in a view, whereas dbf does. This is a big P.I.T.A. and you can either use a dialog/ux and/or hand code it.
            I dont think this is a reason to pick dbf over mysql.
            If the OP is SERIOUS about being a developer - there is no question - MySQL 110%.

            Documentation+Support of MySQL is worth the move from DBF.

            Most PHP/Websites on the net will either use MySQL or SQL Server as their back end.
            The LAMP stack is extremely popular (Linux OS, Apache webserver, MySQL, PHP) or WAMP (Windows, Apache, MySQL PHP)
            and if you ever want to branch away from Alpha (think - how many production sites are currently using alpha?) to something like PHP/ASP.NET/Coldfusion etc
            you will most likely be working with a SQL (Structured Query Language) based RDMS (Relational Database Management System) - MySQL / MSSQL SERVER / MARIADB etc

            In regards to Peter's Comment:
            You can use a parent-child grid relationship and define the primary key from the view and the child table should still work.
            I dont really think there is a good reason to use views - dialogs allow you to data bind to different tables.
            Views in mysql dont use the comprising tables indexes for lookups.

            If you need simple inserts into child - the parent+child grid is the way to go.
            For other more complicated things - custom code is usually best.

            my $0.02
            Last edited by aburningflame; 09-17-2013, 06:06 PM.
            Scott Moniz - Computer Programmer/Analyst
            REA Inc.
            http://reainc.net
            (416)-533-3777
            scott@reainc.net

            REA INC offers consulting services, programming services, systems design, database design, third party payment gateway integration (CHASE, PAYPAL, AUTHORIZE.NET) and developer support.
            If you need custom code, or 1-to-1 mentoring in any facet of your database/web application design,
            contact us to discuss options.

            Comment


            • #7
              Re: Alpha5+xxSQL vs Alpha5+DBF - Any features lost? Why NOT go SQL

              Going one step further. There must be a reason for google to be going to mariadb over mysql. They started this last feb and are moving forward with the switchover.

              Mariadb is a drop in replacemant for mysql as noted by many of the big boys out there.

              Comment

              Working...
              X