Talk:Documentation/OOoAuthors User Manual/Base Guide/Planning

From Apache OpenOffice Wiki
< Talk:Documentation
Revision as of 03:52, 1 July 2007 by Pitonyak (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

I wrote a document called AndrewBase.odt (available online). This is a basic outline used there:

Information Page 2 Copyright 2 Authors 2 Feedback 2 Acknowledgments 2 Publication date and software version 2

1. Introduction    1
1.1. Introductory comments    1
1.2. Document organization and introduction    1
2. Storing images (binary data) in Base    3
2.1. Create the initial Base document    3
2.1.1. Using the GUI    3
2.1.2. Using a macro    3
2.1.3. Using a macro to open the wizard    4
2.2. Create the table    4
2.2.1. Using the GUI    4
2.2.2. Using a macro    5
2.2.3. Using SQL statements to modify tables    7
2.2.4. Refresh the tables    7
2.2.5. Creating and deleting tables using SQL    8
2.2.6. Increase a field's length    9
2.3. Create a form    10
2.3.1. Using the GUI    10
2.3.2. Using a macro    12
2.4. Open a form using a macro    15
2.5. Accessing the binary data    18
2.5.1. Adding binary data    18
2.5.2. Extracting binary data    19
3. One-To-Many relationships    22
3.1. Create the tables    22
3.1.1. Create the DEALER table    22
3.1.2. Create the ITEM table    23
3.2. Define the data relationships    25
3.3. Add data to the DEALER and ITEM tables    26
4. Forms    29
4.1. The internal object model    29
4.1.1. A control's shape is in the draw page    29
4.1.2. A draw page contains forms    30
4.1.3. A control's data model is in a form    31
4.1.4. A control's view model is in the controller    32
4.1.5. Enabling and setting controls visible – an example    32
4.1.6. Finding a control from an event – an example    33
4.1.7. Control model summary    34
4.2. Database Forms act like a result set    34
4.2.1. Duplicate record macro    35
4.3. Show one item and the corresponding dealer    38
4.4. Use a combo box with the dealer id    40
4.5. Use a list box with the dealer name    41
4.6. Relations in a single table    42
4.6.1. Solution    43
4.6.2. Solution characteristics    44
4.7. Use a “help and fill” button    45
5. Many-to-many relationships    46
6. Database fields    47
6.1. Storing numbers    50
6.1.1. Integer numbers    50
6.1.2. Floating point numbers    51
6.1.3. NUMERIC and DECIMAL types    52
6.2. Bit and Boolean Types    52
6.3. Date and time    53
6.4. Text data    53
6.5. Binary data    54
6.6. Other data type    54
6.7. Database sequences and auto-value fields    54
7. A few easy database definitions    56
7.1. Schema    57
8. Database connections    58
8.1. Obtain a database context    58
8.1.1. Registered data sources    59
8.1.2. Unregistering a data source    59
8.1.3. Registering a data source    59
8.2. Connect to a database    60
8.3. Connect using an interaction handler    61
8.4. Connections    61
8.4.1. Extended SDB connections    63
8.4.2. Meta-data    63
8.4.3. Inspecting the meta-data    70
8.4.4. GetBestRowIdentifier    76
8.4.5. GetColumnPrivileges    77
8.4.6. GetColumns    78
8.4.7. GetExportedKeys    79
8.4.8. GetIndexInfo    81
8.4.9. GetPrimaryKeys    82
8.4.10. GetTablePrivileges    82
8.4.11. GetTables    83
8.4.12. GetTypeInfo()    83
8.4.13. GetUDTS    85
8.4.14. GetVersionColumns    85
8.5. Connections     86
8.6. Connections without a data source    87
8.6.1. Delimited text files    91
8.6.2. Fixed width text files    93
8.6.3. Help, I still can not import my CSV file    98
8.6.4. Address books    99
8.6.5. MySQL using JDBC    100
8.6.6. Paradox using ODBC    100
8.6.7. Conclusion    102
9. Connecting to MySQL using JDBC    103
10. Mailmerge    105
11. Copying an entire database    106
12. General utility macros    107
12.1. Choose a directory    108
12.2. Get a document's directory    109
12.3. Choose a file    109
12.4. Finding a (loaded) OOo document    111
12.5. Append to an array    112
12.6. Compare data in an array    113
12.7. Create a property    113
12.8. Create a Point and a Size    114
12.9. Append a data array to a Calc document    114
12.10. Dynamically call object methods    115
12.11. Display numeric constants as meaningful text    119
12.12. Select from a list in a list box    120
13. Database utility macros    122
13.1. Quoting table and field names    122
13.2. Convert between an UNO Date and a Basic Date    122
13.3. Convert a result set to an array of data    124
13.4. Create and populate a dialog from a result set    127
14. Tips and tricks    128
14.1. Limit the number of returned records    128
15. Connect to a Base document using JDBC    130

The content started as a book that I intended to write, but then it was dropped, so I created this instead. It is likely too concentrated on macros for the average person. That said, any content can be removed and used. Something of interest with AndrewBase.odt, is that all included macros are included in the document itself and my be run by clicking on buttons in the document.

Note that Drew Jensen probably has much of interest that he could add.

Areas of interest that should likely be covered, in my opinion, include:

What is a database "key"?

Database design deals with what is known as "normal" forms. This is perhaps very advanced, but I have been sent database documents created by users that had no idea how to deal with redundant data. For example, if I have a doll that can have a "body type". The usual method is to create a table that enumerates body types. Each body type has a primary key acting as a unique identifier. I do not repeat all information related to the body type for each doll. Instead, I use the primary key and reference the body type table.

Dealing with one-to-many and many-to-many relationships. Areas of interest include table design, form design, and reports.

There is an entirely new Report writing system in the works, it is very exciting. This should be covered, perhaps as its own chapter.

Using an internal database. Using an external database such as MySQL. Converting from MS Access.

I am tired, and these are without much thought.

Personal tools