1. About this guide
This document is one of a series of How-To guides for the Online Research Database Service (ORDS). It will tell you how to export whole databases from the ORDS.
- Exporting an ORDS database
- Other ways of exporting data from the ORDS
This How-To assumes that you have already registered to use the ORDS, and have either created or been given access to at least one project containing at least one database.
If this is not the case, please see the earlier guides in this series. These can be accessed via the main ORDS documentation page.
The ORDS allows whole databases to be exported. This allows the data to be stored or used outside the ORDS: it might be used, for example:
- To create a series of snapshots to record how a database has evolved over time
- To share data with a colleague who is not an ORDS user
- To create data files for import into another system
- At the end of a project, to create a copy for archiving
Exporting a database is done from the database page.
To reach this, log in to the ORDS via https://app.ords.ox.ac.uk, You will see a list of your ORDS projects: click the name of the project which contains the relevant database. On the project page, click the database name to go to the database page.
Towards the bottom of the database page, you will see three panes – one for each of the three possible versions. Only the main version of an ORDS database can be exported. (If for any reason it proves imperative to export a test or milestone version of a database, please contact the ORDS help desk by emailing firstname.lastname@example.org, who will try to help.)
Click the button in the
Main database version information pane.
You will be taken to the export page. This features a drop-down list of export formats.
Three options are available:
- Multiple CSV files
- A single CSV file
- An SQL database dump
Which format is most appropriate will depend on the purpose for which the exported file is intended.
If the multiple CSV files option is selected, each table of the database will be exported as a separate CSV (comma-separated values) file. The names of the files will reflect the ORDS table names. The files will be enclosed in a compressed (zipped) folder, which will have the same name as the database.
CSV is a file format which allows tabular data to be saved as plain text. This makes it a very flexible format: a wide range of software packages for statistical analysis or data visualisation (including Excel, SPSS, and Stata) can read or import data from CSV files. This means that this option may be useful for creating a set of data files for use in another application.
However, the CSV files will contain only the field names in each table, plus the contents of each record. They will not record the relationships between the tables, or any specific information about individual fields (e.g. data type, maximum field size, or which field is the primary key). ORDS comments on tables or fields are also not exported.
If the single CSV file option is selected, the tables will appear one after another in a single file. The contents can be viewed using Microsoft Excel or a similar program.
This format provides a compact way of viewing the contents of the database which is easily readable by users. However, it is less useful for importing into other software packages for analysis or visualisation - because these packages will not generally be able to interpret the data as a series of discrete tables.
The file will contain only the table names, the field names in each table, and the contents of each record. As with the multiple CSV file option, it will not record the relationships between the tables, or any specific information about individual fields (e.g. data type, maximum field size, or which field is the primary key). ORDS comments on tables or fields are also not exported.
The SQL database dump option exports the contents of the database in a format that can be imported into other database systems which use SQL.
This is also the best format to use if you wish to re-import a database into the ORDS - for example, to create a copy of a database in a different project.
Unlike the CSV export options, an SQL database dump does contain a record of the relationships between tables, plus field information such as data type, maximum field size, and which field is the primary key. However, ORDS comments on tables or fields are not exported.
|Multiple CSV files||Single CSV file||SQL database dump|
|Table names included||Yes - as file names||Yes - inside file||Yes|
|Field names included||Yes||Yes||Yes|
|Contents of records included||Yes||Yes||Yes|
|Relationships between tables included||No||No||Yes|
|Field information (e.g. data type, maximum size, primary key) included||No||No||Yes|
|ORDS field and table comments included||No||No||No|
|Easy to import into other software||Yes - a wide range||No||
Yes - in other
systems that use SQL
Select the desired export option from the drop-down list, and click .
What happens next depends on which browser you are using. However, in general, you will be given the option of opening and/or saving the exported file(s).
In Internet Explorer, a bar will appear at the bottom of the window, asking whether you would like to open or save the exported database.
If you click
Save, the file will be saved in your default location for downloads. You can also click the down arrow at the right-hand side of the
Save button to see further options, including
Save as, which allows you to select your own location to save the file.
In Firefox, you will see a dialogue box inviting you to select a program with which to open the file or folder, or to save it.
If you choose the latter, the exported database will be saved in your
Downloads folder: if you wish to save it somewhere else, it may be easier to open it, and then use the
Save as function (for single file exports), or copy and paste the files elsewhere (for multiple CSV files).
In Chrome, you will see a dialogue box inviting you to select a location to save the exported database.
Once the database has been saved, you will be able to open it.
To return to the database page after exporting a database, click .
In addition to exporting whole databases, it is also possible to export query results and datasets (which are sets of previously saved query results) as CSV files. See section 5.1. of How to query data and section 3.4. of How to view, create, and share datasets for further details.
4. What next?
You may want to have a look at some of the other guides in this series. For a full list, visit the ORDS documentation home page.