openoffice base 2 in pictures
DESCRIPTION
OpenOffice Base 2 in PicturesTRANSCRIPT
Base 2.0 In Pictures
by Jill & Kevin Jordan
www.inpics.net
Base 2.0 In Pictures
Copyright
This book is provided under a Creative Commons license at: creativecommons.org/licenses/by-nc-nd/2.5/ You are free to download, copy, and share this electronic book with others. However, it is illegal to sell this book, or change it in any way. If you’d like to sell or change it, just contact us at [email protected].
Trademarks and Disclaimer Visibooks™ is a trademark of Visibooks, LLC. All brand and product names in this book are trademarks or registered trademarks of their respective companies. Visibooks™ makes every effort to ensure that the information in this book is accurate. However, Visibooks™ makes no warranty, expressed or implied, with respect to the accuracy, quality, reliability, or freedom from error of this document or the products described in it. Visibooks™ makes no representation or warranty with respect to this book’s contents, and specifically disclaims any implied warranties or fitness for any particular purpose. Visibooks™ disclaims all liability for any direct, indirect, consequential, incidental, exemplary, or special damages resulting from the use of the information in this document or from the use of any products described in it. Mention of any product does not constitute an endorsement of that product by Visibooks™. Data used in examples are intended to be fictional. Any resemblance to real companies, people, or organizations is entirely coincidental. ISBN 1597061190
TABLE OF CONTENTS i
Table of Contents Database Basics .............................................1
Create a new database ..........................................................................2
Create tables ........................................................................................12
Create records......................................................................................21
Create forms.........................................................................................29
Create queries ......................................................................................42
Create reports ......................................................................................49
Working with Tables .....................................61
Modify tables ........................................................................................62
Create new tables.................................................................................72
Specify data types................................................................................75
Specify field properties .......................................................................81
Edit records ..........................................................................................84
Find records .........................................................................................87
Sort and filter records..........................................................................92
Create table relationships ...................................................................97
TABLE OF CONTENTS ii
Working with Forms ....................................105
Modify forms ...................................................................................... 106
Add/delete records ............................................................................ 111
Edit records........................................................................................ 113
Find records....................................................................................... 115
Filter records...................................................................................... 118
Working with Queries..................................121
Create queries.................................................................................... 122
Sort results......................................................................................... 131
Add criteria......................................................................................... 133
Employ Boolean operators ............................................................... 136
DATABASE BASICS 1
Database Basics
In this section, you’ll learn how to:
• Create a new database
• Create tables
• Create records
• Create forms
• Create queries
• Create reports
DATABASE BASICS 2
Create a new database
1. Start OpenOffice.org Base. Your screen should look like this:
DATABASE BASICS 3
2. In the Database Wizard window, click Create a new database.
Then click the button.
DATABASE BASICS 4
3. When the Save as window appears, create a new folder in the My Documents folder called Practice Base Files.
Tip: To create a new folder, make sure the My Documents folder appears as the Save In folder.
Then click the icon.
4. Double-click the Practice Base Files folder. It should appear as the Save In folder.
DATABASE BASICS 5
5. In the File name box, type: Family.odb
Tip: Base will automatically add a file extension for you when you leave the Automatic file name extension box checked.
DATABASE BASICS 6
6. Click the button. The window for the Family database should open:
DATABASE BASICS 7
Identify database elements
Elements of databases A database stores information in an organized way, and makes it easy to get information in and out. Tables store data within the database. Forms make it easy to put data into tables. Queries pull out specific data. Reports put data in an easily-read format.
Table
Query
Report
Form
Table
DATABASE BASICS 8
1. In the Database list, click Tables.
DATABASE BASICS 9
2. Click Queries.
DATABASE BASICS 10
3. Click Forms.
DATABASE BASICS 11
4. Click Reports.
5. Click Tables.
DATABASE BASICS 12
Create tables
1. Click Create Table in Design View.
DATABASE BASICS 13
A blank table should open with the columns Field Name, Field Type, and Description:
DATABASE BASICS 14
Name fields in Design View
1. Click in the box under the Field Name column header:
2. Type: First Name
DATABASE BASICS 15
3. Press the ENTER key on your keyboard. The Design View of the table should look like this:
The field type for First Name can stay Text [VARCHAR].
DATABASE BASICS 16
4. Click in the box under where you just typed First Name.
Type: Last Name It should look like this:
5. Press the ENTER key on your keyboard.
DATABASE BASICS 17
6. In the same way, create the following fields: City Zip Phone Number The table should now look like this:
DATABASE BASICS 18
7. On the Menu Bar, click File, then Save.
8. When the Save As window appears, type: My Family in the Table Name box.
9. Click the button.
DATABASE BASICS 19
10. When the alert window that reads No primary key appears, click
the button.
Base will insert an ID field—the Key field—in the table:
DATABASE BASICS 20
11. On the Menu Bar, click File, then Close.
The key field
When the alert window popped up, and you clicked the button, Base added the ID field to the table. The ID field is now the table’s primary key, or key field. That means it can’t contain any duplicates. Every table should have a key field. For example, if a hospital keeps a database, each patient can have a unique ID number in the key field. That way, if it has more than one patient named John Baker, it can easily distinguish John Baker, ID #326 in for a checkup, from John Baker, ID #298 who needs his gall bladder removed.
DATABASE BASICS 21
Create records
1. Double-click the table My Family in the Tables list.
2. Click in the box under the ID column header.
3. Type: 1
DATABASE BASICS 22
4. Click in the box under the First Name column header.
5. Type: Elvis
6. Press the TAB key on your keyboard. The table should now look like this:
7. Type: Presley then press the TAB key.
8. Type: Baltimore then press TAB.
DATABASE BASICS 23
9. Type: 21212 then press TAB.
10. Type: 4105551212 then press TAB. The table should now look like this:
Tip: Notice how the cursor in the row selector has moved down to the second (new) record. When you move on to a new record, Base automatically saves the previous record.
DATABASE BASICS 24
Add new fields
1. On the Menu Bar, click File, then Close.
2. Right-click the My Family table.
DATABASE BASICS 25
3. When the menu appears, click Edit.
The table should appear in Design View:
DATABASE BASICS 26
4. Click the box under Phone Number and type: State
5. Press the ENTER key.
6. On the Menu Bar, click File, then Save.
7. On the Menu Bar, click File, then Close.
DATABASE BASICS 27
8. Double-click the My Family table.
9. Click inside the new State field for the first record.
10. Type: MD
DATABASE BASICS 28
11. Press TAB until the cursor moves down to a new record.
Record number 1 is saved and complete.
12. On the Menu Bar, click File, then Close.
DATABASE BASICS 29
Create forms
1. In the Database list, click Forms.
DATABASE BASICS 30
2. Click Use Wizard to Create Form.
DATABASE BASICS 31
3. When the Form Wizard window appears, click the button.
All the table fields should be added to the form:
4. Click the button.
DATABASE BASICS 32
5. When the next screen appears, leave Add Subform unselected
and click the button.
DATABASE BASICS 33
6. When the next screen appears, make sure Columnar – Labels on Top is selected.
DATABASE BASICS 34
Then click the button three times.
DATABASE BASICS 35
7. When the Set the name of the form screen appears, type: My Family Data Input Form in the box.
DATABASE BASICS 36
8. Click the button. The form should open and look like this:
DATABASE BASICS 37
Add a new record
1. In the form window, click the button.
A blank record should appear:
DATABASE BASICS 38
2. Click in the ID box, then type: 2
3. Press TAB to advance to the First Name box.
DATABASE BASICS 39
4. Type: Bo then press the TAB key.
5. Type: Diddley then press the TAB key.
6. Type: Richmond then press the TAB key.
7. Type: 23220 then press the TAB key.
8. Type: 8005557890 then press the TAB key.
DATABASE BASICS 40
9. Type: VA The form should now look like this:
DATABASE BASICS 41
10. Press the TAB key again. The form should progress to a new, blank record:
The old record has been saved.
11. On the Menu Bar, click File, then Close to return to the database window.
DATABASE BASICS 42
Create queries
1. In the Database list, click Queries.
What’s a query? A query is a way to get specific information from the database. Essentially, it’s a question. You use queries to ask the database things like, “Who are my customers in Montana?”, or “How many pipe fittings have I sold this month?”
DATABASE BASICS 43
2. Click Use Wizard to Create Query.
DATABASE BASICS 44
3. When the Query Wizard opens, double-click My Family.First Name in the Available Fields list.
My Family.First Name should appear in the Fields in the Query column:
DATABASE BASICS 45
4. Click the button. This should add the Last Name field to the Fields in the Query list:
5. Double-click My Family.Phone Number.
DATABASE BASICS 46
This should add the Phone Number field to the Fields in the Query list:
6. Click the button four times.
DATABASE BASICS 47
7. When the Overview screen appears, in the Name of the query box type: Names and Numbers
8. Click the button. The query is automatically saved and executed. It should look like this:
DATABASE BASICS 48
9. On the Menu Bar, click File, then Close to return to the database window.
DATABASE BASICS 49
Create reports
1. In the Database list, click Reports.
DATABASE BASICS 50
2. Click Use Wizard to Create Report.
3. When the Report Wizard window appears, click the Tables or Queries drop-down arrow. When the list appears, click Table: My Family.
DATABASE BASICS 51
4. Click the button to move all the fields into the Fields in report list.
DATABASE BASICS 52
5. In the Fields in report list box, click ID, then click the button. The ID field should be removed. The report wizard should now look like this:
6. Click the button.
DATABASE BASICS 53
7. When the Labeling fields screen appears, click the button.
DATABASE BASICS 54
8. When the Grouping screen appears, click the button.
DATABASE BASICS 55
9. When the Sort options screen appears, click the Sort by drop-down arrow.
Then click State in the list.
10. Click the button.
DATABASE BASICS 56
Choose layout and style
1. When the Choose layout screen appears, make sure Default is selected in the Layout of data section.
Then click the button. Tip: The Layout of data section allows you to customize the look and feel of your reports. You can click through the different layouts and see them applied to your report in the background.
DATABASE BASICS 57
View the report
1. When the Create report screen appears, make sure the Title of report box reads: My Family
Make sure the Create report now radio button is selected.
DATABASE BASICS 58
2. Click the button. The report is automatically created, saved and opened. It should look like this:
3. On the Menu Bar, click File, then Close to return to the Family database window.
4. On the Menu Bar, click File, then Save to save the Family database.
DATABASE BASICS 59
5. On the Menu Bar, click File, then Exit to close Base.
6.
DATABASE BASICS 60
WORKING WITH TABLES 61
Working with Tables
In this section, you’ll learn how to:
• Modify tables
• Create new tables
• Specify data types
• Specify field properties
• Edit records
• Find records
• Sort and filter records
• Create table relationships
WORKING WITH TABLES 62
Modify tables
1. Open a web browser and go to: www.inpics.net/books/base2
2. Right-click the FlowerStore.odb link. When the menu appears, click Save Link Target As.
WORKING WITH TABLES 63
3. When the Save As window appears, open the Practice Base Files folder on your hard drive.
Then click the button.
4. Wait for the database to download completely, then close the web browser.
WORKING WITH TABLES 64
Open an existing database
1. Start Base.
2. When the Database Wizard opens, click the Open an existing database file radio button.
WORKING WITH TABLES 65
3. Click the button.
WORKING WITH TABLES 66
4. Open the Practice Base Files folder, then double-click FlowerStore.odb.
WORKING WITH TABLES 67
The FlowerStore database window should now look like this:
WORKING WITH TABLES 68
Adjust table layout
1. Double-click the Customers table to open it.
WORKING WITH TABLES 69
2. Place your cursor on the divider between the Phone Number and Fax Number column headings.
The cursor should turn into a double-headed arrow:
WORKING WITH TABLES 70
3. Double-click. The Phone Number column should resize to fit the widest piece of data in that field:
Tip: Instead of double-clicking, you can also drag column heading dividers to set column widths manually.
WORKING WITH TABLES 71
4. Double-click the divider between the City and State column headings. The City field should resize to fit the data in it.
5. Click the window’s button to close the Customers table.
WORKING WITH TABLES 72
Create new tables
1. Click Create Table in Design view.
A blank table will open in Design View:
WORKING WITH TABLES 73
2. In the first box in the Field Name column, type: Order ID then press the TAB key. It should look like this:
3. On the Toolbar, click the icon.
WORKING WITH TABLES 74
4. When the Save As window appears, type: Orders in the Table Name box.
5. Click the button.
6. When the alert window appears, click the button.
Tip: You’ll assign a Primary Key later.
WORKING WITH TABLES 75
Specify data types
Assign the AutoNumber data type
1. In the Data Type column beside the Order ID field, click the drop-down arrow. When the list appears, click Integer.
2. Under Field Properties, beside the AutoValue field, click the drop-down arrow. When the list appears, click Yes.
WORKING WITH TABLES 76
3. In the Description column, type: This is the Generic Order ID Number then press TAB.
Tip: Filling in a Description is optional, but it helps you to remember what sort of information is supposed to be stored in a field.
WORKING WITH TABLES 77
Assign the Date/Time data type
1. In the Field Name column, in the second row, type: Order Date then press TAB.
2. In the Data Type column, click the drop-down arrow.
3. When the menu appears, click Date/Time, then press TAB.
WORKING WITH TABLES 78
4. In the Description column, type: Date the order was placed then press TAB.
WORKING WITH TABLES 79
Assign a Primary Key
1. Right-click the Order ID field.
2. When the menu appears, click Primary Key.
The field should now show a key beside it:
WORKING WITH TABLES 80
3. On the Menu Bar, click File, then Save.
WORKING WITH TABLES 81
Specify field properties
1. Click in the Order Date field.
2. In the Field Properties section of the window, click the button next to the Format example box.
WORKING WITH TABLES 82
3. In the menu of formats that appears, click 12/31/99.
Then click the button. The Order Date’s Format example field should now look like this:
WORKING WITH TABLES 83
4. On the Toolbar, click the icon.
Tip: If a Warning window appears, click the button.
The table design window should now look like this:
5. On the Menu Bar, click File, then Close to return to the FlowerStore database window.
WORKING WITH TABLES 84
Edit records
1. Open the Customers table.
2. Click inside the Customer Name field for record number 1, between the w and s in Andrews Floral.
3. Insert an apostrophe.
4. Press TAB eight times to move to the Phone Number field.
WORKING WITH TABLES 85
5. Type: 2125554569 It should replace the previous text:
6. Click in any other record. Tip: Remember—changed data in a record is saved when you move off that record. The Customers table should now look like this:
WORKING WITH TABLES 86
Delete records
1. Right-click the button for HomeVase’s record.
2. In the menu that appears, click Delete Rows.
3. When the alert window appears, click the button.
Tip: Once a record has been deleted from the database, it cannot be recovered.
WORKING WITH TABLES 87
Find records
Navigate records
1. In the Customers table window, click the (Last Record) button.
The cursor should be in the last record in the database:
2. Click the (Previous Record) button. The cursor should be in the previous record.
WORKING WITH TABLES 88
3. Click the (First Record) button. The cursor should be in the first record.
4. Click the (Next Record) button. The cursor should be in the second record.
5. Click the (New Record) button. The Customers table should look like this:
WORKING WITH TABLES 89
Search for records
1. Click the Company Name column header.
The table should look like this:
2. On the Toolbar, click the (Find) icon.
WORKING WITH TABLES 90
3. When the Record Search window appears, type: Love in the Search for Text box.
4. In the Position list, click the drop-down arrow, then anywhere in the field.
WORKING WITH TABLES 91
5. Click the button. The Customers table should now look like this, with Love Me True highlighted:
6. In the Find and Replace window, click the button.
WORKING WITH TABLES 92
Sort and filter records
Sort in descending order
1. Click the Company Name column header.
The table should look like this:
2. On the Toolbar, click the (Sort Descending) icon.
WORKING WITH TABLES 93
The Customers table should now look like this, with the Company Names arranged in descending alphabetical order:
WORKING WITH TABLES 94
Sort in ascending order
1. Click the Customer ID column header to highlight the column.
2. On the Toolbar, click the (Sort Ascending) icon.
The Customers table should now look like this, with the customer ID numbers arranged in ascending order:
WORKING WITH TABLES 95
Filter records
1. Click in the State field for Pete’s Moss.
Notice that the State is Virginia.
2. On the Toolbar, click the (AutoFilter) icon.
The Customers table should now look like this, showing all customers whose State is Virginia:
WORKING WITH TABLES 96
3. On the Toolbar, click the (Remove Filter) icon. The Customers table should show its original contents:
4. On the Menu Bar, click File, then Close to return to the FlowerStore database window.
When to filter Filtering records works like a query, bringing up specific information from a table. But unlike a query, your filtering doesn’t remain part of the database. When you perform a query and save it, the query remains with the database, even after you close it. Filtering does not. Since you can’t save filtering like a query, filter records when you need quick results. Think of filtering as a temporary, quick, “on the spot” query.
WORKING WITH TABLES 97
Create table relationships
What are “relationships?” Relationships are links that associate a field in one table with a field in another. An example is a school database with two tables:
• Students • Classes
The Students table holds students’ names and addresses:
Students Student Name Address
John Elm St. Jane Oak St.
The Math Class table holds information about the students in math class:
Math Class Student Name Grade
John A Jane B
Both tables have a Student Name field. By linking the Student Name fields, you make sure that John in the Students table is the same John listed in the Math Class table:
Students Math Class Student Name Address Student Name Grade
John John Jane Jane
WORKING WITH TABLES 98
Examine current table relationships
1. On the Menu Bar, click Tools, then Relationships.
2. When the Add Tables window appears, double-click Customers.
WORKING WITH TABLES 99
The Customers table should appear in the Relationships work area:
3. In the Add Tables window, double-click Employees. The Employees table should appear in the Relationships work area:
WORKING WITH TABLES 100
4. Double-click Order Details.
5. Double-click Orders.
6. Double-click Products.
7. In the Add Tables window, click the button.
WORKING WITH TABLES 101
The relationships window should now look like this:
WORKING WITH TABLES 102
Add relationships
1. Place the cursor on the Title Bar at the top of the Employees table.
2. Click and drag the Employees table to place it under the Customers table.
WORKING WITH TABLES 103
3. Click and drag the Orders table to place it between the Customers table and Order Details table.
4. Click the Order ID field in the Order Details table, then drag it and rest it on top of the Order ID field in the Orders table.
The Orders table should look like this:
WORKING WITH TABLES 104
5. Release the mouse button. The relationships window should now look like this:
The Order ID field in the Orders table is linked to the Order ID field in the Order Details table. The same Order ID number in both tables refers to the same order.
6. On the Menu Bar, click File, then Close to return to the FlowerStore database window.
7. When the alert window appears, click the button.
8. On the Menu Bar, click File, then Exit.
WORKING WITH FORMS 105
Working with Forms
In this section, you’ll learn how to:
• Modify forms
• Add/delete records
• Edit records
• Find records
• Filter records
WORKING WITH FORMS 106
Modify forms
1. Start Base, then open the FlowerStore database.
2. In the Database list, click Forms.
WORKING WITH FORMS 107
3. Right-click Customer Form.
4. When the menu opens, click Edit.
WORKING WITH FORMS 108
Tip: Clicking Edit opens the form in Writer. The form should look like this in Writer:
WORKING WITH FORMS 109
Change field position
1. Click the Address 2 box to select it.
2. Position the cursor over the Address 2 box. It should turn into a four-arrow “move” cursor:
WORKING WITH FORMS 110
3. Click-and-drag the box to line it up with the other boxes.
Release the mouse button. The form should now look like this:
WORKING WITH FORMS 111
Add/delete records
Add a new record
1. Click the icon to toggle the view.
2. Click the (New Record) button.
Fill in the following information: Amy Moore Gifts & Buds 1214 Maryland Ave. Suite 13 Washington, DC 20001 2025556113 2025556114
3. Click the button to save the record and advance to a new one.
WORKING WITH FORMS 112
Delete records
1. Click the button to go back to record number 6, the one you just added.
2. On the Toolbar, click the (Delete Record) icon.
3. When the alert window appears, click the button.
WORKING WITH FORMS 113
Edit records
Navigate to a specific record number
1. Click in the Record box.
2. Highlight the current record number, then type: 2
3. Press the ENTER key. The form should now show record number 2:
WORKING WITH FORMS 114
Edit data in a record
1. Delete the contents of the Street Address field.
2. Type: 476 New York Ave.
3. Press the TAB key. The record should look like this:
WORKING WITH FORMS 115
Find records
1. Click the button.
2. Click in the Company Name box to place the cursor there.
3. On the Toolbar, click the icon.
WORKING WITH FORMS 116
4. When the Record Search window appears, type: Floral in the Search for Text box.
WORKING WITH FORMS 117
5. Click the button. The window should look like this:
6. Click the button.
WORKING WITH FORMS 118
Filter records
1. Click in the State box.
2. On the Toolbar, click the (Autofilter) icon.
WORKING WITH FORMS 119
The form should now look like this:
Tip: Notice the number of records now reads 1 of 2.
3. On the Toolbar, click the icon.
4. On the menu bar, click File, then Close.
When the Alert window appears, click the button.
WORKING WITH FORMS 120
The database window should now look like this:
5. On the Menu Bar, click File, then Exit to close Base.
WORKING WITH QUERIES 121
Working with Queries
In this section, you’ll learn how to:
• Create queries
• Sort results
• Add criteria
• Employ Boolean operators
WORKING WITH QUERIES 122
Create queries
1. Start Base, and open the FlowerStore database.
2. In the Database list, click Queries.
3. Click Create Query in Design View.
WORKING WITH QUERIES 123
The Query Design window should appear:
WORKING WITH QUERIES 124
4. In the Add Tables window, click Customers.
Then click the button.
5. Click the button.
WORKING WITH QUERIES 125
This adds the Customers table to the query. The query window should look like this:
WORKING WITH QUERIES 126
Add fields to query
1. Click the arrow in the first column’s Field box.
2. When the list appears, click Customers.Customer ID.
WORKING WITH QUERIES 127
The query design grid should look like this:
3. Drag the First Name field from the Customers table to the second column of the query design grid.
Release the mouse button.
WORKING WITH QUERIES 128
The First Name field should appear in the design grid:
4. Drag the Last Name field to the design grid. The design grid should look like this:
The query is now set up to show the Customer ID, First Name, and Last Name of each customer in the Customers table.
WORKING WITH QUERIES 129
Run the query
1. On the Toolbar, click the icon.
The query window should now look like this:
WORKING WITH QUERIES 130
The query shows the Customer ID, First Name, and Last Name of each customer in the Customers table:
WORKING WITH QUERIES 131
Sort results
1. In the Last Name field, click in the Sort row. When the drop-down arrow appears, click it, then click Ascending.
It should look like this:
WORKING WITH QUERIES 132
2. On the Toolbar, click the icon. The query should run, and sort the records alphabetically by Last Name:
3. In the Last Name field, click in the Sort row, then click (not sorted).
It should look like this:
WORKING WITH QUERIES 133
Add criteria
1. In the query’s Customer table, scroll down to the State field.
2. Add the State field to the query design grid.
3. In the State field, click in the Criterion row.
WORKING WITH QUERIES 134
4. Type: VA
5. Press the ENTER key. It should look like this:
Tip: Notice that Base automatically surrounded the VA criterion with quotes. That’s because the State field stores text data. In database query language, quotes signify a string of text. If the field stored number data, Base wouldn’t have added anything.
WORKING WITH QUERIES 135
6. On the Toolbar, click the icon. The query results should look like this:
It has returned all customers who live in the State of VA.
WORKING WITH QUERIES 136
Employ Boolean operators
What are Boolean operators? Boolean operators are expressions such as AND, OR, NEITHER, and NOR that allow you to add multiple criteria to a query. They take their name from George Boole, the mathematician who first used them. If you had a T-shirt store with an Base database, for instance, and you wanted to find out how many of your California customers had ordered blue T-shirts, you’d employ the AND operator in your query: customers from California AND who also bought blue T-shirts If you wanted to see how many customers were from California (these California customers could have bought T-shirts of any color), and how many customers bought blue T-shirts (these blue T-shirt customers could be from anywhere), you’d employ the OR operator: customers from California OR customers who bought blue T-shirts
WORKING WITH QUERIES 137
Employ the OR operator
1. In the State field, click in the Or row under the criterion VA.
2. Type: MD then press the ENTER key. The design grid should look like this:
WORKING WITH QUERIES 138
Tip: The two common Boolean operators are AND and OR. They’re easily confused. If you don’t know which to use, ask yourself the purpose of the query: Do I want to find customers with a state of both Virginia AND Maryland? No—a customer can’t be in two places at once. Do I want to find customers with a state of either Florida OR Maryland? That makes sense, so this query would use the OR operator.
3. Click the icon. The query results should look like this:
WORKING WITH QUERIES 139
Employ the AND operator
1. Remove the query criteria from the State field. Tip: Highlight them, then press the DELETE key. The design grid should be blank:
2. Add the Company Name field to the query: Drag it from the field list in the Customers table and drop it in the blank field to the right of the State field.
WORKING WITH QUERIES 140
3. In the Company Name field, click in the Criterion row.
4. Type: LIKE A* then press the ENTER key. Tip: An asterisk (*) stands for any character or combination of characters. For instance, Ap* would match Ape, Aptitude, Apparent, etc. The LIKE keyword is used to search for a pattern.
5. Click the icon. The query results should look like this:
The query shows all companies whose names begin with A.
6. On the Menu Bar, click File, then Save.
WORKING WITH QUERIES 141
7. When the Save As window appears, type: Companies that begin with A in the Query Name box.
8. Click the button.
9. On the Menu Bar, click File, then Close. You should return to the FlowerStore database window.
10. Exit the database and close Base.
WORKING WITH QUERIES 142
GLOSSARY 143
Glossary Boolean Operators Boolean logic is a system of logical thought developed by George Boole. Boolean operators allow you to construct complex queries which can be understood by computers. The most common Boolean operators are “AND” and “OR”. Data A series of facts. When data is organized, it becomes useful information, which can be processed and used to draw conclusions. Database A collection of information organized into tables of data. Field A single unit of data stored as part of a database record. Form A database object primarily used to enter or display data. Key Field A field in a table that can contain no duplicates. The key field is each record’s unique identifier. Query A set of questions presented to a database to retrieve specific information. Record One row in a given table. In a relational database, records correspond to rows in each table. Relationship An association established between common fields in two tables.
GLOSSARY 144
Report Presents information retrieved from a table or query in a preformatted, easy-to-read way. Select Query A query that asks a question about the data stored in tables, and provides a result in the form of a datasheet. Table A collection of rows and columns that organize data. Update Query A query that changes a set of records according to specified criteria.
Where To Get In Pictures Books
If you liked this book, and would like to buy more like it, visit:
www.inpics.net
In Pictures offers more than 20 titles on subjects such as:
• Computer Basics
• Microsoft Office
• Desktop Linux
• OpenOffice.org
• Web Site Layout
• Web Graphics
• Web Programming
In Pictures: computer books based on pictures, not text.
www.inpics.net