Libreoffice Base Guide 6.2 | 3 Relationships Between Tables
Total Page:16
File Type:pdf, Size:1020Kb
Base Guide LibreOffice Documentation Team 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 book is adapted from a translation of the German LibreOffice Base Handbuch. To this edition Pulkit Krishna Dan Lewis Jean Hollis Weber Alain Romedenne Jean-Pierre Ledure Randolph GAMO To previous editions Jochen Schiffers Robert Großkopf Jost Lange Martin Fox Hazel Russman Jean Hollis Weber Dan Lewis Peter Schofield Steve Schwettman Andrew Pitonyak 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 May 2020. Based on LibreOffice 6.2. Documentation for LibreOffice is available at http://documentation.libreoffice.org/en/ Table of 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 a Mac........................................................................................................12 What are all these things called?...............................................................................................12 Acknowledgments......................................................................................................................14 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 on 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....................................................................................................31 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..........................................................................................................................63 dBase databases..................................................................................................................65 Spreadsheets........................................................................................................................67 Thunderbird address book....................................................................................................68 Text tables.............................................................................................................................69 Firebird..................................................................................................................................73 Subsequent editing of connection properties.............................................................................75 Chapter 3 Tables................................................................................................................79 General information on tables....................................................................................................80 LibreOffice Base Guide 6.2 | 3 Relationships between tables....................................................................................................80 Relationships for tables in databases....................................................................................80 Tables and relationships for the example database...............................................................83 Creating tables...........................................................................................................................86 Creation using the graphical user interface...........................................................................87 Direct entry of SQL commands.............................................................................................96 Linking tables...........................................................................................................................103 Entering data into tables..........................................................................................................106 Entry using the Base GUI....................................................................................................106 Direct entry using SQL........................................................................................................112 Importing data from other sources.......................................................................................114 Problems with these data entry methods.............................................................................119 Chapter 4 Forms...............................................................................................................120 Forms make data entry easier.................................................................................................121 Creating forms.........................................................................................................................121 A simple form......................................................................................................................121