Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi

On Thu, 2011-08-18 at 07:28 -0700, ncreamer wrote: 

I'm working through the Base_Tutorial to create a small, single-user
database.  The guide teaches me to create my tables using SQL.  The commands
have me "drop table" as I make changes and warns that all data will be lost
- fair enough.  Once I reach a stage where I'm comfortable with the
structure/queries/etc. I'll begin to enter data.  

In SQL there is an INSERT [INTO] and INTO commands that can be used in
data to tables. JOIN can be used to select data from two or more tables.
CREATE TABLE will create a new table with the columns and data types
assigned. ALTER TABLE with ADD/DROP will allow you to add or deleter a
column. 

But what happens if I need to make a change after that? Like add a field or
even new tables?  How can I back up all the table data and restore it after
making changes. I see that I can copy the table data to calc but when I
follow steps back to copy the data back to base, a new table is created as
far as I can tell.  Is there a way for me to backup and restore data for
this purpose?

Backing up tables can be done by copying them into another table,
normally what is done when working in a database is to create working
tables from the main tables. The working tables can be deleted when you
are done with them. The only time you would actually work with the main
tables is when you are entering/deleting data.

The basic command you would use to copy data into another table is

SELECT (specify the columns or use * for all columns)
INTO Temporary_Table
FROM Original_Table
WHERE selection criteria (optional - if omitted the entire table is
copied)

I think you are asking about backing up the database, Base creates a
file with all the database objects in it and this file can be backed up
or exported to another location. 


--
View this message in context: 
http://nabble.documentfoundation.org/Base-embedded-DB-backup-and-restore-tp3265050p3265050.html
Sent from the Users mailing list archive at Nabble.com.




-- 
Jay Lozier
jslozier@gmail.com

-- 
For unsubscribe instructions e-mail to: users+help@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.