Creating and managing copies of your ORDS database

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 create additional copies of your ORDS database, either to preserve a snapshot of your database at a certain point, or for testing purposes.

Pre-requisites

This HOW-TO assumes that you have already registered to use ORDS, and have either uploaded or created a database on the system (or have been given access to a database by another ORDS user). For instructions on how to do this, see the earlier guides in this series:

  • Registering and creating a new project
  • Preparing your data for ORDS
  • Importing an existing database
  • Creating a database from scratch

General tips about the ORDS registration interface

Within the ORDS registration interface there are some general things that you should note:

Back button: Your browser’s back button will not allow you to navigate around the registration interface. This is in contrast to the data interface where your browser’s back button will work.

Help text: wherever you see a field or piece of text underlined with a dotted line like this:

you can hover your mouse over the term and some help text will pop up.

System time out: if the system is inactive for more than a few minutes, it will time out, and you will need to log in again. To do this, return to the main ORDS home page ( http://daas-7.ords.ox.ac.uk/ ).

Copies of your ORDS database

ORDS allows you to have up to three copies of each database on the system. These are:

  • The live database. This is the main copy of your database, and the one that is created by default when you upload or design a database using the ORDS system. This is where you would normally view, edit, and search your data.
  • A milestone database. This is a copy intended to preserve a snapshot of your database as it is at a certain point. You might use this for a number of purposes – as a record of the state of the database at a particular stage of the project, as an archive copy to refer back to for comparative purposes, or to keep a copy of a set of raw data in its unedited state. Alternatively, if you wish to make your database publicly available while work on it is still ongoing, you might choose to publish a stable milestone copy, and update this periodically with the changes made to the live version.
  • A test database. This is a version which you can use to experiment with changes to your database design, without affecting the main live database. This may be particularly useful if your database is publicly available on the Web, or if you are part of a project team: you can create a test version as a safe environment in which to try making changes, while other users can continue to view and search the live version without disruption.

Note that in this context whether a database is ‘live’ or not does not indicate whether it is publicly available on the Web. You may choose to publish any or all of your database copies – for details of how to do this, see the HOW-TO Publishing datasets online.

Please also note that each database copy counts towards your ORDS storage space allocation. For example, if you upload a 5 GB database and create both a milestone and a test copy, this will use up 15 GB of your storage space. You may need to take this into account when deciding what sort of ORDS account is right for your project.

Creating copies

Log in to ORDS using your username and password, and click the List Projects link towards the top of the right hand corner of the screen. This will take you to a screen listing all the ORDS projects of which you are a member. Click the name of the database you wish to create a copy of. This will take you to the database’s summary page.

At the bottom of the Detailed summary box, you will see three buttons: Delete database, Create test database, and Create milestone database.

02 Detailed summary.gif

Select the type of database copy you wish to create, and click the appropriate button. A pop-up confirmation window will appear: click the Create test database or Create milestone database button here. Another pop-up will report that the copy has been created; click OK. You will now see a second Detailed summary box alongside the first.

03 Detailed summary 2.gif

In this case, the first box contains information about the live or main version of the database, and the second contains information about the test version.

Notice that the database names in the two boxes are different. The name of the live version is the name of your project followed by an underscore and the name of the database. The name of the test database is composed of the same components, followed by _test.

Notice also that the Create test database button has disappeared. The system will only allow you to create one test copy of a database at a time. If you subsequently delete the test copy, the button will reappear.

To create a second copy, click the remaining Create button – in this case, Create milestone database. Once again, you will be asked to confirm that you wish to do this.

A third Detailed Summary box will now appear.

03 Detailed summary 3.gif

Notice once again the database name – this time, it’s composed of the name of the project and the name of the database, followed by _old.

Viewing your copies

If you wish to view or edit the data in your test or milestone copies, you can create a data interface to do this. The process is the same as that used to create a data interface for the main copy of your database (as described in the Creating a data interface section of the HOW-TO Importing an existing database).

In the Detailed Summary box for the database copy you wish to view, click Create data interface. A pop-up will appear asking you to confirm that you wish to do this: click the Create data interface button here to indicate that you do.

Creating the data interface may take a few minutes. Once the process has finished, a message will appear saying that the data interface is now available. The message will also give you a URL (which is usually the main ORDS URL plus the data interface name you entered earlier, followed by either _test or _old as appropriate), but you don’t need to worry about writing this down: ORDS will provide you with a link.

Click OK to close the pop-up. Instead of the Create data interface button, you will now see a link to the data interface that you have just created. Click this, and the data interface will open in a separate window.

In the menu bar at the top of the page, you’ll see your data interface’s name, followed by three options.

02 Data interface menu bar.gif

Hover your mouse pointer over Browse data: you’ll see a list of the tables in your database. Click one of these to view the data contained in it.

For advice on working with data in ORDS, see the HOW-TO Editing, filtering, and searching data.

Important note on working with live and test databases

As stated above, a test copy of your database offers a safe environment in which to experiment with changes without jeopardizing the current live version. Once you are happy with your changes, you can turn the test version into the new live version – instructions for doing this are given in section Making a test database into the new live version below. (If your changes don’t work out as planned, you can simply delete the test database and continue using the existing live version.)

However, you should note that if changes are made to the live version between the point when the test copy is created and the point when the test copy becomes the new live version, these changes will not be replicated in the test copy, and so will not appear in this version of the database if it is made live.

To avoid loss of work and duplication of effort, therefore, you should plan to freeze all editing of the live version while changes are being made to the test version (this may also involve asking other members of your project team who have access to the database to refrain from editing it during this period). You can, however, still view and search the data in the live version, and if the live version has been made publicly available on the Web, visitors to the online version will be able to continue doing the same.

Managing your database copies

Once you have multiple copies of a database, there are a number of actions you may wish to perform, including deleting one or more of the copies, or replacing the current live version with a test or milestone copy.

Deleting a database copy

You can delete any of the three copies of your database simply by clicking the Delete database button in the appropriate Detailed summary box.

03 Detailed summary 3.gif

It is always worth double-checking that the copy is the one you want to delete. To do this, look at the Database Name: if this has no suffix, it is the live copy, while _test indicates a test copy, and _old a milestone copy.

When you click a delete button, a confirmation pop-up will appear. Click Confirm delete database if you wish to delete this copy. If you clicked the delete button accidentally, or if you change your mind before confirming, click Cancel.

Please note that once you have deleted a database copy from ORDS, there is no way to undo this. Before deleting, therefore, you may wish to export a copy of the data: see the HOW-TO Exporting data from ORDS for details of how to do this. The exported data can then be saved on your hard drive or other local storage. This is particularly advisable if you are working as part of a project team: if you subsequently discover that another member of the team had made changes to the deleted version without your knowledge, these can be retrieved from the exported copy.

Removing a database completely from the ORDS system

In addition to the delete buttons in the Detailed summary boxes, you will also see an additional Delete database link towards the top of the screen, on the right-hand side. This allows you to delete the ORDS database container, including the database metadata – that is, the information that was entered in the Create >Database form: the database name, creation date, description, and so forth. You should therefore only use this option if you are certain that you have no further use for the database container or the metadata: as with deleting individual database copies, there is no way to undo this action.

ORDS will not let you delete the database container unless you have first deleted any live, test, or milestone copies of the database (see section Deleting a database copy above for details of how to do this).

Making a test database into the new live version

If you have created a test copy of your database and used it to try out changes, and are now happy with the results, you may wish to replace the existing live version with the test version.

As the ORDS system will only allow you to have one live copy of a database at a time, to do this, you must first delete the existing live database.

Before doing this, it is good practice to export a copy and save this on your hard drive or other local storage; this means that if anything goes wrong, or if you subsequently discover that the current live database contains material that is still needed, you have a back-up copy. See the HOW-TO Exporting data from the DaaS for information about how to do this.

To delete the live database, click the Delete database button in the appropriate Detailed summary box (you can identify this by looking at the Database Name: the test and milestone copies will have the suffixes _test and _old respectively, while the live copy has no suffix). Then click Confirm delete database in the pop-up window that appears.

You will notice that the buttons available in the other Detailed summary box(es) have now changed: in the test database box, you will see a button labelled Copy as new live database.

05 Restore database.gif

Click this, and then click Copy as live database in the confirmation pop-up that appears. Another pop-up will report that the database has been copied; click OK.

You will now see a new Detailed summary box, for the new live database version. As before, you can identify this by the fact that the database name has no suffix. Notice also that the status of this database version is now Copied – indicating that this live database is a copy of another version on the ORDS system, rather than one that was uploaded or created from scratch.

05 Restored database.gif

The new live version is a replica of the test version at the point when it was copied (note that any subsequent changes made to either the test or new live versions will not be mirrored in the other copy).

If the test version is no longer needed, this can now be deleted. Click Delete database in the appropriate Detailed summary box (look for the _test suffix in the Database Name), then Confirm delete database in the pop-up window that appears.

Making a milestone database back into the live version

There may be occasions when you decide that you wish to revert to a milestone copy of a database – that is, that you want to make a milestone copy that you created at an earlier point back into the current live version.

As the ORDS system will only allow you to have one live copy of a database at a time, to do this, you must first delete the existing live database.

Before doing this, it is good practice to export a copy and save this on your hard drive or other local storage; this means that if anything goes wrong, or if you subsequently discover that the current live database contains material that is still needed, you have a back-up copy. See the HOW-TO Exporting data from the DaaS for information about how to do this.

To delete the live database, click the Delete database button in the appropriate Detailed summary box (you can identify this by looking at the Database Name: the test and milestone copies will have the suffixes _test and _old respectively, while the live copy has no suffix ). Then click Confirm delete database in the pop-up window that appears.

You will notice that the buttons available in the other Detailed summary box(es) have now changed: in the milestone database box, you will see a button labelled Copy as new live database.

05 Restore database.gif

Click this, and then click Copy as live database in the confirmation pop-up that appears. Another pop-up will report that the database has been copied; click OK.

You will now see a new Detailed summary box, for the new live database version. As before, you can identify this by the fact that the database name has no suffix. Notice also that the status of this database version is now Copied – indicating that this live database is a copy of another version on the ORDS system, rather than one that was uploaded or created from scratch.

05 Restored database.gif

The new live version is a replica of the milestone version at the point when it was copied (note that any subsequent changes made to either the milestone or new live versions will not be mirrored in the other copy).

You may wish to retain the milestone copy for reference, or in case you subsequently wish to revert to this version again (after changes have been made to the current live version, for example). If so, you need do nothing further.

Alternatively, if the milestone version is no longer needed, this can now be deleted. Click Delete database in the appropriate Detailed summary box (look for the _old suffix in the Database Name), then Confirm delete database in the pop-up window that appears.

A case study

The following is a case study which illustrates how you might use the live, test, and milestone database copies in the course of your research project.

Jill is a Research Assistant on the British Economic History Project. She has responsibility for managing the project’s database of statistics relating to household income in the 18th and 19th centuries.

Jill uploads the current version of database to ORDS. The version she initially uploads is (by default) the live copy.

Jill looks at the database and realizes that it would benefit from some tidying up – the field names are not named in a consistent format, and the capitalization is erratic. However, she wants to preserve a copy of the database as it is at present, so rather than editing the live version, she creates a test copy. Once she is happy with her changes, she invites Prof. Jones, the project’s principal investigator, to look at the new version. Prof. Jones is happy with what Jill has done, so Jill now makes a milestone copy of the original database for reference, and turns her test copy into the new live version.

Jill and Bob, a doctoral student, begin adding new data – this time relating to the early 20th century – to the live version of the database. Prof. Jones is impressed with their progress, and after a few weeks says that she would like to make the data publicly available through their project website. However, Jill and Bob are still adding new material on a daily basis, and Jill isn’t sure that it’s a good idea to publish the live version (Bob is still relatively inexperienced, and she likes to check his work – plus it may be confusing for the website users if search results change from hour to hour). Jill and Prof. Jones agree that a new version of the database will be published every month.

To do this, Jill creates a new milestone version at the end of each month, and makes this publicly available. Because there can only be one milestone copy on the ORDS system at a time, she is always careful to export a copy of the previous milestone version before deleting it, so that there is a record of the project’s work over time (including a copy of the database as it was when it was first uploaded).

One day, Bob suggests some changes to the database structure that he thinks will help make the data easier to navigate. Jill is uncertain whether what he’s suggesting will work, but agrees to let him have a go, and so creates a test copy of the database for him to experiment with. She does this just before going away for a long weekend: she knows that if Bob’s changes are successful, they will want to make the test copy into the new live version, so it is better if the live version is not updated in the meantime, as any changes made to it now would then have to be replicated in the test version.

Jill comes back from her weekend away to find Bob feeling rather frustrated – his changes haven’t quite worked out the way he intended, and the test version of the database is in a bit of a mess. Fortunately, they can simply delete the test version and go back to the live version.

A week later, Bob tells Jill that he thinks he’s worked out what he did wrong. Jill agrees to let him have another go, and creates a new test copy of the database. This time, Bob’s changes work well, and both Jill and Prof. Jones agree that they are an improvement. Having exported a copy of the current live database for reference, Jill turns Bob’s restructured test version into the new live database.

What next?

You may want to have a look at the next HOW-TO in the series:

Editing, filtering, and searching data using ORDS

You may also be interested in the whole list of HOW-TOs:
  1. Registering and creating a new project
  2. Preparing your data for ORDS
  3. Importing an existing database
  4. Creating a new database from scratch
  5. Creating and managing copies of your ORDS database
  6. Editing, filtering, and searching data using the ORDS
  7. Editing the structure of a database
  8. Sharing data with colleagues
  9. Creating customized data views
  10. Publishing datasets online
  11. Exporting data from the ORDS
  12. Using non-standard character sets
You can also find out more about the ORDS service by visiting the ORDS home page http://xxxxx.xxx.oucs.ox.ac.uk . If you have specific queries, you can contact the ORDS help desk by emailing xxxxxxxxxxxx@xxxxx.oucs.ox.ac.uk .