ArcGIS Server Banner

Copying the schema of a geodatabase

Copying the schema of a geodatabase

Release 9.3 E-mail This TopicPrintable VersionGive Us feedback

About copying the schema of a geodatabase

A schema defines the physical structure of the geodatabase along with the rules, relationships, and properties of each dataset in the geodatabase. Defining and implementing a practical schema for a geodatabase is an important task that often requires prototyping and testing of a proposed design. Testing will help you to develop a robust, working system implementation.

Once you have a workable geodatabase schema, you'll find many reasons for creating a copy of the entire schema or parts of it. For example:

Therefore, it's a good idea to become familiar with tools that can be used to copy and share geodatabase schemas.

There are a number of alternative mechanisms, which are described here, that can be used to copy a geodatabase schema.

How to

Share a geodatabase schema using geodatabase XML workspaces

One of the primary mechanisms that users employ to share their geodatabase schema is to export their schema to a geodatabase XML workspace document. The XML workspace document is an XML specification for the geodatabase that can be used to hold all geodatabase contents. One type of geodatabase XML document is a schema-only representation of the geodatabase.

Refer to this link for a white paper on Geodatabase XML.

Steps

    The steps to copy a geodatabase schema using an XML workspace document are as follows:

  1. In the ArcCatalog tree, right-click the geodatabase, feature dataset, feature class, or table you want to export and point to Export. Click XML Workspace Document.
  2. Using Export to create an XML copy of your geodatabase schema

  3. To export the schema without any records from the feature classes and tables, click Schema Only. Specify the path and name of the new XML file you will create.
  4. Use the schema only option to copy the geodatabase design.

    If the data you're exporting has metadata and you want to export it, check the Export Metadata check box.

  5. Click Next to preview the contents of the schema information to be copied.
  6. This panel lists all the data items for which schema information will be copied.

    Uncheck the Include check boxes for the feature classes, tables, or relationship classes whose schemas you don't want to export.

    If you leave a box checked for a feature class in a network, topology, or terrain, the schema for all the feature classes participating in the network, topology, or terrain will be copied.

  7. By clicking Summary, you can review a summary of the extraction contents and other optional settings. When you are ready, click Finish to export the schema.

Importing a schema from a geodatabase XML workspace document

The resulting XML workspace document that contains the geodatabase schema can then be shared with other ArcGIS users who can import it into their own geodatabases using ArcCatalog as follows:

  1. If one does not already exist, create a new geodatabase into which you will import the schema.
  2. Right-click the geodatabase, point to Import, and click XML Workspace Document to run the import tool.
  3. Use the browser to locate the XML workspace document to import. If you are sure it is schema only, you can check Schema Only before executing the import operation.

Copy a geodatabase schema using the Extract Data Wizard in ArcMap

This ArcMap wizard enables you to extract schema information and data from one geodatabase and transfer it to another geodatabase. This wizard also allows you to select only a subset of the datasets and properties that you want to extract.

This option allows you to specify a spatial reference for your new geodatabase.

Steps

  1. Start ArcMap.
  2. Use the Add Data button to add a map layer using a dataset from the geodatabase whose schema you want to export.
  3. Open the Distributed Geodatabase toolbar: click View, point to Toolbars, then click Distributed Geodatabase to display the toolbar.
  4. The Distributed Geodatabase Toolbar in ArcMap

  5. Click the Extract Data button on the Distributed Geodatabase toolbar to start the Extract Data wizard.
  6. In response to the question "What do you want to extract?", click Schema Only.
  7. Navigate to the geodatabase into which you want to copy the schema or type its path. If the geodatabase doesn't already exist, it will be created for you.
  8. Check the Show advanced options for overriding data extraction defaults when I click Next choice at the bottom of the Extract Data Wizard dialog box.
  9. Click Next to preview the contents of the schema information to be copied.
  10. This panel lists all the data items whose schema information will be copied.

  11. Uncheck the Include check boxes for the feature classes, tables, or relationship classes whose schemas you don't want to export.
  12. If you leave a box checked for a feature class in a network, topology, or a terrain, the schema for all of the feature classes participating in the network, topology, or terrain will be copied. Click Next.

  13. On this next panel, you have the option to specify a new spatial reference for the output schema.
  14. If you want to set a different spatial reference for the output schema, check the option to specify a new spatial reference for the output schema. The spatial reference you choose will be used for all the datasets you extract. Click Next.

    If you want the output schema to keep the same spatial reference as the source data, simply click Next.

  15. In this final panel, you can review a summary of the extraction contents and other optional settings. When you are ready, click Finish to export the schema.

