#
SQL Cardfile
Help Page

Copyright © 2016 Michael Talbot

## Introduction

SQL Cardfile is a simple card file database using SQLite© as the backend. It is very similar in layout to the sort of cards that would be found in an old-fashioned library card catalogue. It is designed to be simple to use but versatile enough to fit a range of situations. All that you need to do is define the fields you want on the card (and their type) and you are ready to go.

If you need to create a complex database, need different layouts or need functions then this is not going to be a suitable solution for you. I would recommend that you look at other solutions such as those available in LibreOffice Base, Microsoft© Access or FileMaker Pro©.

## Quick Guide

### Creating A New Database

Creating a new database is very straight forward but it is a good idea to plan it first. You should write down the names of the fields you want to create and the data types you want them to have (TEXT, INTEGER or REAL) as well as deciding the order you want the fields to appear in. Once you have planned your database follow the steps below to create it.

1. Choose "New DB..." from the "Database" menu.
2. Choose the location and filename for the database you want to create (The standard file extensions for SQL Cardfile databases are ".sqlcard" and ".sqlcardfile" but they need to be added manually) and click "Save".
3. Enter the name you wish to give the field in the text box and select the field type from the pull-down list, then click the "Add Field" button to insert the new field into the database.
4. If you make a mistake you can delete an entry in the field list by selecting it and clicking on the "Delete Field" button. If you made a spelling mistake in the field name then double-click on the name and correct it. It is not possible to change the type of a field once it appears in the list.
5. Once you have finished adding all of the fields you want in your database, click on the "Finished" button to create the database. If you have not created any fields then the database will not be created.
6. The database will be opened automatically once successfully created.
7. Instructions on using your new database can be found in the next section.

### Using A Database

To open the database you want to use go to "Open DB..." in the "Database" menu and select your database, then click "Open".

If the database is read-only then the display will show that. If you edit a card the changes will not be saved. Also, you will not be able to add, delete or copy cards.

To close the open database choose "Close DB" from the "Database" menu. Any changes to the database will be saved before the database is closed.

To quit "SQL Cardfile" choose "Exit" from the "Database" menu. Any changes to the database will be saved before the program quits.

Navigation
The available navigation options are listed below:

- "First" button: Will take you to the first card in the database.
- "Prev" button: Will take you to the previous card in the list.
- "Pick" button: Will bring up a dialog box allowing you to select the card you want to view.
- "Next" button: Will take you to the next card in the list.
- "Last" button: Will take you to the last card in the database.

Card Actions
Below is a list of the available card actions:

- "Add" button: Will display a dialog allowing you to enter values for the new card. When you click "Save" in the dialog those values will be enterred in the new card otherwise the default blank values will be used. The new card is put at the end of the card list.
- "Delete" button: Will delete the current card if you choose "Yes" in the prompt dialog otherwise nothing will be done. Once the card is deleted the next card in the list will be displayed.
- "Copy" button: Will create a copy of the current card and add it to the end of the list. The new card will then be displayed.
- Editing: Edit a value on a card by double-clicking on the value and then change it. The change will be saved automatically when you are finished.

### Exporting Data From A Database

You can export data from a SQL Cardfile database to a tab-separated text file using the following procedure:

1. Open the database containing the data you want to export.
2. Choose "Export..." from the "Data" menu.
3. Choose the location and filename you want to export to and click "Save".
4. A message will pop-up when the export is complete.

### Sorting Data In A Database

You can sort the data in a SQL Cardfile database using the following procedure:

1. Open the database containing the data you want to export.
2. Choose "Sort..." from the "Data" menu.
3. Choose the sort criteria you want to use and click "Sort".

### Notes

1. To unsort data choose "Unsort..." from the "Data" menu.
2. To view the current sort criteria being used choose "View Sort..." from the "Data" menu.
3. If you export the data from a database while a sort is in place then the exported data will also be sorted.
4. Sorting of TEXT fields is done on a character by character basis. This means that if you have numbers in a text field the number 12, for example, will be sorted before the number 9 because the first charcter of 12 is 1.

