Adding, Editing, and Removing Database Objects Print this Topic Previous Page Up One Level Next page

Home >  Data Sources and Targets > Databases and MapForce > Introduction to Database Mappings >

Adding, Editing, and Removing Database Objects

Some databases can have a large number of objects (such as schemas, tables, views, and so on). This topic shows you how to get on the mapping only those database objects that are required for mapping purposes. Below, we will be using a sample Access database; the instructions are similar for other database types.


1.On the Insert menu, click Database.
2.Click Connection Wizard, and then click Microsoft Access (ADO).
3.Click Next, and browse for the altova.mdb available in the <Documents>\Altova\MapForce2019\MapForceExamples\ folder.


A dialog box appears, enabling you to select the database objects that you want to be included into the mapping.


To include a database object (for example, a table) it in the mapping, click the check box next to it. For the purpose of this example, click the check box next to User Tables.


The Object Locator button ( ic_object-locator ) allows you to find specific database items. Select a particular object (or type its name) in the combo box which appears in the lower area of dialog box.


The Filter button ( ic_filter ) allows you to filter objects by name. Once you click the Filter button, a filter icon is available next to objects which supports filtering (in this example, "Tables").


Click the filter icon to choose whether the object name should begin with, end with, be equal with, or contain the search text.


Now you can enter the search text next to the filter (in this example, "A"):


The Show checked objects only button ( ic-show-check ) displays those items where a check box is active.


The Add/Edit SELECT Statement button enables you to add or edit custom SELECT statements for the current database. The data returned by such statements then becomes available as mapping source. For more information, see SQL SELECT Statements as Virtual Tables.


The Add/Edit Relations button enables you to define local primary and foreign key relationships between fields in the database, in addition to those that may already be present. For more information, see Defining Local Relationships.


The Add/Edit Recordset Structures button applies for databases that support stored procedures. It is only enabled if a stored procedure is currently selected from the database tree. For more information, see Stored Procedures.


The Show Preview button enables you to quickly preview the data of the currently selected table or view. Note that you can also browse and query a database independently of the mapping process, by using the Database Browser. For more information, see Browsing and Querying Databases.


When you are ready to add the database objects to the mapping, click OK. Only the selected tables, views, etc. will appear on the database component, and you can draw mapping connections to or from them in the standard MapForce way.


To change at any time the database objects, right-click the component, and select Add/Remove/Edit Database Objects.


© 2019 Altova GmbH