Export and Import of Queries

OOo Base

Document - ID	Specification Owner	Last Change	Status
	Phill Gillespie	13/06/04	Draft
Conforms to	
Applies to	insight01
Task ID(s)	<Required - Tasklist comma separated.>
Category	Feature

Abstract

Feature to provide the easy importing and exporting of “queries” (SQL statements) created within OOo Base. One or more queies can be saved to an individual file (*.sxq) and transferred to other users who can open or import the queries under their connection to the database.

i-Team Members (The specification owner is part of the i-Team)

	Name	E-mail Address
User Experience	<Name + Initials>	
Development		
Quality Assurance		
Documentation	Phill Gillespie	phill@openoffice.org

Approved for Implementation

	Approved by	Date
User Experience	<Name>	<Date>
Development		
Quality Assurance		
Documentation		
String Review		

Document Change History

Rev. Level	Change	Initials	Date
1.0	Initial Draft	PG	13/06/04

Contents

Glossary	1

1	Motivation	1

2	User Scenarios	1

3	Goals	1

4	Requirements and Dependencies	1

4.1	Requirements	1

4.2	Technical Dependencies	1

5	Competitive Analyses	1

6	Detailed Specification	1

6.1	G11n	2

6.2	Error Conditions	2

6.3	Migration	2

7	Future Tasks	2

8	Notes	2

9	References	3

Glossary

Term	Description
Query	SQL statement created within OOo Base localised to a specific database

Motivation

With OOo Base becoming more prominent when OOo2 is released it is about time that database users be able to share their information with each other rather than manually entering the information for each person. Being able to send entire database files (with queries) is a very useful facility but if the user already has the database connection created it is essential that they can still receive individual queries without having to re-install the database connection or erase their existing queries.

User Scenarios

A user has a database connection and several queries set up. A second user needs access to this database ad so the whole database (connection, queries and links to forms) are exported by the new .sxb file. The second user now has exactly the same set up as the first user. When the first users creates one or more new queries there is currently no way to export those queries to the second user. Re-exporting the entire connection would be excessive and erase any additional queries the second user has created.

Goals

Providing two extra features within the Query section of OOo Base will provide all the necessary improvements. Firstly an “Export Query” action will allow the user to export one or more previously highlighted queries to a .sxq file and send it to any other user. The complimentary

Requirements and Dependencies

Requirements

Assuming OOo Base is complete to original specification, the only addition requirement is a file format for exporting the Queries into, .sxq.

Technical Dependencies

<Are there any technical dependencies for this feature? Does the implementation of this feature create any technical dependencies to other program parts? Or very important any issues for automatedd GUI Testing?>

Competitive Analyses

<Describe or reference to solutions which are already on the market. Describe what is done well or what is done bad.>

Detailed Specification

The Base application can be seen below in illustration 1. There are two new options visible when the Queries section is highlighted. It is important to note that the second option, “Export Query from file...” is greyed out by default as it only becomes active when a query is selected (see illustration 2).

The first option is the “Import Query from file...” facility. This function provides us with the ability to open previously saved query files and import them into the currently active database.

There are two further possibilities to the import functionality. Firstly if the name of the database currently open (the one where the query will be imported into) does not matches the name of the database the query was exported from, an error dialog will come up. A warning will state that the database may be different to the original it was exported from and the user will need to say whether they want to continue (Yes or No). Secondly if more than one query is exported to the file a dialog will come up asking the user which of the queries they wish to import. By default all queries will be selected (tick boxes to the right of their title).

Illustration 1Mockup of the import/export functions within the query section

The second option, “Export Query to file...” only becomes active when a query is selected (see illustration 2). When a query is selected the “Export” button will provide a pop up Save File Selector that wants the filename to save the query as (followed by the .sxq extension). If multiple queries are selected (by use of shift-click or control-click) then all queries will be exported in the same file.

Illustration 2Mockup of active export option

Finally we have the structure of the .sxq file. The XML file needs to contain the following data:

NAME OF DATABASE EXPORTED FROM

NUMBER OF QUERIES IN FILE

NAME OF QUERY ONE

DATA OF QUERY ONE (ACTUAL QUERY)

NAME OF QUERY TWO...

DATA OF QUERY TWO... (ACTUAL QUERY)

String list

Item	English	German	Comments
Button Button Error Warning Selection Dialog	Import Query from file Export Query from file The Query you are attempting to import came from a database with a different name and so may not function properly. Do you wish to continue? YES NO Please select the Queries you wish to import:	? ? ? ?	

Key Board Shortcuts

No keyboard shortcuts needed.

G11n

There are no globalization issues.

Error Conditions

There are two error conditions which require further user interaction, both through the Import function.

Firstly if a user tries to import a query to a database of a different name (than it was exported from) a warning error will come up. For example, if a query has been created and exported from a database known as “Timesheet” and then it is selected to be imported into a database called “Timesheets” there could be a problem. A warning dialog would then pop up and alert the user that the two databases may not be identical as they have different names. The user would be given a choice whether they wanted to continue with the import, with yes or no options. It is important to state that if the databases are not the same they may not function properly. Default option is “No”.

Secondly, if more than one query is exported to the file, a dialog will come up asking the user which of the queries they wish to import. Default all queries will be selected (tick boxes to the right of their title).

Migration

<Any migration issues have to be stated here. For example how can users migrate from one version of a database to another?>

Future Tasks

<If there are features which couldn't be implemented but have to be implemented in the future. State these in here with a description why the feature couldn't be implemented right now.>

Notes

<Questions will arise during the writing of the specification. State these in here.>

References

This document is a feature extension to dbaccess, Task ID i16560 regarding the creation of the OOo Base standalone application.

<Required - Specification Title>

Page 3

<Required - Path to specification>

Phill Gillespie

2004-05-20T11:30:51