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



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

SaaS - Data Model Question

  • Filter
  • Time
  • Show
Clear All
new posts

  • SaaS - Data Model Question


    I'm looking to create an SaaS application that is cloud-based using AlphaAnywhere 2.0's current WebSecurity system.

    The same application could be used by competitors in the same city servicing the same customers.

    With an eye to keeping costs down because the data sets may not be all that large for any one customer, I'm looking to have a single data set used by all businesses using the application hosted in the cloud, where they and their customers would just be accessing it from their own individual web sites.

    Let's say the application is a golf course management program that as one of its functions is to allow golfers to reserve tee times and post their scores and historically compare their scores for each course individually.

    In addition, it allows the golf course themselves to collect greens fees over the web, look at the tee sheet for the whole day across all golfers, and other management tasks that are unique and confidential to the individual course.

    So we have Tee It Up Golf Course, and Swing and a Miss Golf Course and Fore! Golf Course.

    Ben Hogan lives near all of these courses and likes to play at each one because he enjoys variety, but Ben's a bit old and doesn't like multiple passwords and regardless of which web site for which golf course he wants to make a tee time, he wants to just use his email ( and password (1234) to identify himself.

    My current understanding of AA's web security is that each web user record is identified by a unique username/password pair, but those two items by themselves won't allow me to differentiate amongst the three courses (I don't think).

    My thought was that if we could add a third component, ideally the domain of the web site that Ben was logging in from, that we could then have Ben in the user table multiple times as follows:

    Golf Course Domain Username Password
    Tee It Up 1234
    Swing and a Miss 1234
    Fore! Golf Course 1234
    Fore! Golf Course 9999
    Now when Ben goes to log in, it's not just username/password, but domain/username/password that grabs the unique GUID that identifies which golf course he wishes to make a tee time for.

    Similarly, the golf courses don't want to share their information with each other (which would be more than tee times and scores, but also greens fees, membership fees, etc.).

    The golf courses want their own unique web sites with their own domains, which when the user enters in their credentials, the request is sent to the single hosted data set and filters out the data from the other two courses and only let's Ben see his activity for Tee It Up, as an example.

    From the golf courses' perspective, their internal users would have a similar three-part credential paradigm, and when John Admin wants to see all of the activity for just his course, Fore! Golf Course, he would only see that courses' activity, even though Tee's and Swing's data is physically in that same dataset as well, albeit with different GUIDs.

    In a nutshell, since Ben doesn't want multiple usernames/passwords just to set up a tee time and the golf courses don't want their data shared with anyone else, is there a way with the current AA web security system that this can be handled in a single application with a co-tenancy dataset?

    Any thoughts on how to accomplish this would be appreciated. I'd like to stay as much as I can within the "canned" AA security framework as possible, although I realize it would be possible to completely roll my own,


  • #2
    Re: SaaS - Data Model Question

    is there a way with the current AA web security system that this can be handled in a single application with a co-tenancy dataset?
    Yes. Basically you have the right idea. Just grab the user's url and then set your filter properties accordingly. You typically do this on an intermediate page after login where you process some xbasic and then redirect to the user's "landing" page.

    BTW: Alpha's security is actually very good. I don't think it will constrict you in anyway if that's what you are worried about. Basically you link your user table to Alpha's security tables. There's some videos on this I believe and Alpha gives you to a couple of custom UX components for that purpose.
    AlphaBase Solutions, LLC


    • #3
      Re: SaaS - Data Model Question

      You would have just one login for each individual. If they are coming from different URLs you can automatically set their "current" course just because they used that particular URL, you don't need to do anything in security for that. If you want them to be able to bounce from course to course, you just present a hyperlink for each course and that becomes their current course.

      You don't really need multiple URLs, one for each course, but you can if that is what the course owners want. It is easy to have one URL, one site, and present a list of courses to the user. They can select the course they want. You can let them select their "default" course, and next time they login the website will make that their current course. There is no need to store the domain in security, but you would want a field to designate their default course, which would just be the CourseID.

      If you did have different URLs for each course, then you could, if you wanted to, make your single website act like it is a totally different website depending on what URL is used. You can set images, the important CourseID value, etc., all based on the URL that hit the site. You do not have to have a landing page for each course -- it gets problematic if you start having different silos for each course. The entire site (images, etc) are tailored based on the URL they came from.
      Steve Wood
      There is no Cloud. It's just someone else's computer.
      Web - Mobile - Hosting - Products - Frameworks - Developer Resources
      AlphaToGo | IADN (100% Alpha Anywhere Websites)


      • #4
        Re: SaaS - Data Model Question

        Thanks, Steve & Pete,

        This is very helpful.

        I'm probably premature on this because I haven't studied in depth how the security framework is set up, but the concept is that the different courses would be in competition with each other, and so they wouldn't want to see anything that any of their competitors have set up (probably even want to know that their competitor is using the same application), which would include any security options.

        So Mr. Jones may be allowed certain privileges at Fore! but not at Tee It Up, as one example of potential Security setup issues.

        So in this type of scenario, would I have different security options set in a separate "user parms" table, and that's where I could store the username/password/domain?

        So I think I'm looking at the type of arrangement pictured in the attachment, right?

        Any feedback will be appreciated ...
        Attached Files


        • #5
          Re: SaaS - Data Model Question

          Don't think of the user's table as a "course users table". It is just a User table - everyone who can login, including you as Admin and not associated with any course. The URL does not go in the Users table either (or describe what is supposed to be used for?) You can flag each user with a Role so you can easily lists the Members separate from the Admins, Staff, etc.

          The Security Framework tables are to be left as is, you should not modify their structure. The websecurity_users table has a GUID to identify the user. You can use that OR the userid (typically an email address) to match up to your own User table. Your User table will have details such as Name, Address, etc. but also their assigned CourseID. So, if you have them login on a screen that does not show the other courses, once they login, the system gets the CourseID (to a session variable) and your entire system is then tailored to that course as far as that user is concerned.

          If you want each user to have access to more than one course, and with different permissions at each course, then yes you need a Params table between the User table and the Course table. That table might look like this:

          userid courseid param1 param2
 1 0 1
 2 1 1
          The guess there is that user (or their GUID if you choose to use that), at Course 1 has Param1=False, Param2=True. And at Course2 has Param1=True, Param2=True. Obviously that would need to be tailored to whatever you need.

          This is not a perfect description of how you would set it up, it needs some refinement.
          Steve Wood
          There is no Cloud. It's just someone else's computer.
          Web - Mobile - Hosting - Products - Frameworks - Developer Resources
          AlphaToGo | IADN (100% Alpha Anywhere Websites)


          • #6
            Re: SaaS - Data Model Question

            Thanks Steve,

            Greatly appreciated ...