Available with Standard or Advanced license.
When you create a geodatabase, as you did in Exercise 1, there is no data in it. You must add data to new geodatabases either by creating new datasets, importing data, or copying data from one geodatabase and pasting it into another.
In this exercise, you will create a feature dataset and import data from a personal geodatabase to populate it. You will also copy data from a file geodatabase and paste it into your new geodatabase. After the data is loaded, you will update the database statistics.
You are currently a server administrator in the database server you are using for these exercises. Observe that data you create when you are logged in as a server administrator is owned by dbo.
The dbo user in SQL Server has the highest level of control over the SQL Server instance and its contents.
Being part of the dbo group also means that all the data you create is stored in the dbo schema in the database. As a result, all users who connect as a database server administrator own and can modify the data in the dbo schema. Keep this in mind when deciding to grant server-level administrative access to other logins.
Create a feature dataset
First, create an empty feature dataset to store data.
- In the Catalog tree, right-click the Osokopf geodatabase, point to New, and click Feature Dataset.
- Type parks in the Name text box.
- Click Next.
- The geographic coordinate system of your feature dataset must match that of the data you are going to import. For that reason, import the coordinate system from the source data. To do this, click the Add Coordinate System button drop-down and click Import.
- Browse to the community.mdb file in the ArcTutor DatabaseServers folder on your hard drive. The default location for the ArcTutor data is C:\ArcGIS\ArcTutor\DatabaseServers. If the ArcTutor data was installed or copied to a different location, browse there.
If you do not have a connection to the ArcTutor directory in your Catalog tree, click the Connect To Folder button in the Catalog window, browse to the DatabaseServers folder in the ArcTutor folder, and click OK.
- Click the park_areas feature class and click Add.
This adds the coordinate system to your feature dataset.
- Click Next.
- Make sure there is no coordinate system selected for the vertical coordinate system and click Next.
- Accept the default tolerance settings and click Finish.
There is now a feature dataset named parks in your Osokopf geodatabase.
Add data to the feature dataset
You will now add data to the parks feature dataset.
- Right-click the parks feature dataset in the Catalog tree, point to Import, and click Feature Class (multiple).
The Feature Class to Geodatabases (multiple) geoprocessing tool opens.
- For Input Features, click the open folder button and browse to the community.mdb personal geodatabase.
The community geodatabase was installed with the tutorial data; therefore, browse to the location where you installed the database server tutorial data.
- While holding down the Shift key, click the first feature class in the geodatabase and the last feature class in the geodatabase.
- Click Add.
- Click OK.
- A progress bar appears at the bottom of the ArcMap interface. When the tool finishes running, a pop-up message appears in the lower right corner of your screen. Click it to open the Results window and confirm the data was loaded successfully.
If you do not see the pop-up message, you can open the Results window from the Geoprocessing menu: Geoprocessing > Results.
- Close the Results window when you have confirmed that the script ran successfully.
The parks feature dataset should now contain the feature classes park_areas, trees, and water_bodies.
Copy data from another geodatabase
Instead of using the import tool, you could copy and paste data from one geodatabase to another.
- In the Catalog window, navigate to the DatabaseServers folder in the ArcTutor directory.
C:\ArcGIS\ArcTutor\DatabaseServers
- Expand the file geodatabase areas.gdb.
- Open the boundaries feature dataset and examine which feature classes are present.
- Right-click the boundaries feature dataset and click Copy.
- Right-click the Osokopf geodatabase and click Paste.
The Data Transfer dialog box opens.
- Be sure both the feature classes in the boundaries feature dataset are present in the Data Transfer dialog box and click OK.
Your Osokopf geodatabase now contains the boundaries and parks feature datasets.
Examine the properties of the new data
You can discover information about your data by opening the Properties dialog box. There are properties that can be viewed from the feature dataset level and properties for each feature class inside the feature dataset.
Examine some of the properties of the park_areas feature class.
- Expand the parks feature dataset.
- Right-click the park_areas feature class and click Properties.
The Feature Class Properties dialog box opens.
- If it is not already active, click the General tab.
- Type Parks in the Alias text box.
The alias is what appears in the ArcMap table of contents when you add the feature class to it. You set aliases to more user-friendly names. In this case, rather than have Osokopf.DBO.park_areas appear in the table of contents, users will see Parks.
The General tab for the park_areas feature class should look as follows:
- Click the Fields tab.
- Choose the park_name field.
In the Field Properties, you will see that the alias for the park_name field is set to Name. This is the field name users see when they open the attribute table in ArcMap. Your site might have a specific naming convention for table names in a database. To be descriptive, these names are often long. You would use field aliases so users see a shorter or more user-friendly name.
- Click the XY Coordinate System tab.
You'll see that the coordinate system is the same one you imported for the parks feature dataset when you created it.
- If you want to, click the other tabs to see what information is available. Click OK to close the Feature Class Properties dialog box when you are done.
Update database statistics
After changes are made in the geodatabase, database statistics should be updated to ensure the query optimizer has the most up-to-date statistics. You should update database statistics after new data is loaded or a large number of edits are made to existing datasets.
Statistics on individual datasets can be updated by the data owner. Since you are logged in as the data owner, you can update the statistics on the data you just added to the geodatabase.
Use the Analyze Datasets geoprocessing tool to update statistics for the new feature datasets.
- Click the Search button on the Standard toolbar.
- Click Tools in the Search window.
- Type analyze datasets in the search text box.
A list of possible matches appears as you type. Choose analyze datasets (data management) from the list.
- Click the Analyze Datasets (Data Management) link to open the tool.
The Analyze Datasets geoprocessing tool opens.
- Browse to your Osokopf geodatabase for the Input Database.
- Click Select All.
All datasets are chosen.
- Uncheck Analyze Delta Tables and Analyze Archive Tables.
Your new datasets have not been registered as versioned nor enabled for archiving, so there is no need to analyze delta or archive tables.
- Click OK to run the tool.
- When analysis is complete, close the Analyze Datasets dialog box.
You have added data to your geodatabase by creating a feature dataset and importing feature classes to it. You have also added data by copying a feature dataset from another geodatabase and looked at the properties of a feature class. You then updated the database statistics to reflect the existence of this new data.