Libreoffice Base Guide 6.4 | 3 Relationships Between Tables
Total Page:16
File Type:pdf, Size:1020Kb
Copyright This document is Copyright © 2020 by the LibreOffice Documentation Team. Contributors are listed below. You may distribute it and/or modify it under the terms of either the GNU General Public License (http://www.gnu.org/licenses/gpl.html), version 3 or later, or the Creative Commons Attribution License (http://creativecommons.org/licenses/by/4.0/), version 4.0 or later. All trademarks within this guide belong to their legitimate owners. Contributors This guide has been updated from Base Guide 6.2. To this edition Pulkit Krishna Dan Lewis Jenna Sargent Drew Jensen Jean-Pierre Ledure Jean Hollis Weber To previous editions Pulkit Krishna Jean Hollis Weber Dan Lewis Peter Scholfield Jochen Schiffers Robert Großkopf Jost Lange Martin Fox Hazel Russman Steve Schwettman Alain Romedenne Andrew Pitonyak Jean-Pierre Ledure Drew Jensen Randolph GAMO Feedback Please direct any comments or suggestions about this document to the Documentation Team’s mailing list: [email protected] Note Everything you send to a mailing list, including your email address and any other personal information that is written in the message, is publicly archived and cannot be deleted. Publication date and software version Published July 2020. Based on LibreOffice 6.4. Documentation for LibreOffice is available at http://documentation.libreoffice.org/en/ Contents Copyright.....................................................................................................................................2 Contributors............................................................................................................................2 Feedback................................................................................................................................2 Publication date and software version.....................................................................................2 Preface.................................................................................................................................9 Who is this book for?.................................................................................................................10 What's in this book?...................................................................................................................10 Sample databases.....................................................................................................................10 Where to get more help..............................................................................................................11 Help system..........................................................................................................................11 Free online support...............................................................................................................11 Paid support and training......................................................................................................12 What you see may be different..................................................................................................12 Illustrations............................................................................................................................12 Icons.....................................................................................................................................12 Using LibreOffice on macOS......................................................................................................12 What are all these things called?...............................................................................................13 Frequently asked questions.......................................................................................................14 Chapter 1 Introduction to Base........................................................................................15 Introduction................................................................................................................................16 Base – a container for database content....................................................................................16 Data input using forms..........................................................................................................17 Data input directly into a table – basics for data entry...........................................................19 Queries – getting information from data in tables..................................................................21 Reports – presentation of data..............................................................................................22 Safe handling of a Base file...................................................................................................23 A simple database – test example in detail................................................................................24 Creating tables......................................................................................................................24 Creating a data entry form....................................................................................................32 Creating a query...................................................................................................................41 Creating a report...................................................................................................................46 Extensions to the sample database...........................................................................................52 Chapter 2 Creating a Database.........................................................................................53 Introduction................................................................................................................................54 Creating a new database using the internal HSQL engine.........................................................54 Accessing external databases...................................................................................................56 MySQL/MariaDB databases..................................................................................................56 PostgreSQL..........................................................................................................................64 dBase databases..................................................................................................................67 Spreadsheets........................................................................................................................69 Thunderbird address book....................................................................................................70 Text tables.............................................................................................................................70 Firebird..................................................................................................................................75 Connecting a database to an external HSQLDB...................................................................78 Subsequent editing of connection properties.............................................................................84 Chapter 3 Tables................................................................................................................88 General information on tables....................................................................................................89 LibreOffice Base Guide 6.4 | 3 Relationships between tables....................................................................................................89 Relationships for tables in databases....................................................................................89 Tables and relationships for the example database...............................................................92 Creating tables...........................................................................................................................95 Creation using the graphical user interface...........................................................................96 Direct entry of SQL commands...........................................................................................105 Linking tables...........................................................................................................................112 Entering data into tables..........................................................................................................115 Entry using the Base GUI....................................................................................................115 Direct entry using SQL........................................................................................................121 Importing data from other sources......................................................................................123 Problems with these data entry methods............................................................................128 Chapter 4 Forms...............................................................................................................129 Forms make data entry easier.................................................................................................130 Creating forms.........................................................................................................................130 A simple form......................................................................................................................130