Visibooks the visibooks guide to base 2 0 apr 2006 ISBN 1597060380 pdf

162 82 0
Visibooks the visibooks guide to base 2 0 apr 2006 ISBN 1597060380 pdf

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

The Visibooks Guide to Base 2.0 by Jill & Kevin Jordan www.visibooks.com The Visibooks Guide to Base 2.0 Copyright Copyright © 2006 by Visibooks™, LLC All rights reserved 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 1597060380 Table of Contents Database Basics Create a new database Create tables 12 Create records 21 Create forms 29 Create queries 42 Create reports 49 Working with Tables 65 Modify tables 66 Create new tables .76 Specify data types 79 Specify field properties .85 Edit records 88 Find records 91 Sort and filter records 96 Create table relationships 101 TABLE OF CONTENTS i Working with Forms 113 Modify forms 114 Add/delete records 119 Edit records 121 Find records 123 Filter records 126 Working with Queries 131 Create queries 132 Sort results 141 Add criteria 143 Employ Boolean operators 146 ii TABLE OF CONTENTS 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 Create a new database Start OpenOffice.org Base Your screen should look like this: DATABASE BASICS In the Database Wizard window, click Create a new database Then click the button DATABASE BASICS 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 Double-click the Practice Base Files folder It should appear as the Save In folder DATABASE BASICS 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 Add criteria In the query’s Customer table, scroll down to the State field Add the State field to the query design grid In the State field, click in the Criterion row WORKING WITH QUERIES 143 Type: VA 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 144 WORKING WITH QUERIES 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 145 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 146 WORKING WITH QUERIES Employ the OR operator In the State field, click in the Or row under the criterion VA Type: MD then press the ENTER key The design grid should look like this: WORKING WITH QUERIES 147 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 Click the icon The query results should look like this: 148 WORKING WITH QUERIES Employ the AND operator Remove the query criteria from the State field Tip: Highlight them, then press the DELETE key The design grid should be blank: 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 149 In the Company Name field, click in the Criterion row 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 Click the icon The query results should look like this: The query shows all companies whose names begin with A 150 On the Menu Bar, click File, then Save WORKING WITH QUERIES When the Save As window appears, type: Companies that begin with A in the Query Name box Click the On the Menu Bar, click File, then Close button You should return to the FlowerStore database window 10 Exit the database and close Base WORKING WITH QUERIES 151 Practice: Working with Queries Start Base Open the Library database Create a new query in Design view based on the Authors table Add all the fields to the design grid Sort Authors Names in Ascending order Add the criteria Yes to the Good Author field Run the query Its results should look like this: 152 Close the query, saving it as Good Authors WORKING WITH QUERIES Exit Base WORKING WITH QUERIES 153 154 WORKING WITH QUERIES 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 155 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 156 GLOSSARY Where to Get Visibooks If you liked using this book, and would like to use more like it, visit: www.visibooks.com Visibooks offers more than 30 titles on subjects such as: • Computer Basics • Microsoft Office • Desktop Linux • OpenOffice.org • Web Site Layout • Web Graphics • Web Programming Visibooks: the simplest way to learn and teach computer subjects www.visibooks.com .. .The Visibooks Guide to Base 2. 0 by Jill & Kevin Jordan www .visibooks. com The Visibooks Guide to Base 2. 0 Copyright Copyright © 20 06 by Visibooks , LLC All rights reserved... Baltimore then press TAB 22 DATABASE BASICS Type: 21 2 12 then press TAB 10 Type: 4 105 55 121 2 then press TAB The table should now look like this: Tip: Notice how the cursor in the row selector has... button Base will insert an ID field the Key field—in the table: DATABASE BASICS 19 11 On the Menu Bar, click File, then Close The key field When the alert window popped up, and you clicked the Base

Ngày đăng: 20/03/2019, 13:25

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan