From 8362bf63dea22bbf6736609b0f49c152f975eb63 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 20 Jan 2010 01:29:50 +0000 Subject: Added old abandoned KDE3 version of koffice git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1077364 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- doc/kexi/Makefile.am | 4 + doc/kexi/basics.docbook | 504 +++++++++++ doc/kexi/building.docbook | 248 ++++++ doc/kexi/comparing.docbook | 98 ++ doc/kexi/configuration.docbook | 230 +++++ doc/kexi/contact-example.png | Bin 0 -> 2392 bytes doc/kexi/credits.docbook | 63 ++ doc/kexi/database.docbook | 649 ++++++++++++++ doc/kexi/designingforms.docbook | 1480 +++++++++++++++++++++++++++++++ doc/kexi/enteringdataintotables.docbook | 130 +++ doc/kexi/enteringdatausingforms.docbook | 33 + doc/kexi/index.docbook | 122 +++ doc/kexi/intro.docbook | 78 ++ doc/kexi/menus.docbook | 701 +++++++++++++++ doc/kexi/querydesigning.docbook | 109 +++ 15 files changed, 4449 insertions(+) create mode 100644 doc/kexi/Makefile.am create mode 100644 doc/kexi/basics.docbook create mode 100644 doc/kexi/building.docbook create mode 100644 doc/kexi/comparing.docbook create mode 100644 doc/kexi/configuration.docbook create mode 100644 doc/kexi/contact-example.png create mode 100644 doc/kexi/credits.docbook create mode 100644 doc/kexi/database.docbook create mode 100644 doc/kexi/designingforms.docbook create mode 100644 doc/kexi/enteringdataintotables.docbook create mode 100644 doc/kexi/enteringdatausingforms.docbook create mode 100644 doc/kexi/index.docbook create mode 100644 doc/kexi/intro.docbook create mode 100644 doc/kexi/menus.docbook create mode 100644 doc/kexi/querydesigning.docbook (limited to 'doc/kexi') diff --git a/doc/kexi/Makefile.am b/doc/kexi/Makefile.am new file mode 100644 index 00000000..085981d9 --- /dev/null +++ b/doc/kexi/Makefile.am @@ -0,0 +1,4 @@ + +KDE_LANG = en +KDE_DOCS = AUTO + diff --git a/doc/kexi/basics.docbook b/doc/kexi/basics.docbook new file mode 100644 index 00000000..7bb34b9f --- /dev/null +++ b/doc/kexi/basics.docbook @@ -0,0 +1,504 @@ + + + + + &kexi; Basics + + + + + &kexi; Databases + + + Many applications such as OpenOffice.org or Microsoft Excel create + files which are called documents. &kexi; + creates files too, but we refer to them as &kexi; + database files, or simple database + files here. &kexi; database files usually have the + extension .kexi. + + + + + + In addition to storing your databases in database files, &kexi; + can also use databases on database + servers, which is why we refer to them as + database files, and not simply as + databases. + + + + The term &kexi; project, or simply + project is also used to refer to a &kexi; + database, regardless of whether it is stored in a file or on a + database server. + + + + + + Creating a New Database File + + + + + + Run &kexi;, or if it is already running, use + + + &Ctrl;N + + FileNew + . + + + + + Click the OK to confirm the + creation of the project. + + + + + Enter a name for your project, and click Next. + + + + + Use the file browser to choose a folder where you would + like to save your database file. You may change the file + name in the Location: box if you dislike + the one that is suggested. + + + + + Click Create. + + + + + + + + The &kexi; Main Window + + + The Project Navigator and + Properties Editor are shown in panes on + each side of the child window. These can be resized or hidden + as required. A pane can be hidden by clicking the small cross + at the top of the pane (just below the toolbar). + + + Database objects (tables, queries, etc.) listed in the Project + Navigator can opened by clicking (or + double-clicking, depending upon your global &kde; settings) on their names. + + + + +Main application elements + + + + +Main elements of &kexi; application's window are: + + +Menubar + +contains available commands for the application. +You will find detailed description of any of the commands in the appendix. + + + + +Toolbar + +contains most frequently used commands. + + + + + +Project Navigator's pane + +contains a list of any object (tables, queries, forms, ...) created +within the currently opened database project. The navigator also contains +small toolbar with most usable commands related to the database objects. + + + + +Opened database objects area + +a central area of the application taking most of the screen space. +For IDEAl user interface mode it contains switchable tabs with +windows that are always maximized. For Childframe user interface +mode it contains floating windows. + + + + +Properties pane + +contains a list of properties of currently activated database object. +For certain objects (⪚ form's widgets) it can have several tabs. + + + + +Taskbar + +contains a list of currently opened windows with database objects. +For IDEAl user interface mode, it is available as a number of tabs. +For Childframe user interface mode, it is available as a number of +buttons, behaving just like your operating system's taskbar. + + + + + + +<guilabel>Project Navigator</guilabel> pane + +The Project Navigator pane is one of the most frequently used elements +of the &kexi; main window. The pane contains a list of all objects +created within the currently opened &kexi; database project. The objects +are split into groups: tables, queries, forms. + + +The Project Navigator pane also contains a small toolbar for most +frequently used commands (from left to right): Open +selected object, Design selected object, +Create a new object, and Delete selected +object. + + + +For each object on the list a context menu is available using the &RMB;. +For example, this is context menu for the persons table. + + + + + + +Double clicking with the &LMB; on the object's name on the list allows to +open the object in Data View. If the object's window was alread opened, +the action just activates the window without switching it's view mode. + + +Note that your operating system or window manager can be set up to handle +single clicks instead of double clicks. In this case it is enough to single +click on the object name to open its window. + + + + + + +Database object windows + + +Opening an object's window + + +Select the object in the Project Navigator +pane. + + + + + +Click the Open button on the Project Navigator pane's toolbar. + + + + + +Commands related to object windows +Closing an object window + +When the IDEAl user interface mode (the default) is used, each window has +its own tab. Place the mouse pointer on the icon on the tab. A + Close button will become +visible. Click it to close the tab. + + +In the Childframe on the right hand of each opened window there are +buttons you can use to control the window. Click the first one on the +right hand to close the window. + + +Alternatively, regardless of the user interface mode you are using, +you can select Window +Close from the Menubar. + + +Window buttons for Childframe user interface +mode + + +The other buttons (from right to left) can be used to: maximize, minimize +and undock the window. + + +There's a small icon on the left side of the title bar which can be clicked +to show a context menu with commands related to the window. + + + + + + + + +<guilabel>Property Editor</guilabel> pane + +In the Property Editor pane you can change properties of the object +displayed in the active window. Depending on the context, the pane is +consisted of one or more tabs. The first, always visible tab, Properties, +contains the list of available properties. + + + +Rules for using the Property Editor: + +Each row contains a single property. + + +You can use the mouse or the keyboard to change values of particular +properties. + + + +Most frequently used types of property values are: + +a number; you can enter the value directly +or increase or decrease its value by clicking with the &LMB; on the arrows. + + + +text +drop down list of values +Yes/No; +you can toggle the value by clicking on the button; +Yes (true) means that the button is +toggled on, >No (false) means that +the button is toggled off. + + + + + + +There is no need to confirm a changed value: changes are visible immediately +after moving to a different row of the Property Editor's list or by pressing +the Enter key. + + + +Names of the recently changed properties that not yet were stored in the +database are marked with bold text. + + + + +After changing the value of a property, a special Undo changes +button appears on the right side of the Property Editor's list. + +By clicking it you can revert the value of the property to the original value +that was loaded from the database upon opening the database object. The button +is only visible when the property is actually highlighted. + + + + + +The Property Editor pane is empty if: +no single database object's window is opened, or + + +the active database object's window does not offer properties; it is usually +the case when it is opened in Data View instead of Design View + + + + + + + + + + + + + + + Opening an existing &kexi; database file + + + + To open an existing &kexi; database file: + + + select it in the Open Existing Project + dialog; or + + + open it by clicking on the .kexi file icon. + + + + + + Opening a database file in the <guilabel>Open Existing + Project</guilabel> dialog + + + + Run &kexi;. + You should see Choose Project startup dialog. + Choose Open Existing Project tab. + You will see the following dialog: + + + + From Current location drop down box, pick a folder + containing a file you are looking for. + + + You can either pick a file or enter its name in the + Location: box. + + + Click OK. + + + + + + Notes + + + + By default the Filter: drop down list has + Kexi Database File-Based Project selected. + In case the file you are looking for has an other extension, + you can change the selection of the Filter: + drop down list to All Files to display + all available files (regardless of an extension). + + + If you have selected a file of an external type, like a MS Access .mdb + file, &kexi; will provide you with the option to import the file. + + + + If you have selected a connection data file + (with .kexic extension) or a shortcut to a project on + database server file (with .kexis extension), &kexi; + will display appropriate dialogs. + + + + + + + + Opening an existing &kexi; database file by clicking on .kexi file's icon + + + Click file's icon using your file manager or desktop. + &kexi; will open this database project automatically. + + + + + Notes + + + Note about database files accessed remotely. + You may want to open a database file that is located on a remote + source (⪚ a web or FTP server or a MS Windows network share). + K Desktop Environment allows you to open files from remote sources + directly in applications and to save changes back to the source, but + this is not the case with database files. By clicking on a database + file located on a remote source, a copy of the file will be + downloaded to a temporary directory on your computer and all your + changes will be made to this local file. The remote original of + the file will remain unchanged, so it's recommended to copy + (download) the file to your computer first, then open the file and + copy it back to the remote source if you want to make it up to date. + + + + + + + + Using built-in help + + + + The following ways to get built-in help in &kexi; are available: + + + The Handbook in form of electronic document. + + The Handbook is available by pressing F1 + key or selecting Help&kexi; + Handbook from the menubar. + + + + What's This? hints. + + Select HelpWhat's + This?from the menu bar and click on + an area of the application to get hints about it. + + + + + + diff --git a/doc/kexi/building.docbook b/doc/kexi/building.docbook new file mode 100644 index 00000000..9b900c77 --- /dev/null +++ b/doc/kexi/building.docbook @@ -0,0 +1,248 @@ + + + +Building Simple Databases + +Introduction + +To learn the basics of &kexi;, you could build a simple database +utilizing most elementary &kexi;'s features. To make things simpler, +advanced database design topics will not be covered here. + + +Start by creating a new empty Phone Book. + + + +Having a new empty database project, perform the following steps: + +Design database tables. Read . +Enter data into tables. Read . +Design database queries. Read . +Design forms. Read . +Use forms to enter data. Read . + + + + +Designing Database Tables + +First, there will be two tables added to your database: +persons and phone_numbers. +These are exactly the same tables as described in chapter Database and spreadsheet. +A layout for Persons can be found in section +Data integrity and validity +in that chapter. + + + + + +Select InsertTable + from the Menubar. You can also use the button Create +object: table on the Project +Navigator's toolbar. + + + + +The Table Designer's window will appear. Looking at the top of designer's window +you will notice that &kexi; proposed you a generic name like +template for the new table. The table design is not saved +yet so you will be able to assign more proper name later. Moreover, because of +the same reason, the table name is not yet visible in the +Project Navigator. + + + + + + +The Table Designer window + +Table Designer window consists of following columns: + +PK - Primary Key. + + +Field Caption - caption of the field +which will be displayed during data entering. + + +Data Type - a combo box containing a list of data types, +allowing to set a main rule for entered data for a given field. For example, +when an integer number data type is set for a field, a database user will not +able to enter letter characters into this field. + + +Comments - you can enter here any information useful for +understanding what the given field is provided for. This additional text will +be saved within the table design and only visible in design mode. + + + +In the Table designer window, every row corresponds to +a single table field. You can recognize you are in design +mode because the +Switch to Design View mode button is toggled on within +the main &kexi; toolbar. + + + + +Designing the <emphasis>Persons</emphasis> table + +In the first row click on the cell in the Field Caption +column and enter Name as field caption. + + +Notes about field names and captions + +Every table field must have a name and a caption, these cannot be empty. + + +Field name is a word used by the database, usually not visible for users of the database application. The name may not contain special (national) characters (like ±, ¶, Ü) +or space characters. The name must only contain roman letters, + +numbers and underscore sign "_". Use the latter instead of +spaces or dashes. + + +Field names must be started with a letter or underscore sign +"_", never with a number. + + +It does not matter whether you are using small or capital letters. +For &kexi; the database name "Persons" is the same as +"persons". + + +Field caption, on the other hand, allows you to enter any letters and special characters. It will be displayed for users of the database application. + + + + + + +In a similar way, enter the following fields into the table design: +surname +street +house_number +city + + + + +All the above fields, except house_number, are of type +text. +Change house_number field's type to integer +number. To do this, click on a cell in the Data +Type column, house_number row and then +click on drop down list's button +(you can also press F4 or +&Alt;Down. The list +of data types will appear. Select the Integer number type. + + +From now on, the house_number field only accepts numbers. + + + + +Persons table design is ready. Click +Switch to Data View button on the toolbar to finish +designing and switch to Data View for the table. This allows you entering +data into the table. + + + +As the design is not yet saved in the database, the Save Object As +dialog window appears. You need to specify the name for the new table. + + + +&kexi; offers a generic name like Table1. +To change the name, enter Persons into the +Caption field and press the +Enter key or click the OK +button. The Caption field will be used to display the +table to database end-users, ⪚ as a form. Unlike the name, the caption can +contain any characters including spaces and special characters. + + +Note that filling the Caption field automatically fills +the Name field. For your convenience the rule for using +only letters, numbers and the "_" character is kept. You +can alter the contents of the Name field if you want to. + + + + +You are asked about an agreement for automatic adding of primary key to the table. + + Click Add primary key +button to continue. + + + + +The Persons table has been created and opened in Data View. +Its name appears in the Project Navigator pane. + + + + +Create the phone_numbers table, in a similar +way as persons table. + + + +Create a person field of type Integer +number and phone of type Text. +Do not use a number type here because phone numbers can have many different +forms and prefixes. + + + +Click Switch to +Data View button on the toolbar and enter Phones +caption for the table. As for your previous table, allow &kexi; to automatically +create a primary key. + + + + + + + +&enteringdataintotables; + +&querydesigning; + +&designingforms; + +&enteringdatausingforms; + + + diff --git a/doc/kexi/comparing.docbook b/doc/kexi/comparing.docbook new file mode 100644 index 00000000..f213ac04 --- /dev/null +++ b/doc/kexi/comparing.docbook @@ -0,0 +1,98 @@ + + + + + Comparing &kexi; to other database applications + + + Although different database applications tend to provide similar + functionality, they often use different terminology. For your + convenience, this appendix shows how the terminology used in + &kexi; corresponds to that used by other database applications. + Thus, this chapter may be useful when migrating databases from + one application to another. + + + + Data types + + + The table below shows how the data types in &kexi; correspond + to data types in other database applications. + + + Some of the data types listed here are + sub-types of other types. For example, + the Long text type is a sub-type of the + Text type. To use a sub-type in + &kexi;, you should select the corresponding basic type (in + this case, Text) in the table designer, and then select the + sub-type using the Subtype setting in the + Properties Editor. + + + + Comparison of data types used in &kexi; and other database + applications + + + + + &kexi; + MS Access + dBase/FoxPro + Paradox + + + + + Text (Text) + Text + Character + Alphanumeric + + + Long text (Long text) + Memo + Memo + Memo + + + Date/Time (Date/Time) + Date, Time + Date + DateTime + + + + Integer Number (Integer Number) + Number (Integer) + Numeric + Integer + + + Big Integer Number (Big Integer Number) + Long Integer + Numeric + Long Integer + + + Floating Point Number (Floating Point Number) + Single/Double precision number + Float + Number + + + +
+
+
diff --git a/doc/kexi/configuration.docbook b/doc/kexi/configuration.docbook new file mode 100644 index 00000000..f3d134f7 --- /dev/null +++ b/doc/kexi/configuration.docbook @@ -0,0 +1,230 @@ + + + + + Configuring &kexi; + + + + This chapter describes how you can configure &kexi; to suit your + own needs and preferences. + + + + + Window Layout + + + &kexi; provides a Mutiple Document + Interface (MDI). This means that you can have + several database objects (such as tables, queries, forms and + scripts) open at the same time and in the same &kexi; main + window. Each database object is shown in a child + window within the main window. + + + There is a choice of two MDI modes available, allowing a choice + of how child windows are managed and displayed. The two modes + are: + + IDEAl Mode; and + Childframe Mode. + + These modes are described in the following two sections. You + can change the MDI mode from the MDI + Mode sub-menu under the Window + menu. Note that changing the MDI mode requires &kexi; to be + restarted before the new mode takes effect. + + + + IDEAl mode + + + + IDEAl mode is the default MDI mode, and may be familiar from + other &kde; applications. In this mode, a single child window + is shown maximized within the &kexi; main window at once. + A tab bar, containing one tab for each child window, allows + other child windows to be viewed by simply clicking on the + relevant tab. + + + + + Childframe mode + + + + In Childframe mode, child windows are displayed in the + main &kexi; window, but need not be maximized within it. + In order to use Childframe mode, you need to select + + Window, + MDI Mode, + Childframe Mode + from the menu. + + + Each child window has a titlebar with buttons for maximizing, + minimizing and closing it. They can also be moved and resized + within the main window in the normal way (for example, they + can be moved by clicking and dragging the title bar). + + + The buttons behave as follows: the right-most button closes + the child window. The button on its left maximizes the child + window - note this causes the buttons to move to the top right + of the main window, above the Properties + editor if it is open. The next button to the left + toggles the child window between minimized and restored. + + + The left-most button detaches, or + undocks, the child window, allowing it + to be moved out of the main window. For more information on + docking and undocking windows, see the next section. + + + + + + + Docking and Undocking Windows + + + By default, the Project Navigator and + Properties Editor panels are displayed as + part of the main &kexi; window. It is possible to + undock each panel, so that it is + displayed in a separate window. Once undocked, it is possible + to dock the panel so it appears back in + the main window again. + + + In Childframe + mode, it is also possible to undock child windows. For + example, a child window showing a database table could be + undocked, allowing the child window showing the table to be + maximized on the screen. + + + It can be useful to undock a window when using: + + + + a small screen; + + + + + large tables, queries or forms; and/or + + + + + more than one montitor. + + + + + + + Docking and undocking side panels + + + The Project Navigator and + Properties Editor side panels may be + undocked by either: + + + + double-clicking on the 'grip' bar at the top of the + panel; or + + + + + clicking once on the arrow at the top of the panel, next + to the cross. + + + + + + + Once undocked, panel windows may be docked into the main + window again similarly to undocking: + + + + double-clicking on the 'grip' bar at the top of the window; or + + + + + clicking once on the arrow at the top of the panel, next + to the cross. + + + + + + + + + Docking and undocking child windows + + + Child windows may be docked and undocked in Childframe mode + only. + + + In Childframe mode, child windows may be undocked by: + + + + right-clicking in the tab bar, on the tab corresponding + to the window to be undocked, and selecting + Undock; or + + + + + + right-clicking on the title bar of the child window, and + selecting Undock; or + + + + + + if the child window is not + maximized, clicking the arrow in the top right corner of + the child window (next to the minimize, maximize and + close buttons for that child window); + + + + + + if the child window is maximized, clicking the arrow to + the right of the menu bar (next to the minimize, restore + and close buttons for that child window). + + + + + + + To dock a child window, right-clicking in the tab bar, on the + tab corresponding to the window to be docked, and select + Dock. + + + + + diff --git a/doc/kexi/contact-example.png b/doc/kexi/contact-example.png new file mode 100644 index 00000000..9b2e5dbf Binary files /dev/null and b/doc/kexi/contact-example.png differ diff --git a/doc/kexi/credits.docbook b/doc/kexi/credits.docbook new file mode 100644 index 00000000..6b910547 --- /dev/null +++ b/doc/kexi/credits.docbook @@ -0,0 +1,63 @@ + + + +Credits and License + + + &kexi; Copyright 2002-2006 The &kexi; Team + + &kexi; Developers: + + Jaroslaw Staniek / OpenOffice Polska js@iidea.pl + + + Lucijan Busch lucijan@kde.org + + + Cedric Pasteur cedric.pasteur@free.fr + + + Adam Pigg adam@piggz.fsnet.co.uk + + + Martin Ellis martin.ellis@kdemail.net + + + Sebastian Sauer mail@dipe.org + + + Christian Nitschkowski segfault_ii@web.de + + + Peter Simonsson psn@linux.se + + + &Joseph.Wenninger; jowenn@kde.org + + + Seth Kurzenberg seth@cql.com + + + Laurent Montel montel@kde.org + + + Till Busch till@bux.at + + + + + + Documentation by Martin A. Ellis martin.ellis@kdemail.net, + Jaroslaw Staniek js@iidea.pl + with contributions from Anne-Marie Mahfouf, Raphael Langerhorst, Michal Kubicki and Aron Stansvik. + + + + +&underFDL; +&underLGPL; + + diff --git a/doc/kexi/database.docbook b/doc/kexi/database.docbook new file mode 100644 index 00000000..e89afa55 --- /dev/null +++ b/doc/kexi/database.docbook @@ -0,0 +1,649 @@ + + + +Introduction to Databases + + +What Is a Database? + +You can define a database as a collection of data on one topic. +It is organised in a way allowing to easily browse the information, +make changes or add new items. + + +Look at this diagram for one of the above examples: a simple phone book. + + + A diagram of a phone number database + + + + + + A diagram of a phone number database + + + + +The above picture shows a set of two contacts each of which is +presented on a separate card. It appears that such a card can +constitute a single row in a table: + + +Contacts table + + + + +Name +Tel No. + + +Joan +699 23 43 12 + + +Adam +711 19 77 21 + + + + + + +Terms and definitions: +A single data which constitutes a part of a greater collection can be called a +row or more professionally a +record. +The collection is normally called a table. +Moreover, the most natural name for the table is one describing the data it +offers/stores which is Contacts. +Furthermore, each row in the table consists of columns +often also called fields. In the table +Contacts there are two columns (fields): +Name and Tel No.. + + +For simple uses a single table can make up a database. +Many people consider these two equivalent. +As you will see, for real databases we usually need more than one table. + + +To sum up, you have already got a simple database with one table +Contacts. + + + + + +Database and Spreadsheet + +It is very likely that you have already used spreadsheet applications like +KSpread, OpenOffice.org Calc or Microsoft Excel. If so, you will probably +wonder: since both spreadsheets and databases have tables, why should I use +the latter? + + +While comparing spreadsheets and databases you may encounter the following issues which you will later see in greater detail: + + +Referential +data integrity +Data redundancy + +Data integrity +and validity +Limiting data view +Performance and +capacity +Convenient data entry +Reports +Programming +Multiuse +Security + + + +How Is a Database Different From a Spreadsheet? + + +Gradually exceeding the capacity of a mobile phone, expand your table +Contacts adding a column (field) +Address. Add more telephone numbers +(office, home) for each person and add surnames to names. +To make it simpler we assume the following: + + +the table is limited to two people (obviously, +there could be hundreds and thousands of them in a real +database) +there are no two persons with the same name and surname + + +Contacts table + + + + +Name and surname +Tel +Address + + +Joan Smith +699 23 43 12 +Western Gate 1, Warsaw + + +Adam Willson +711 19 77 21 +London, Frogs Drive 5 + + +Joan Smith +110 98 98 00 +Western Gate 1 + + +Smith Joan +312 43 42 22 +Warsaw, Western Gate 1 + + +ADAM Willson +231 83 02 04 +Frogs Drive 5, London + + + + + + +Such a table can be made both in a spreadsheet and in a database. +Using a spreadsheet is very easy, of couse. What problems do we +encounter at this stage? + + + +Referential data integrity + +Suppose you are using a spreadsheet and you need to change the address of at +least one person. You have a small problem: you often have to change the +address in many rows. For example, Joan takes three rows. A real problem +will arise if you forget to change one of the rows - the address asigned +to this person will be ambiguous, hence +your data loses integrity. + + +Moreover there is no simple way of deleting a chosen person from the table +since you have to remember about deleting all rows releted to him or her. + + + + + +Data redundancy + +This is directly connected to the previous problem. In fields +Name and surname and Address +the same data is entered many times. This is typical of a spreadsheets' +ineffective way of storing data because the database grows unnecessarily, +thus requiring more computer resources (larger size of data and slower access). + + +How can you solve these problems with a database? You can split information +into smaller chunks by creating an additional table Persons +with only two columns: Name and surname +and Address: + + +Persons table + + + + +Name and surname +Address + + +Joan Smith +Western Gate 1, Warsaw + + +Adam Willson +Frogs Drive 5, London + + + + + + +Each row in the table Persons corresponds to a +single person. Table Contacts +is from now on a relation to the table Persons +. + + + + + +Data integrity and validity + +Note the way data is entered in the fields Name and surname +and Address. People entering data can be fallible, +sometimes even negligent. In our sample data we have both different sequence +of entering name and surname (Joan Smith and Smith Joan; Adam and ADAM) and +many more ways of entering the same address. Surely you can think of many +other ways. + + +The above problem shows that ⪚ when searching the telephone number of a +person whose address is "Western Gate 1, Warsaw" you will not get a full +result. You will get only one row instead of three. Moreover You will also +not find all the telephone numbers searching for the value "Joan Smith" in +the field Name and surname, because "Smith Joan" will +not fit to "Joan Smith". + + +How can you solve these problems using a database? You can do this by changing the design of the table Persons by: + + + +Dividing data in the field Name and +surname into two separate fields: Name +and Surname. + + +Dividing data in the field Address +into three separate fields: Street, House +number and City. + + +Guaranteeing data correctness: by ensuring that no fields +are empty, ⪚ you must always enter house number. + + + + +A modified table looks something like this: + + +Persons table + + + + + + + + + +Name +Surname +Street +House number +City + + +Joan +Smith +Western Gate +1 +Warsaw + + +Adam +Willson +Frogs Drive +5 +London + + +Conditions + + +required field +required field +required field +required field +required field + + + + + + +Thanks to introducing the condition required field we can +be sure that the entered data is complete. In case of other tables you may +of course allow omitting certain fields while entering data. + + + + + +Limiting data view + +A spreadsheet displays all rows and columns of the table which is bothersome +in case of very large data sheets. You may of course filter and sort rows +in spreadsheets, however you must be extra careful while doing so. Spreadsheet +users are in risk of forgetting that their data view has been filtered what +can lead to mistakes. For example, while calculating sums you may think you +have 100 rows of data while in fact there are 20 rows more hidden. + + +If you want to work on a small subset of data, ⪚ to send it for others to edit, you can copy and paste it to another spreadsheet and after editing paste the changed data back to the main spreadsheet. Such "manual" editing may cause data loss or incorect calculations. + + +To limit the data view database applications offer +queries, forms +and reports. + + +A very practical way of limitting is the following extended version of +the previously described table Persons: + + +Persons table + + + + +Name +Surname +Street +House number +City +Income + + +Joan +Smith +Western Gate +1 +Warsaw +2300 + + +Adam +Willson +Frogs Drive +5 +London +1900 + + + + + + +Let's assume that the newly introduced column Income +contains confidential data. How can you share ⪚ contact details of the +persons with your coworkers but without revealing their +income? It is possible if you share only a query and +not the whole table. The query could select all columns except +for the column Income. In database world such a query +is often known as a view. + + + + + +Performance and capacity + +Your computer is probably quite fast, however you will easily see that it +doesn't help with slow, large spreadsheets. Their low efficiency is first +of all due to lack of indexes accelertaing the process of data search +(databases do offer them). Moreover if you use things like system clipboard, +even copying data may become troublesome with time. + + +Spreadsheets containing large data sets may take ages to open. A spreadsheet +loads lots of data to the computer's memory while opening. Most of the data +loaded are probably useless/unneccessary for you at the moment. Databases +unlike spreadsheets load data from computer storage only when needed. + + +In most cases you will not have to worry how the database stores its data. +This means that unlike spreadsheets, databases do not care about: + + + +The sequence of rows since you can order the rows according to your needs. +Moreover, you can view the same data in many views with different orders. + + +The same goes for columns (fields) of the table. + + + + +Together with Limiting data view +described in the previous paragraph these qualities constitute the +advantage of databases. + + + + + +Data entry + +The latest editions of applications for creating spreadsheets enable you +to design data-entry forms. Such forms are most useful if your data cannot +be conveniently displayed in tabular view, ⪚ if the text occupies +too many rows or if all the columns do not fit on the screen. + + +In this case the very way the spreadsheet works is problematic. +Fields for data entry are placed loosely within the spreadsheet +and very often are not secure against the user's (intentional +or accidental) intervention. + + + + +Reports + +Databases enable grouping, limiting and summing up data in a form of a +report. Spreadsheets are usually printed in a form +of small tables without fully automatic control over page divisions and +the layout of fields. + + + + +Programming + +Applications for creating databases often contain full programming languages. +Newer spreadsheets have this capability too, however calculations come down +to modifying the spreadsheet's fields and simple data copying, regardless of +the relevance and integrity rules mentioned in previous paragraphs. + + +Data processing within a spreadsheet is usually done via a graphical user's +interface which may slow down the data processing speed. Databases are +capable of working in background, outside of graphical interfaces. + + + + +Multiuse + +It is hard to imagine a multiuse of one spreadsheet. Even if it is technically +possible in the case of the latest applications, it requires a lot of +discipline, attention and knowledge from the users, and these cannot +be guaranteed. + + +A classical way to sharing data saved in a spreadsheet with other person is +to send a file as a whole (usually using e-mail) or providing a spreadsheet +file in a computer network. This way of work is ineffective for larger +groups of people - data that could be needed in a particular time may +be currently locked by another person. + + +On the other hand, databases have been designed mainly with multiuser +access in mind. Even for the simplest version locking at a particular table +row's level is possible, which enables easy sharing of table data. + + + + +Security + +Securing a spreadsheet or its particular sections with a password is only +symbolic activity. After providing a spreadsheet file in a computer network, +every person being able to copy the file can try to break the password. +It is sometimes not so hard as the password is stored in the same file +as the spreadsheet. + + +Features for edit locking or copy locking of a spreadsheet (or its part) +is equally easy to break. + + +Databases (except these saved in a file instead of a server) do not need +to be available in a single file. You're accessing them using a computer +network, usually by providing a user name and a password. You are gaining +access only to these areas (tables, forms or even selected rows and columns) +which were assigned to you by setting appropriate access rights. + + +Access rights can affect ability of data editing or only data reading. +If any data is not avaliable to you, it will not be even sent to your +computer, so there is no possibility of making a copy of the data in such +easy way as in case of spreadsheet files. + + + + + + + +Database Design + +Database design needs careful planning. Note that Contacts +table redesign proposed in section 1.2 can generate problems when the +table is filled with data. For example, renaming a field is a simple task, +but splitting the Address field into separate fields +requires careful and tedious work. + + +To avoid such situations, rethink your database project +before you create it in your computer, and before you and others will start +to use it. Thus, by investing some time initially, you will most probably +save your time on everyday use. + + + + +Who Needs a Database? + +Stick to spreadsheets if: + +Your needs are limited and your data will never grow to +large volumes (can you actually forecast that now?) + + +You are unable to acquire the methodology of database construction. +You may however consider either outsourcing this task to someone else +or using simpler tools. + + +You use complicated spreadsheets and you lack time or money to switch +to databases. Think or ask someone whether this does not lead down a +blind alley. Don't count on magical tools that would change your +spreadsheet (regardless how well made) into a database. + + + + +Consider using databases if: +Your data collection expands every week. + +You often create new spreadsheets, copy within these and you feel +that this work is getting more and more tedious. In this case the +effort of switching to databases easily pays off. + + +You create reports and statements for which the table view of +a spreadsheet is not suitable. You can then consider switch +to using a database with form views. + + + + + +Database Creation Software + +So far you have learnt the general characteristics of databases without +going into much detail about specific applications for designing them. + + +The first databases were built together with large mainframe computers +in the 60s, ⪚ IBM System/360. Those were not the days of PCs, +therefore these databases required a highly specialized personnel. +Although the old computers' hardware was unreliable, they were immeasurably +slower and had less storage capacity, one feature of databases still remains +most attractive: the data access by many users through a network. + + +In the 70s scientists formed the theory of relational databases +(terms like: table, record, +column (field) and relationality +and many others). +On the basis of this theory IBM DB2 and Oracle databases were created, +which have been developed and used till today. In the late 70s the first +PCs were constructed. Their users could (gradually) utilize many types of +applications, including those for database construction. + +When it comes to large databases in companies, the situation +hasn't changed: +they still require powerful computers or computer complexes called +clusters. This goes, however, beyond the topic +of this manual. + + +In the area of "accessible" databases with graphic user interface +for PCs you can choose from the following: + + + + +DBase +- a tool for databases operation for DOS popular in the 80s. Files in DBase format +are still used in some specific cases due to their simplicity. + + +FoxPro +- an application similar to DBase (early 90s). After being taken over by +Microsoft, graphic user interfaces were introduced and therefore it is +used for creating databases on PCs. This product is still offered, though +seems a bit obsolete. + + +Microsoft Access +- an application for databases (data and graphic interface design) with many +simplifications, therefore suitable for beginners, designed in the late 80s, +based on 16-Bit Architecture. This product is offered and widely used till today, especially +by small companies, where efficiency and multiuser requirements are not very demanding. + + +FileMaker +- popular application similar to MS Access in simplicity, operating on Windows +and Macintosh platforms, offered since 1985. + + +&kexi; +- a multiplatform application (Unix/Linux, Windows, Mac OS X) designed in 2003, +developed according to OpenSource principles, part of the global +K Desktop Environment project, +&ie; graphic environment for Unix/Linux systems. A significant contributor +to &kexi;'s development is the OpenOffice Poland company. + + + + + + diff --git a/doc/kexi/designingforms.docbook b/doc/kexi/designingforms.docbook new file mode 100644 index 00000000..b205fe71 --- /dev/null +++ b/doc/kexi/designingforms.docbook @@ -0,0 +1,1480 @@ + + + + Designing Forms + + + Most important terms + + + Form + + + A window provided for easy data entry and presentation on the + computer screen. + + + + + Form's data source + + + Database table or query providing data displayed in the + form. The data source is needed because forms itself are only + tools for displaying and entering data, + while tables and queries are the source of data. New, empty + forms have no data source assigned, so they are not displaying + any data from your database unless you assign a data source + to them. + + + + + Form field + + + Direct equivalent of a column in a table or query. Most frequently + used are fields for displaying text and numbers. Entering a new + value or changing the existing value of such a field causes a change + in the bound table or query column (after accepting the change). + + + + + Form design + + + Tasks you are performing to define the appearance and functions of + the form. To do this, you need to provide + data source, + insert form fields + of various types and place them at the appropriate location. + + + + + Form widget + + Form's element. Main widget types are: + + + + Widgets displaying information, ⪚ a text box or an image box. Each + widget of this type can be bound to a data + source field (a table or a query column). Therefore, such widgets + are called in short form fields. + + + + + Widgets able to perform a specified action, ⪚ a push button + that can close the current form. Within other applications this + widget type is sometimes called form control + because it can perform previously defined action of + controlling your database application's + behavior. + + + + + Other widgets allowing to enrich a form's appearance, ⪚ + a line widget can visually separate two form + areas. + + + + + + + Container widget + + + A widget that can contain other widgets within + its area. For example, frame widget or tab widget are containers. + The form's surface itself is a container as well. A command button cannot + be called as container because it is not possible to insert a widget + inside it. In more complex cases, container widgets can be inserted + inside a container, so nesting is possible. + + + + + + + + + Forms versus tables + + In chapter + 5.2 you learned about how to enter data directly into tables using their + data sheet view. However, in many cases forms are better suited for data + entry: + + + + + A table can contain too many columns to display them on your + screen. A form can display such a data using multiple rows. + + + + + A form allows to visually split data fields + into logical groups, thus increasing readability. Labels with + additional information can be inserted to give users more hints + on how to use the form or what given data fields mean. + + + + + Command buttons can be used within forms for commonly used commands + so users can use forms in a similar way as a standalone applications they + know. + + + + In data sheet view displaying multi-row data text + fields or images + is as easy as within forms. + + + + + + + Working with form design + As with table or query design, you are able to use Data View + and Design View. Form designing is performed in + Design View. We will often refer to the form design window as to + Form Designer. + + + + To create a new empty form, select + Insert + Form + from the Menubar. Optionally, you can use + + New Form + command from drop-down button on the Project Navigator's + toolbar or Create Object: Form command from the context menu. + + + + A new frame will appear, you can resize the form by moving the + borders. The form is covered with a grid which simplifies + accurate positioning of the widgets. + + + + + As with table design, Form Designer provides + Property pane. To save some space on the screen, + the pane has three tabs related to the currently + selected form: + + + + The Properties tab + + Contains a list of properties for the currently selected widget. + + + + + + The Data source tab + + + + Contains properties related specifically to the data source + of the currently selected widget or the form itself. + + + + + + + The Widgets tab + + + + Contains a hierarchy of all widgets of the form. The list simplifies + widgets lookup by name and navigation between them. + + + + + + There is information about currently selected widget's name and type displayed + on the first and second tab. + + Additional toolbars are also available: + + + + The Widgets toolbar used for inserting new widgets + into the form + + + + + The Format toolbar used to format form's elements (⪚ + adjusting widget's size, grouping). Formatting commands are also available + in the Format menu. More about these commands can be found + in . + + + + + + + + Using the <guilabel>Widgets</guilabel> tab + + The Widgets tab in the Property pane provides + a list of form widgets and their hierarchy. Each widget is presented + within the hierarchy beside other widgets being on the same level + (the same parent container). Child widgets (inside containers) are + presented using indented names. + + + + Each widget has displayed its name and type. The type has also an icon + displayed - the same as the one displayed on the toolbar used while + form designing is performed. + + + + + + Changing the current selection on the list causes appropriate selection + on the designed form. This allows for easier widget lookup by name and + easier navigation. For example, it is possible to select a widget by + name, and then switch to the Properties tab to change the + widget's properties. + + + + Keeping the Ctrl key pressed while an item on the + widgets list is being selected allows to select multiple widgets at a time. + Keeping the Shift key pressed allows to select entire lists + of widgets. + + + + + + Giving widgets reasonable names can be useful but is not mandatory. Note + that widget's name is a property that is not visible to the user of your form. + Users will only see a widget text, provided by Text property + or similar. + + + + + Inserting widgets - text fields + + Let's create a form providing information about persons, i.e. a form connected + it with Persons table. + + + If the form being designed should present data obtained from the database, + you need to place appropriate fields + on it. To do this, use the buttons on the Widgets toolbar. Each button corresponds to a single widget type. + + + + + Click + Text Box button on the Widgets toolbar. + + + + + Click on the form surface with the left mouse + button. A new text box widget will be placed in the point where you clicked. + Before you release you can drag your mouse to specify a desired size for the widget. + + + + + If needed, move the inserted widget using drag & drop to a desired + position. You can resize the widget afterwards by dragging one of the + small boxes appearing near its corners. Note that the boxes are only + visible when the widget is selected. If you select another widget or the + form surface, the boxes disappear. + + + + Click the Text Box toolbar button again and click + on the form surface to insert another widget. Repeat this action once + again until you get three text boxes inserted in your form. For sake of + simplicity we will limit ourselves to three data + fields. + + + + + + + + There is a context menu available in form's design mode, activated by a + right mouse button click the desired widget + or the form's surface. The menu offers commands like + Cut, + Copy, + Paste, + Delete + and other, more complex. Many of the commands are also provided in the + Menubar, usually Edit. + Keyboard shortcuts are also available for these commands. Some of the + commands are only available for certain types of widgets. + + + + + The commands + Cut, + Copy and + Paste + makes it possible to move or copy widgets between forms, even between separate + database projects. + + + + + Holding the Ctrl key down while clicking a widget allows to select + multiple widgets. + + + + + Instead of using + Copy + and + Paste + commands, to duplicate a widget within the same form you can hold down the + Ctrl key while moving the widget. After the Ctrl + key is released, the dragged widget will not be moved but copied in the new location. + + + + + + + + Assigning data sources + + The fields you inserted + have no data source assigned yet, + so these are not able to display information from the database. To assign data + source, use the + Data Source tab of the Property pane. + + + The very first step is to specify the form's data source, + i.e. a place the displayed data will be fetched from. As mentioned above, you + will use table persons as a + data source + for your new form. + + + + Click on the form's surface, as you will alter its properties. + + + + Switch to the + Data Source tab and enter persons + table name in the Form's data source drop down list. + Alternatively, you can select this name from the drop down list. + + + + + + You have assigned form's data source. Now you need to do specify + widget's data source. + + + + Click the first text field widget at the top of the form. + + + + In the Data Source + tab of the property pane enter field name name in the + Widget's data source drop down list. Alternatively, you can select + this name from the drop down list. + + + + + Click on next text field widget and enter surname as the data source. + + + + Enter data sources for street, house_number + and city text fields + in a similar way. + + + + + You can now save the form's design (this is not mandatory to test the + form in action). To save, click the + + Save object changes toolbar button or use the + CtrlS + File + Save + menu command. Upon saving you will be asked for entering the form's name. Enter + Persons as caption and click the OK + button. The form's name will be filled automatically. + + + This is the right moment for testing your form. Click the + Switch to data view toolbar button. Unless you made a + mistake while entering data sources, you should see + form's fields filled + with data from the persons table. + + + + + + + If you want to remove widget's data source + assignment for a form widget, you can use + Clear widget's data source button near + the Widet's data source drop down list. Similarly, you can use the + + Clear form's data source button near the + Form's data source drop down list. + + + + + Use the + Go to selected form's data source button to select + appropriate table or query in the Project Navigator, + so you can quickly open a table or query being the + data source + of the form. + + + + + + + + + Inserting text labels + + To make it easier for the form's user to identify the meaning of every field + widget, these should have added text labels with appropriate titles. To + create text labels the + Label widget is used. + + + Insert three text label widgets onto the form, placing them on the left + side of the text fields (or on the right hand if your operating system + uses right-to-left layout). On inserting a new label, a text cursor + appears at the location where you can enter the desired title. Enter consecutively: + Name, Surname and Street. Additionally, + on the top of the form insert another label displaying name of the form, + i.e. Persons. Enlarge this label's size and and increase the font size using + + FormatFont... + + menu command. + + + + + + Actions + + An Action is a single activity isolated in the application, + available for the user to execute. It can also be executed automatically as a + reaction for a given event (⪚ after opening a form). + + + + Assigning actions to form buttons + + Many actions can be assigned to form button. The assigned action is executed + after button is clicked. + + To assign action: + + + Switch to form's Design view if you have not done yet. + + + + Select the existing button widget by clicking on it or put a new button + widget onto the form. If you inserted a new button, enter its title and + press Enter key. + + + + + Click the button widget with the right mouse + button to display the context menu. + + + + + From the context menu select + + Assign action... command. + + + + + An Assigning Action to Command Button dialog window + will appear presenting a list of available actions. One of the actions + is selected if the widget already has action assigned. Otherwise the + Action type drop down list has the No type + item selected. + + + + + From the Action type drop down list select + Application item. Available application-wide actions + will be listed. + + + + Select one of the actions on the list (⪚ Delete Row). + + + + Click the OK button or press + the Enter key to + accept your selection. + + + + + + After switching to the form's data view you can try + whether the action works. For example, if you assigned Delete Row + action, clicking the button, the current database row will be deleted, similarly + to executing CtrlDeleteEditDelete Row + menu command (depending on your settings you may be asked to confirm the removal). + + + + + + + To remove an action assignment, select No type item from + the Action type drop down list of the + Assigning Action to Command Button dialog window. + + + + + Actions only work in the form's data view. Not every + action's assignment is reasonable. For example, the + Font... action is available in data view, but + only if you have a widget selected in the Design view. If you + make changes to the font settings the changes are applied to the text + of that selected widget. + + + + + + + + + Widget layouts + + In most cases form widgets should be conveniently arranged and aligned. + Positioning, aligning and resizing widgets by hand is not easy and these + parameters are not adjusted when the user resizes the form. In fact the + situation is even worse because you cannot assume a given form requires + a given space because users have different font sizes and display resolutions. + + + + Using special tool called widget layouts can help to automatically lay + out the form widgets. Widget layout is an action of grouping two or more + widgets so these are well positioned and have appropriate sizes. + + + Using layout in a form improves alignment. Moreover, its space is + better used. Text fields are closer to each other, spacing is constant. + + + There are two methods to create widget layout. + + + + Select two or more widgets that should be placed in a common layout, + and select one of the layout types from the context menu item + + Layout Widgets + . + + + + + Click a container widget (or a form surface itself), where widgets are + inserted and select one of the layout types from the context menu item + Layout Widgets + . + All widgets existing within the container or within the + form, being on the same level will be put into a single common layout. + + + + + In each of these cases you can also use + FormatLayout Widgets + menu. + + + + Widget layout is presented in the design view using a blue, green or + red box drawn with a broken line. This line is displayed only in the + form's design view. + + + Besides the grid type, there are other widget layout types. + + + vertical + + Vertical widget layout + + + + + horizontal + + Horizontal widget layout + + + + + + + + Springs in widget layouts + + A spring in widget layouts is a special, invisible element allowing + to adjust widget's position and size within layouts. Such a spring + stretches or squeezes a widget on the right, top, bottom or left hand, + so it can have desired size and position. + + To use a spring: + + + + Select spring icon on the + Widgets toolbar. + + + + Click on a selected point of the form to insert the spring. + + + + + To make springs work you need to create a global widget layout, i.e. a + layout for the form itself. Then, springs can use edges of the form as + a boundary for expanding. + + + + + + Removing widget layouts + + To remove widget layout without removing widgets, perform one of + these actions: + + + + + Click with the right mouse button on + the layout's border and select Break Layout + command from the context menu. + + + + + Click with the left mouse button on + the layout's border and select + FormatBreak Layout + menu command. + + + + + + Removing widget layout using the Break Layout + command will not remove widgets contained in the layout. If you want to + remove the widgets as well, just select the layout by clicking on its + border and press Delete key or use + Edit + Delete + menu command or context menu command. + + + + + + Size policies for widgets within a layout + + Instead of setting a fixed size for your widgets, in &kexi; you can + choose between various widget's size policies. A size policy + is a flexible strategy for controlling how a widget is stretched (or shrunk) + depending on other neighbouring widgets and space available within the form. + + + After putting widgets into a layout, typically each widget + gets a proportional (Preferred) size policy. These widgets + will be automatically resized with preferred settings, depending on their + type and size of the entire layout itself. For example, three buttons put + into the horizontal layout will be resized to fit their visible text. + + For each widget inserted into the form, there are settings for size policy + available in the Property Editor. The settings are presented + as a group of properties called Size Policy. + + + This group of properties contains: + + + Horizontal Size Policy + + defining horizontal size of the widget, + + + + Vertical Size Policy + + defining vertical size of the widget, + + + + Horizontal Stretch + + + defining strength of activity of the + Horizontal Size Policy, + + + + + Vertical Stretch + + + defining strength of activity of the + Vertical Size Policy + + + + + + + Values of size policies + + The following values are available in the drop down list for + Horizontal Size Policy and + Vertical Size Policy properties visible + in the Property Editor: + + + + Fixed + + + this value means that the widget cannot be automatically resized; it + should maintain the constant size defined at design time (width or height), + + + + + Minimum + + + this value means that the original size of the widget is set as minimal + allowed, it is sufficient and there is no need for expanding the widget, + but the widget will be expanded if needed. This type of policy can be used + to force the widget to be expanded to the whole width or height, especially + if you set a stretch value greater than 0. + + + + + + Maximum + + + this value means that the original size of the widget is set as maximum + allowed and can be decreased without breaking the widget's usability + and readability if other widgets need more space, + + + + + Preferred + + + this value means that the original size of the widget is the best and + preferred; the widget can be shrunk or expanded however and it + will stay readable, + + + + + + Expanding + + + this value means that the original size of the widget is reasonable but + the widget can be also shrunk; it can be expanded as well to take + as much space as possible, + + + + + Minimum Expanding + + + this value means that the original size of the widget is allowed; it + can be expanded to take as much space as possible, + + + + + Ignored + + + this value means that the original size of the widget is ignored; the + widget can be expanded to take as much space as possible but other + widgets usually will not allow for that + + + + + + Different widget types have various default size policies; for example, + button widgets have default size policy set to Minimum (in both directions), + while text field widgets have vertical size policy set to Fixed. + + + The most frequently used size policies are Preferred, + Minimum and Maximum. + + + + + Vertical and horizontal stretch + + The Vertical Stretch and Horizontal Stretch + properties accept integer values greater than or equal to 0. These properties allow to fine-tune the + behavior of size policies. The default value for the properties is 0. + A higher value of the stretch means that the widget will be expanded + more than widgets for which a lower stretch value is set. + + + + + + + + Setting widgets size and position by hand + In case when your form has no main layout set for auto-positioning and + auto-resizing its widgets, you will probably want to modify the position and size of widgets so the form can look cleaner and be easier to use. The &kexi; form + designer simplifies this task by offering the following groups of commands: + + + + + Adjusting sizes of selected widgets. The commands are available in the + FormatAdjust Widgets Size + submenu of the menubar and in the + Adjust Widgets Size + submenu of the context menu. The toolbar's drop down + button Adjust Widgets Size + is also available. + + + + To Fit + + + The size of the selected widgets will be altered so each widget will be + resized to its preferred size and its contents; for example, a text + label's size will be changed to fit its text. The position of the widgets + will not be changed. + + + + + To Grid + + + The size of the selected widgets will be altered so each widget's corner + will be placed on the form's (or other container's) grid point. + The widget's position can be slightly altered. + + + + + To Shortest + + + The height of the selected widgets will be altered so that each of them + will have the same height as the shortest one. The position of the widgets + will not be changed. + + + + + To Tallest + + + The height of the selected widgets will be altered so that each of them + will have the same height as the tallest one. The position of the widgets + will not be changed. + + + + + To Narrowest + + + The width of the selected widgets will be altered so that each of them + will have the same height as the narrowest one. The position of the + widgets will not be changed. + + + + + To Widest + + + The width of the selected widgets will be altered so that each of them + will have the same height as the widest one. The position of the widgets + will not be changed. + + + + + + + + Aligning positions of the selected widgets. The commands are available + in the + FormatAlign Widgets Position + submenu of the menubar and in the + Align Widgets Position + submenu of the context menu. The toolbar's drop + down button + Align Widgets Position is also available. + + + + To Left + + + All the selected widgets' left positions will be moved to the + position of the leftmost widget's left edge. + + + + + To Right + + + All the selected widgets' right positions will be moved to the + position of the rightmost widget's right edge. + + + + + To Top + + + All the selected widgets' top positions will be moved to the + position of the uppermost widget's upper edge. + + + + + To Bottom + + + All the selected widgets' bottom positions will be moved to the + position of the bottommost widget's bottom edge. + + + + + To Grid + + + All the selected widgets' top-left corners will be moved so that + they are positioned in the nearest grid point. + + + + + None of the above commands resizes the widgets. + + + + There are also additional commands available: + Bring Widget to Front + (i.e. above all other widgets) and + Send Widget to Back (i.e. below all + other widgets). These two commands are rarely used, as it is not + common to place one widget on top of an other (except when a + container widget contains other widget inside). Also note that clicking + a widget with a mouse button is enough to bring the widget to front. + + + + + Setting the tab order + + A widget's focus determines that widget's activity available using keyboard. + Focus is related to widgets displayed in the form's data view. Exactly one + form widget can have focus at the same time. The most frequent use of focus + is text entry (when a given text field is active, i.e. it is focused). + An other example is a button widget - when focused, it is possible to + press it using the Enter + or Space key instead of a mouse button. + + + There are a few methods of making the widgets active (moving the focus + to the widget): clicking with a mouse button, rotating the mouse wheel + over the widget, or using the Tab + key. The latter method is often used because of its speed and convenience + for users. Availability of the focusing methods is controlled by + Focus Policy property of a given widget. + + + There is a relationship between focusing (activating) widgets using Tab + key and tab order setting of a form. After pressing the Tab key, the + next widget should be focused, so the form should know about the tab order. + + To alter tab order for a form's widget: + + + Switch to design view of the form. + + + + Execute EditEdit Tab Order... + menu command. The Edit Tab Order dialog will appear with settings for this form. + + + + The window contains a list with two columns: the first column displays + widget names, the second - types of the widgets. To make it easier to + recognize meaning of the names and types for the user, icons related + to the types are also displayed. The list contains only widgets having + focus policy allowing to use the Tab key. The window + allows you to change the tab order or set the automatic tab order. + + + + To change tab order, either: + + + + Click a selected widget name in the widgets list and drag it + to a desired position (up or down) using the mouse. + + + + + Click a selected widget name on the widgets list and use + Move Up or Move Down + buttons, to move the widgets to a desired position. + + + + + Click the Handle tab order automatically check box to set the + automatic tab order for the form. If this option has been switched + on, any changes made to the list of widgets by hand are not taken + into account - &kexi; will be handling the tab orders on its own. + The automatic ordering means that the top-left widget will be focused + first (or the top-right if your operating system uses right-to-left + layout), and the order comes from the left to right (from the right + to left, respectively) and from the top to bottom. + + + + + + + + Click the OK button to accept the changes or Cancel button to dismiss + the changes. + + + + + diff --git a/doc/kexi/enteringdataintotables.docbook b/doc/kexi/enteringdataintotables.docbook new file mode 100644 index 00000000..d65c17d3 --- /dev/null +++ b/doc/kexi/enteringdataintotables.docbook @@ -0,0 +1,130 @@ + + + + Entering Data Into Tables + + You have designed the two tables Persons and + phone_numbers. None of them contain any data yet. You can + enter some, and in this chapter you will learn how to do this fast and effectively. + + + + + Start with the persons table. Open it in Data View using the Project Navigtor's context menu. + The current cell is marked with + (usually black) thicker border, a cell cursor. The contents + of the cell, if present, are highlighted with a different color. The current + row, i.e. the one you have placed your rectangular cursor in, is marked + on the left hand with an arrow symbol. + + + + You can navigate through table cells using the arrow keys, Page Down, + Page Down, Home, End keys; you can also + click with the mouse in a cell to select it. + + + Initially, after opening the table Persons, the cursor is placed in + the id column. The column has autonumber property defined, + marked with blue (autonumber) text in the last row. It + means you do not have to enter values there by hand when entering data for a new + row because the cell will be filled automatically with successive numbers. + + + + + + Inserting new rows and entering data for them in &kexi; is different from + the way of doing this in spreadsheets. To enter data for a new row, you need + to use the arrow keys or mouse, to move your cursor to the special empty last + row marked with a plus + sign. Place your cursor in the (second) name column and enter a + person's name. Also enter surname, street, house number and city. When + done, move the cell cursor to the last empty row either by using the + Arrow Down key or by clicking in the last + row with the mouse to append a new row. + + + Details About Actions Available While Entering Data Into Tables + + + + As soon as you enter the first character, the current row is being edited. A pencil symbol appears on the left side of the data table. + + + + + Double clicking a cell with the &LMB; or pressing Enter or the F2 key also starts + editing of the current row. + + + + + Pressing the Esc key when the contents of a cell is edited + cancels changes made to this cell. However, the pencil + + symbol will not disappear because you can still move to a different cell + of the edited row to change its contents. To + cancel changes made to the entire edited row, press the + Esc key again. + + + + + Instead of pressing the Esc key, you can click the + Cancel + toolbar button or select + DataCancel Row Changes + from the menubar. + + + + + Click the ShiftEnter + keys to accept changes made to all cells in the currently edited row. You can also click + OK toolbar + button or select DataSave Row + from the menubar. + + + + + + + + Fill the phone_numbers table with data. In the persons column you + need to provide a number of the person existing in the persons + table. + + + + + diff --git a/doc/kexi/enteringdatausingforms.docbook b/doc/kexi/enteringdatausingforms.docbook new file mode 100644 index 00000000..08fcb627 --- /dev/null +++ b/doc/kexi/enteringdatausingforms.docbook @@ -0,0 +1,33 @@ + + + + Entering Data Using Forms + + Data entering and editing is usually the task of the user of the database application. The designer of the database should check the form in terms of valid + data entry, and see whether the form works as expected. + + + To test your form, switch to its data view. A single database row (record) + of data will be displayed and a text cursor will be set inside the first + data field. You can move between fields using the &LMB; or the Tab and + ShiftTab + keys. While editing, there will be a + + pencil icon visible near the record navigator. After entering the row's (record) + data you can press the + ShiftEnter + keys or click the + OK + toolbar button to accept changes made to the current row. Clicking the + Cancel + toolbar button discards changes made to the current row and restores the contents of + the data fields. You can use the + record navigator's button to move to a new row. All the navigator's functions are + also available in a similar way as in the data table view + . + + + diff --git a/doc/kexi/index.docbook b/doc/kexi/index.docbook new file mode 100644 index 00000000..04692e4c --- /dev/null +++ b/doc/kexi/index.docbook @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + + + + + + + +]> + + + + + + The &kexi; Handbook + + + + + + Martin + A. + Ellis + + martin.ellis@kdemail.net + + + + Jaroslaw + Staniek + + js@iidea.pl + + + + + + 2004 + 2005 + 2006 + Jaroslaw Staniek + Martin Ellis + + + + +&FDLNotice; + + + +2006-09-07 +1.6 + + + + + &kexi; is the application for creating databases and for data management + in the &koffice; productivity suite. + + + + + + KDE + KOffice + Kexi + database + + + + + + +&intro; +&basics; +&building; +&configuration; +&menus; +&credits; +&database; +&comparing; + +&documentation.index; + + + diff --git a/doc/kexi/intro.docbook b/doc/kexi/intro.docbook new file mode 100644 index 00000000..dc62ba00 --- /dev/null +++ b/doc/kexi/intro.docbook @@ -0,0 +1,78 @@ + + + +Introduction + + + + + &kexi; is a database management application. It can be used for + creating databases, inserting data, performing queries, and processing + data. Forms can be created to provide a custom interface to your + data. All database objects - tables, queries and forms - are stored in + the database, making it easy to share data and design. + + + + &kexi; is part of the &koffice; productivity suite for the K Desktop + Environment. + + + + In addition to storing your &kexi; databases in files, &kexi; can also + store your data on a database server. Using + a database server allows you to share your database with other + people, and also allows more than one person to use the database at + one time. The following database servers are supported by &kexi;: + + + + MySQL (See http://www.mysql.com/) + + + + + PostgreSQL (See http://www.postgresql.org/) + + + + + + + More information about &kexi; can be found at the &kexi; page on the + &koffice; website + at http://www.koffice.org/kexi/, + and on the website for &kexi; itself + at http://www.kexi-project.org/about.html. + + + + If you have any questions about &kexi;, there are two mailing lists + you can use. The Kexi user mailing + list can be used to ask questions about using &kexi; or about + the &kexi; project. The Kexi + development mailing list can be used to ask questions about + the development of &kexi;. Further information on how to subscribe + to these lists, together with a few other ways of making contact with + &kexi; developers, can be found at: + + + + http://www.kexi-project.org/support.html + + + + + + diff --git a/doc/kexi/menus.docbook b/doc/kexi/menus.docbook new file mode 100644 index 00000000..8428fcaf --- /dev/null +++ b/doc/kexi/menus.docbook @@ -0,0 +1,701 @@ + + + + + + + Anne-Marie + Mahfouf + +
annemarie.mahfouf@free.fr
+
+
+ + + Jarosław + Staniek + + js@iidea.pl + + +
+
+ Command Reference + + + The <guimenu>File</guimenu> Menu + + + + + + &Ctrl;N + + File + New... + + Create a new project. Currently opened project is not affected. + + + + + + &Ctrl;O + + File + Open... + + Open an existing project. Currently opened project is not affected. + + + + + + File + Download Example Databases... + + + + Open the KNewStuff dialog which + allows you to download example databases via the + Internet. This is currently not available for MS Windows. + + + + + + + + &Ctrl;S + + File + Save + + + + Saves object changes from the active window. + + + + + + + File + Import + Data Table... + + + + Imports table data from a file in Comma Separated Value (CSV) format. + + + + + + + File + Export + Table or Query as Data Table... + + + + Export data from the active table or query data to a file in Comma Separated Value (CSV) format. + + + + + + +&Ctrl;P + +File +Print... + +Print data from the active (opened) table or query. +Note for KDE: Make sure the proper print system is selected in the +Print system currently used: section. This option can +be seen after clicking on the Options>> button. + + + + +File +Print Preview... + +Show print preview for the active (opened) table or query. + + + + +File +Page Setup... + +Set Font... for the Page title:, +Change... Page Size & Margins and +Add table borders. + + + + + + + &Ctrl;W + + File + Close Project + + + + Close the currently opened project but leave &kexi; running. + + + + + + + + + &Ctrl;Q + + File + Quit + + + + Quit &kexi;. + + + + + + + +The <guimenu>Edit</guimenu> Menu + + + + + +&Ctrl;Z + +Edit +Undo + +Undoes an action. You can revert to the state that existed +before your last change. + + + + + +&Ctrl; &Shift; Z + +Edit +Redo + +Undoes an undo. Reverse the action of Undo. This will restore the change +you originally made. + + + + + +&Ctrl;X + +Edit +Cut + +Remove currently selected text and put it on the clipboard. +This command is unavailable if there is no text currently selected. If this action is used +in the Form Designer, currently selected widget or group of widgets are removed and put on the clipboard. + + + + + + +&Ctrl;C + +Edit +Copy + +Copy currently selected text onto the clipboard. +This command is unavailable if there is no text currently selected. If this action is used +in the Form Designer, currently selected widget or group of widgets are copied onto +the clipboard. + + + + + +&Ctrl;V + +Edit +Paste + +Copy of the clipboard contents at the insertion point. +This command is unavailable if the clipboard is empty. If this action is used +in the Form Designer and the clipboard contains copied widgets, they will be inserted +onto the form. + + + + +Edit +Copy Special +Table or Query As Data Table... + +Copy selected table or query data to clipboard. + + + + +Edit +Paste Special +As Data Table... + +Paste clipboard data to a new table within the current project. + + + + + + +&Ctrl;A + +Edit +Select All + +Select all characters in the edited text box or all widgets in the Form Designer. + + + + + +Edit +Delete + +Delete the currently selected object. + + + + + +&Ctrl;Delete + +Edit +Delete Row + +Delete currently selected row from a table. + + + + + + +The <guimenu>View</guimenu> Menu + + + + +F6 +View +Data View + +Switch to Data View. + + + + +F7 +View +Design View + +Switch to Design View. + + + + +F8 +View +Text View + +Switch to Text View. Currently, only available for database queries +and means switching to the SQL View of the Query Designer. + + + + + +&Alt;1 + +View +Project Navigator + +Go to Project Navigator pane. + + + + + +&Alt;2 + +View +Main Area + +Go to the main area. + + + + + +&Alt;3 + +View +Property Editor + +Go to the Property Editor pane. + + + + +View +Show/Hide Properties + +Display or hide the Property Editor pane. + + + + +View +Show/Hide Project Navigator + +Display or hide the Project Navigator pane. + + + + + + +The <guimenu>Insert</guimenu> Menu + + + + +Insert +Table... + +Inserts a new, empty table design without saving it. +The Table Designer window will appear. + + + + +Insert +Query... + +Inserts a new, empty query design without saving it. +The Query Designer window will appear. + + + + +Insert +Form... + +Inserts a new, empty form design without saving it. +The Form Designer window will appear. + + + + +Insert +Script... + +Inserts a new, empty script design without saving it. +The Script Editor window will appear. The command is available only if scripting +is enabled in &kexi;. + + + + + + +The <guimenu>Format</guimenu> Menu + + + + +Format +Font... + +Change font for selected object. +Can be used in the Form Designer to set widget's font. + + + + + + +Format +Snap to Grid + +If this is enabled, when moving widgets on the form surface +the top left corner of the widget will snap or move to the nearest grid point. +This does reduce your freedom to freely position widgets on the form surface, +however it also helps to line up widgets precisely. + + + + +Format +Layout Widgets + +Creates a new layout for widgets. Widgets can be layed out Horizontally, Vertically, In Grid, Horizontally in Splitter, Vertically in Splitter. + + + + +Format +Break Layout + +Breaks the currently selected layout. + + + + +Format +Align Widgets Position + +Align the currently selected widgets' position: +To Left, To Right, To Top, To Bottom, To Grid. + + + + +Format +Align Widgets Size + +Align the currently selected widgets' size: +To Fit, To Grid, To Shortest, To Tallest, To Narrowest, To Widest. + + + + +Format +Bring Widget to Front + +Bring the currently selected widgets to front. + + + + +Format +Send Widget to Back + +Send the currently selected widgets to back. + + + + + + +The <guimenu>Data</guimenu> Menu + + + + + + +&Shift;Return + +Data +Save Row + +Save currently selected table row's data. + + + + +Data +Cancel Row Changes + +Cancel changes made to currently selected table row. + + + + +Data +Sort +Ascending + +Sorts data in ascending order (from A to Z and from 0 to 9). +Data from selected column is used for sorting. + + + + +Data +Sort +Descending + +Sorts data in descending (from Z to A and from 9 to 0). +Data from selected column is used for sorting. + + + + + + +The <guimenu>Tools</guimenu> Menu + + + + +Tools +Import Database... + +Opens the Data Base Importing Wizard +to import an existing database into a &kexi; database. + + + + +Tools +Execute Script File... + +Displays the file dialog +to open an existing script file. + + + + +Tools +Scripts Manager... + +Displays &kexi;'s Scripts Manager +dialog to execute, load, unload, install, unistall or download scripts. + + + + +Tools +Scripts + +Executes an already loaded script. + + + + + + +The <guimenu>Window</guimenu> Menu + + + + + +&Ctrl;W + +Window +Close + +Close the active window. + + + + +Window +Close All + +Close all opened windows. + + + + +Window +MDI Mode +Childframe Mode + +Switch to Childframe user interface mode. + + + + +Window +MDI Mode +IDEAl Mode + +Switch to IDEAl user interface mode. + + + + + +&Alt;Right + +Window +Next Window + +Switch to the next window. + + + + + +&Alt;Left + +Window +Previous Window + +Switch to the previous window. + + + +The last items in this menu show the currently opened window names. + + + + The <guimenu>Settings</guimenu> Menu + + + + + + + Settings + Toolbars + + + + Show or hide one of the toolbars. + + + + + + + Settings + Configure Shortcuts... + + + + Configure the keyboard shortcuts used by &kexi;. + See the section on configuring shortcuts for more + details. + + + + + + + + + The <guimenu>Help</guimenu> Menu + +&help.menu.documentation; + + +
diff --git a/doc/kexi/querydesigning.docbook b/doc/kexi/querydesigning.docbook new file mode 100644 index 00000000..5114dbd0 --- /dev/null +++ b/doc/kexi/querydesigning.docbook @@ -0,0 +1,109 @@ + + + + Designing Database Queries + + A database's primary purpose is to store and help extract information + you are looking for. Unlike databases written on a paper sheets, &kexi; + database allows you to specify more search criteria. Results + are returend faster even for large data sets. All this is a power of + databases, however to be able to perform efffective queries + in your database, you need to learn how to tell the database what you are + looking for. + + + With database queries you can limit data coming from a table to a predefined + set of rows and columns as well as dynamically join + data coming from multiple tables. + + + To see how queries work in practice you will create a contacts + query joining data from two tables: persons and + phone_numbers (designed in + chapter 3.1i + + and filled with data in + chapter 3.2 + ). + + + + + Create a new empty query by selecting + InsertQuery from + the menubar. The design window will appear. The window is split into two areas: query + relationships at the top and query columns below. + + + + + + Select the table persons in the drop down list Table: + located at the top of the window and click the Add button. A graphical + representation of the table will appear in the relations area. Do the same for the + phone_numbers table to insert it too, as in the figure below. + + + + + + Add query relationship using mouse drag & drop technique: click the field + id in the table persons table, drag it + and drop into the person field of the phone_numbers + table. This will join both fields by creating a new relationship. + + + + + Double-click the name field in the persons + table, to add the field as a query column. In a similar way, + add surname, street, house_number, + city fields from the persons table and + phone from the phone_numbers table. + + + + + Query design is now ready for testing. Click the + Switch to data view button on the toolbar, to switch from + design to viewing the data provided as query results. + + + + + + Save the query design for later use by clicking the + Save button on the toolbar. You can also use + FileSave + from the menubar or press the CtrlS + keys. Because the query design has not been saved yet, you will be asked to + specify a name for it. Enter Contacts text in the + caption field and click the OK button. + + + + -- cgit v1.2.1