Copy the geodatabase schema of an ArcGIS Data Model template

Over the past several years, ESRI and its user community have worked together to develop a set of "best practices" geodatabase designs for various application domains. For example, templates have been built for many disciplines such as addresses, parcels, hydro, imagery, census and administrative units, homeland security, petroleum, local government, and dozens of additional application areas of GIS.

These geodatabase designs are intended to help users rapidly become productive with the geodatabase and to share what works in a practical setting among users and GIS developer communities. While these designs are focused on geodatabase implementations, they are founded on many standards efforts and are portable across GIS systems.

A special page on the ESRI support Web site, http://support.esri.com/datamodels, provides access to all these designs. Most of the mature designs include geodatabase design templates. These templates are empty geodatabases that you can download to your own system and use in your GIS efforts.

Here are the steps on how to use a geodatabase design template.

  1. Connect to the data model Web site at http://support.esri.com/datamodels.
  2. Find the data model you are interested in (for example, Address), and click the Design Template link for that data model.
  3. Clicking on the Design Template link takes you to a download page for the data model.

  4. You will be linked to a Web page that contains a number of downloads for each data model. These include Unified Modeling Language (UML) diagrams usable in Visio; Design documents in PDF formats; and for many of these designs, a geodatabase template held as either a file geodatabase or a personal geodatabase. A geodatabase template is an empty geodatabase to which you can add data with which you can work.
  5. Here is an example set of downloads at the data model Web page:

    The Address Data Model Template Downloads

    Find the geodatabase template you want to use and download its ZIP file to your computer.

  6. Once the ZIP file has been downloaded onto your computer, extract the geodatabase template onto your hard drive from the ZIP file.

You can work with this empty geodatabase. For example, in ArcCatalog, you can select individual datasets, set their spatial reference, add features to the empty feature classes, add user-specific attribute columns, and so on, to customize the design for your own use.

It is highly recommended to test your design changes on a copy of your data using a personal or file geodatabase. Working with your proposed design will help you gain insight into what will work in your organization and what will best meet your needs.

Use CASE tools and UML to create a geodatabase schema

One strategy that is used for creating a geodatabase is to employ UML to design the schema and the CASE tools subsystem of ArcGIS to generate feature datasets, feature classes, tables, and other items. UML is a standard developed by the Object Management Group (OMG) for expressing object-oriented analysis and design decisions. Many refer to this as a tool for modeling "software artifacts" (see http://www.omg.org/technology/documents/formal/uml.htm).

Generally, UML is much more handy at object-oriented software design and in documenting the design of a database management system (DBMS) table schema. UML is not as useful at helping to design geographic elements in your geodatabase. See A note about UML design for more information.

Steps

  1. With Microsoft Visio or Rational Software Corporation's Rational Rose, design a geodatabase in UML and export it to an XML Metadata Interchange (XMI) file or Microsoft Repository.
  2. Add the Schema wizard to ArcCatalog.
  3. Generate a geodatabase schema from the XMI file or Microsoft Repository with the Schema wizard.
  4. Once you have generated the schema, you can modify it with tools in ArcCatalog if needed.
  5. Once the schema is ready, you can load data into it.