## Keyboard Shortcuts

The following keyboard shortcuts are defined:
(Macintosh© users see note 1)

- New Database: Control & N (See note 2)
- Open Database; Control & O (See note 2)
- Close Database: Control & W
- Exit Program: Control & X
- Add Card: Control & Plus (+)
- Delete Card: Control & Minus (-)
- Copy Card: Control & D
- Go to first card: Control & Home
- Go to previous card: Control & Left Arrow
- Go to next card: Control & Right Arrow
- Go to last card: Control & End

Notes:

1. On a Macintosh© computer the "Control" key should be replaced by the "Command" key.
2. Only one (1) database can be open at a time so, once a database is open, the "New Database" and "Open Database" commands are disabled.

## Missing Features

SQL Cardfile is not a fully featured database system and lacks some things that you would normally expect to find. Listed below are some of the missing features.

Search.
  There is no search facility at the moment but I do expect to add it in a future update.
Layouts.
  There is no way to customize layouts at the moment but this may be added at a later stage.
Import.
  There is no way to import data at the moment but you can export.
Missing Data Types.
  The only data types currently supported are TEXT, INTEGER and REAL. I might add additional types in a later version.

## Version History

Version 1.0
  Initial release.

## Acknowledgements

The icon used for this extension is derived from an icon in the "Tango Icon Theme" which was released into the public domain by its copyright holders.

## SQL Cardfile License

"SQL Cardfile" is released under the following license.

> ### Software License Agreement

> ### Definitions

> The following definitions are used in this contract:

> 1. "Software Product" refers to the software application "SQL Cardfile" including, but not limited to, the application itself, any additional components included with the application and to all documentation associated with the application.
> 2. "License" refers to the terms and conditions for the use, reproduction and distribution of the Software Product.
> 3. "Licensor" refers to Michael Talbot.
> 4. "Licensee" refers to an individual or any other legal entity as defined under Australian law that has been granted a License to use this Software Product.

> ### Parties Bound By This Agreement

> This agreement is between the following parties:

> 1. The Licensor.
> 2. The Licensee.

> By installing, copying, or otherwise using the Software Product the Licensee agrees to be bound by the terms of this license agreement.

> ### License

> The Licensee is granted a non-exclusive license to use the Software Product created by the Licensor as follows:

> 1. The Licensee is granted the right to install and use the Software Product on any computer running a validly licensed operating system for which the Software Product was designed.
> 2. The Licensee is also granted the right to make copies of the Software Product for backup purposes.

> The Licensor reserves all rights in the Software Product and any copies thereof except as granted above.

> ### Termination

> The Licensor may terminate the Licensee's License to the Software Product if the Licensee fails to comply with the terms and conditions of the License.

> If the License is terminated then the Licensee must destroy all copies of the Software Product in their possession.

> ### Warranties

> Unless required by law the Software Product created by the Licensor is provided "As Is" and any express or implied warranties including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. The Licensor does not warrant or assume responsibility for the accuracy or completeness of any information, text, graphics, links or other items contained within the Software Product.

> ### Limitation Of Liability

> In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Software Product including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses, even if advised of the possibility of such damage or loss. The Licensor shall not be liable with respect to the Software Product or any part thereof, including, but not limited to, errors, omissions contained therein, libel, infringements of rights of publicity, privacy, trademark rights, business interruption, personal injury, loss of privacy, moral rights or the disclosure of confidential information.

> ### Governing Law

> This license agreement will be governed by the laws in force in the state of South Australia. If any part of this contract is found to be invalid, illegal or unenforceable then that part shall be deemed void and the enforceability of the remaining parts shall not be in any way affected or impaired.

> ### Arbitration

> Any dispute or difference arising out of or in connection with this contract shall be determined by the appointment of a single arbitrator to be agreed between the parties, or failing agreement within fourteen days, after either party has given to the other a written request to concur in the appointment of an arbitrator, by an arbitrator to be appointed by the President or a Vice President of the Chartered Institute of Arbitrators.