We now have a Pinterest account. Still in it’s infancy and only a few dozen images so far, but if you want a peek, here it is:
We now have a Pinterest account. Still in it’s infancy and only a few dozen images so far, but if you want a peek, here it is:
If you’ve made it Part 3 then you either find this subject really interesting or else you have difficulty sleeping at night 🙂 This final part of my article on Software Licensing discusses some of the ‘nitty gritty’ and gets down and dirty with some real code samples. All code samples are taken from oneSql.
The value of Part 3 of this article will be mainly to developers using the Xojo Programming Language for Cross Platform Software Development, although developers in any language can benefit and in fact anybody with an interest in going ‘behind the scenes’ of software development.
One thing very noticeable when preparing this article is just how much ‘behind the scenes’ work is necessary sometimes to give the customer a simple, slick experience. Simple is hard ! The way this article is structured with a Customer Experience section followed straight after by a Behind the Scenes section, makes this very clear.
CUSTOMER EXPERIENCE 
When the customer decides that your product is for her, as far is as she is concerned the following two events take place:
BEHIND THE SCENES 
chol.technology receive the Order Confirmation via Paypal. The chol.technology LicenseBoss Software automates the following sequence of events:
CUSTOMER EXPERIENCE 
The customer receives an email which looks similar to this:
The instructions are Clearly Documented for the customer in an email as a Four Step Process. After Step 4 the product is fully licensed, and the window below is displayed briefly before closing automatically:
BEHIND THE SCENES 
The Software License window, accepts the email pasted into it and immediately strips the unnecessary information and displays the encrypted license. The actual encrypted license is contained between the <CHOLTECH> and </CHOLTECH> tags, therefore the only part of the pasted email that is displayed and then processed is the part taken from between those two tags.
When the Save button is pressed the encrypted license is created as a text file and stored in the SupportFiles folder within the oneSql folder. The newly created license file is called oneSqlLicense.lic
At this point the License File Decode method is called with the license file contents as a string parameter. Multiple flags are altered and adjusted within the program to indicate that the product is now licensed. Further details on that wouldn’t be prudent for me to discuss publicly 🙂
The actual license file decode method is straightforward. All the Encryption and Decryption routines are pre-build, based on my R10Cipher File and Text Encryption product, (shameless plug – developer licenses are available for the Encryption modules, contact me for details) and imported into my products as a module whenever I start to develop a new program.
Obviously the DecodeLicenseFile method basically reverses the work done by the EncodeLicenseFile method in the LicenseBoss program as described in step by step detail earlier.
I know some of you out there are Xojo Developers, so here’s a commented example of the code. You can see how straightforward it actually is:
NOTE: Licensing in this fashion has an additional benefit. It caters for Zero Effort Configuration.
In a corporate environment if you were rolling out oneSql to dozens of computers, you could have a centrally situated Corporate or Site License which could be copied to each persons computer using a script. Very Fast, Very Simple and Damned Convenient 🙂 Essentially zero interaction required from the user. That’s got to be a good thing 🙂
The Final Beta of my Cross Platform, Multi Language, Multi Database Tool – oneSql is now available. Hopefully I’ve got everything right and it performs as expected with no (major!) bugs. Existing Beta Testers can download from the usual place, and new Beta Testers can sign up HERE.
Prior to release I have to finish the Manual, finalise Pricing, setup Paypal and also setup a Sample Database for new users to use during their Trial Mode. I also need to put the oneSql website live … mmm more than I realised … 🙂
The final artwork has arrived back for the oneSql box and the oneSql manual, you can see the images below:
Note that for this final Beta you should delete both your Settings and your Preferences file as there have been changes involving encryption.
I wanted to do something different to mark the release of oneSql, so I am toying with the following idea of a bonus or incentive, I’d love to know your opinions:
The first 10 people to purchase any edition of oneSql (except the Single User Standard Edition) will receive a Limited Edition oneSql mug (1 of only 20 in existence) as well as a goody bag of assorted promotional items. In addition they will receive a printed and signed edition of my computer security ebook, ‘Securing the Network’. I may even throw a T-Shirt in there as well 🙂 I will ship this bonus to anywhere in the world.
The first 100 purchasers of oneSql Single User Standard Edition receive a voucher worth $5 off their next purchase from chol.technology.
As always – leave you comments below. If you don’t talk I can’t listen.
Finally ! English, French, German, Italian and now Spanish are all supported by the latest Beta of oneSql, our Cross Platform, Multi-Database SQL and Database Tool.
Always interested in additional Beta Testers, if you are interested you can go to this page to register your interest.
Besides the addition of Spanish as a supported language, there are just a few more changes ‘under the hood’ so to speak.
Existing Beta Testers can download from the Build List in the Trello project as usual. Please let me know of any issues as the Release Version is due very soon now … 🙂 Your time and efforts are much appreciated.
Updated 02/07/2014-1740: The bug in 3006b which causes an intermittent crash when attempting to logon to a Database Connection, has been fixed along with the following tweaks in Release 3006c:
This latest Beta Release of oneSql comes very close to the official Version 1.0 release, which I expect to be within the following two weeks, definitely before the end of July. I have one more language to add (Spanish) and I already have the translations so that should be relatively straightforward.
I also have a few tweaks to the software to do, the Manual to finish and some more testing and then hopefully we will be good to go with a Version 1.0 release. There are a couple of features that make this a fairly major release, so read on 🙂
I’m always keen for more Beta Testers, so if you are interested please CLICK HERE!
One major change in this release is that the stored Password Credentials for the Connections are now stored in an encrypted manner. This stops someone snooping your database password by querying the connection record from the settings database.
There is more to this however. See the image below of the Preferences window from oneSql.
There are two choices for the encryption. The top choice encrypts the Connection Password in such a way that it is then specific to your computer. If you copy oneSql and the Settings Files onto another computer then the Stored Credentials will not work. This choice is ideal for use in a more secure environment, where for example access to databases is only permitted from select computers and / or locations.
The second choice encrypts the Connection Password in such a way that you can copy the oneSql folder from your computer, put it onto your laptop, or another computer, and your stored credentials will work fine.
This also means that you can copy (oneSql does not need an installation, nor does it put any files on your computer outside of the oneSql folder) oneSql onto a USB Drive, run it from that USB Drive on any Mac, Windows or Linux machine you plug it into. Did I mention it will render itself in your native language as well – as long as your native language is either English, Spanish, French, German or Italian ? 🙂
Does copying oneSql to a USB Drive go against the Software License ? No. Restricting access to a single computer either by the installation of Configuration Files or Registry Entries goes against the design remit of Utility software which in my (not so!) humble opinion is the Developers or DBA’s equivalent of a tradesmans tools.
Can you imagine a screwdriver being licensed to only be used on a given object ? What if you had to pay for another license for every object on which you used your screwdriver ? Forget the expense, it’s just not convenient. I don’t want to punish legitimate users of my software in a vain attempt to stop people stealing my software.
My software License for oneSql is simple, and is based on Concurrency. You can use oneSql on one device at once. If you install it on more than one device then you owe me a few extra $$$, which the software is obviously worth or you wouldn’t be bothering to install it multiple times. Site Licenses, Educational Licenses etc. are all available – contact me for further details: email@example.com
Ok, so I diversified slightly(!) in the last paragraph, (in fact, I’ll rewrite the last paragraph and make it its own blog post as I’m sure the licensing question will be asked often.) back to the 3006b release of oneSql.
Please Note that once you have chosen your preferred type of Encryption, you will need to Select Each Connection and Re-input the Password, then Save. This is a one off procedure that is absolutely necessary or else your Stored Credentials will not work.
This release also includes a new Menu – Actions. From the Actions Menu you currently have the following choices available, which are I think self explanatory:
One feature that I put in, took out and have now put back into oneSql is the ability to select a portion of the SQL text and execute just the highlighted selection. I have found this facility very advantageous in similar products and believe it is a worthy addition to the oneSql feature set.
The other fairly major addition in this release is the Script Library. The picture below has been annotated so I’m sure you can see where I’m going with this.
The ability to store SQL Scripts within the SQL database tool, categorised by Connection (or not – if that’s what you prefer) is I believe very important.
Future versions of oneSql will allow far greater capability and flexibility in the Script Library, for now however we have the basics on which to build something extremely useful.
The Script Library window can be accessed from the Tools Menu of oneSql.
IMPORTANT: If you are NOT creating a new oneSql folder from scratch then it will be necesary to update your oneSql Settings file (oneSqlSettings.db in the SupportFiles folder) by opening it with a SQL Tool (oneSql ?!) and executing the following SQL Statement:
CREATE TABLE csh_scr_main (scr_pk INTEGER PRIMARY KEY AUTOINCREMENT, scr_name VARCHAR(50) NOT NULL, scr_script VARCHAR(9999), scr_con_pk INTEGER DEFAULT 0)
This will create the necessary table to store Scripts. This table (and all others required) is automatically created if this is the first time you have used oneSql.
The previous oneSql Beta ran out yesterday (30th June 2014). This release will work during July only, as the commercial release of Version 1.0 will be out before the end of this month.
If you would like to purchase oneSql for the pre-release price of £15 (valid until Version 1.0 arrives) then you can do so from here. You will receive the same upgrades and support as anyone who purchases Version 1.0 later at the more expensive (and as yet undecided) standard price.
oneSql Beta Edition 1606 was released earlier today. With one thing and another this release has been a while coming. I hope it’s considered worth it !
The main changes in this release are:
I have uploaded a couple of movies to YouTube that demonstrate how the Data Import Templates work. These templates could make your life much simpler and convenient should you need to import data often. For the Version 1.0 of oneSql their functionality will remain virtually unchanged, however future releases will include Update as well as Insert functionality, Programmable Column Values, Logically Calculated Column Values, Automation and much more.
oneSql: Creating an Import Template
Using an Import Template
Here are some screenshots taken from the latest version of oneSql.
There is a new Beta Edition of oneSql available. This update to oneSql adds an Import Data option to the Tools menu. This new menu option opens the Import Data window where you can setup your import structure.
This is done in the Configure tab of the Import Data window. You can select the type of file that you will be importing (delimited by Tab, Comma or Semicolon), you then select the Database Table you wish to import into.
The next thing is to Double Click the Columns that you wish to update. Double Clicking in the Available Columns list moves the Column to the Selected Columns list. Double Clicking in the Selected Columns list moves the Column back out to the Available Columns list.
You can reorder columns by selecting the column and dragging it within the list.
Once you have configured the import to match your import file, click the Import tab. Here you can see we have two buttons. The first button loads your text file into the import list and the second button marked Save creates the necessary import statements behind the scenes and writes your import file to your database.
Once the import is complete the import list is cleared and you are told how many rows have been processed.
Note the Checkbox options to ignore the first line (if you are using column headings in your source file) and to remove double quotes (often seen in badly formed import files).
The third tab option, Templates, is not yet implemented. This is where you will be able to save your import configurations and give them a name so that you can retrieve them quickly and use them again at a future time. A potentially very useful facility. Let us know if you would find this feature useful.
If you are interested in becoming a Beta Tester for oneSql, please click here: http://bit.ly/1lq3kk8
To understand oneSql it is necessary to first be introduced to DataViewer. DataViewer is a small collection of software objects available for Xojo and RealStudio Developers to purchase and use within their own programs. DataViewer is a self contained window which can connect to any MySQL or SQLite database and perform SQL Queries and execute SQL commands against that database. Lots of features are supported including Export in several formats. DataViewer works on Mac OSX, Microsoft Windows and Linux.
Initially oneSql was created as a demonstration of what could be created using the DataViewer components. This is still the case and all the main functionality from oneSql will make it into the DataViewer component, and vice versa.
In addition however I’ve decided to make oneSql a Stand Alone, LightWeight, No Install Needed – SQL Database Tool for OSX, Windows and Linux – and possibly iOS and Android.
oneSql currently supports MySQL and SQLite. I intend to add support for PostgreSQL, Oracle and ODBC in future releases.
The target audience for oneSql is initially technical people, or ‘power users’ who need a simple, efficient, cross platform SQL Tool on their portable USB Drive. DBA’s, System Admins, Developers, Accountants – all have need of a tools such as oneSql.
These users probably currently have a favourite tool for each operating system platform they use. I’d like to replace their existing tools with oneSql. I hope to do this by focusing on the features that are most important to them and eliminating those that seek to overcomplicate the typical SQL product.
I also hope to introduce new functionality that will interest those same individuals who can get additional benefits from using oneSql. For example the ability to put the Mac, Windows and Linux versions of oneSql onto a USB Drive and then connect the drive to virtually any computer and load and use oneSql, without installation, is fairly unique.
Multi Language Support – English / Spanish / French and German, will all be featured in the initial Version 1.0 release. This will be the first time I have designed and written software from scratch to incorporate multiple language support.
Some of the Key Features and Benefits of oneSql available in the initial 1.0 Release are noted below:
Some of the Features and Benefits I envisage for future editions of oneSql are noted below:
At the time of writing oneSql is just a few weeks from Version 1.0 Release. Release will be via my website initially (www.stevencholerton.com) followed by the Apple Mac Store.
It’s interesting to me that my idea to release this product was met by a lot of anger and derision by someone who helps develop a product with which oneSql potentially competes.
At the end of the day the SQL Tool market is fragmented, and without any clear market leader there are opportunities for all. As a recently passed friend of mine was fond of saying, ‘Even a Mouse can look at the Queen !’ Live and Let Live I reckon, there are enough wars in the world without starting any more, and let’s just agree to let our products do the talking.
Dedication: oneSql is dedicated to Alison Fowler. RIP.
The latest version of oneSql Beta Edition now supports French as well as English. German, Spanish and Italian coming very soon 🙂 We are still keen for more Beta Testers, especially those who are running French Operating Systems on their PC’s or Macs.
A couple of images 🙂
Products and Affiliate Links
There is an ongoing debate among database ‘experts’ regarding the design of a Primary Key. A debate that in my opinion should have been done and dusted a long time ago.
Note: A Primary Key is a piece of data contained in a database Column that uniquely identifies the database Row. This is the same as how a National Insurance number uniquely identifies us to the authorities in the UK, or how a soldiers Service Number uniquely identifies then within the Military. If you need to View, Update or Delete an existing database record then it is essential that you can uniquely identify it.
Two Main Schools of Thought
The first says that the Primary Key should be a valid piece of information in it’s own right – not just an identifier. Like a name for example. In the West we use a Surname which identifies us when amongst other people, most of which will hopefully have a different surname. In situations where that is not true, for example family gatherings, the first name can be used as well as a means of narrowing this down. It can be difficult to build up a unique piece of information using valid information.
The second school of thought acknowledges the problems of the above solution and solves these issues by allowing a non meaningful Unique Identifier whose sole purpose is to be able to identify uniquely within any amount of similar items. This is basically what we have with soldier Service Numbers and National Insurance numbers.
My preference is with the second school of thought and in fact you can easily adopt this strategy with most Database Engines using the Auto Increment option on the Column. This lets the Database Engine itself take care of generating a Unique, Non Reuseable Identifier.
I always use the first Column of my Database Table as my Primary Key and name it:
The XXX depends on the Database Table in question. For example I might have a Table called:
for my Contacts. Each column will be prefixed with con. Therefore my Primary Key for this particular table will be:
Consistency and Structure
All my Database designs use the same structure in order to build consistency, something which is not fully appreciated until you have to work with legacy databases which haven’t been built with consistency, structure or maintainability in mind.
Another example of consistency and structure; the second column of every Database Table I design is always XXX_updguid.
This column contains another identifier, however this one changes with every edit or update of the database record. This is used so that I can find out if the data I am viewing on my screen has actually since been updated elsewhere by someone else. A comparison between the value of the updguid I have in memory and the value of the one stored in the database is all that is needed to determine the validity of the information I am viewing. If the information is stale I have several options I can pursue. This all is part of my Record Locking strategy, covered in another Databasics article soon 🙂
Any questions, comments or thoughts to firstname.lastname@example.org
© Steven Cholerton 2013
Version 1.0.0 – 2nd December 2013