Send feedback on this topic.
Teradata.Client.Provider
Restrictions of the Visual Studio Entity Data Model Wizard
.NET Data Provider for Teradata > Developer's Guide > ADO.NET Entity Provider for Teradata > Restrictions using the Entity Framework with Teradata > Restrictions of the Visual Studio Entity Data Model Wizard
.NET CORE   This feature is not supported by the .NET Core implementation of the Data Provider.

Overview

The Entity Provider for Teradata supports the ADO.NET Entity Framework and it can be used with the standard Visual Studio Entity Data Model Wizard. The wizard, however, is tuned for SQL Server and exposes some problems when used against other data sources. This topic provides information on overcoming the issues of the Entity Data Model Wizard.

You may encounter the following problems during the process of creating a model with the Entity Data Model Wizard:

View Objects Not Available in the Tree

By default, the Visual Studio Entity Data Model Wizard will not display View objects when connected to the Teradata Database 15.10 or earlier. The SchemaLoader utility must be executed and the Visual Studio Configuration file must be changed before a Visual Studio process is launched. The Mapping Views and ViewColumn to Tables section describes the step-by-step process.

Note that although this mapping process is no longer required for the Teradata Database 16.0 and above you will see much better performance if you continue to map the View Column information.

Database Objects Not Available in the Tree

The Visual Studio Entity Data Model Wizard retrieves database object (Tables, Views and Stored Procedures) information from the Advanced SQL Engine Data Dictionary views. The visibility of database objects is determined by privileges granted to the user and UseXViews Connection-String attribute. The following error may occur in the Entity Data Model Designer when UseXViews Connection-String attribute is set to true.

    [Teradata Database] [3710] Insufficient memory to parse this request, during QueryRewrite phase.

To overcome this error, you may:

  1. Set the ConnectionString attribute UseXViews to false.

  2. Increase the DBS Control Record field MaxParseTreeSegs.
    For information on setting DBS Control fields, refer to Performance Management in the Teradata manuals.

Database Objects Not Included in the Model

ADO.NET Entity Framework cannot work with types that cannot be used in tables. Therefore, database objects that can be included in the model are subject to the following restrictions:

Entity Framework requires every entity to have at least one key column. Usually the entity key is inferred based on the table's primary key. If a table has no primary key, the entity key includes all NOT NULL columns. If a table does not have a primary key or NOT NULL columns, it is excluded from the model.

Entity Framework also requires the Primary Keys to not contain binary columns. If a primary key fails in this condition, the entity is excluded from the model.

The Wizard Or EDM Designer Works Very Slowly

The Visual Studio Entity Data Model Wizard is not optimized for the Advanced SQL Engine. The Wizard's performance significantly decreases when there are many database objects. The EDM Designer can be extremely slow for models with more than 100 entities.

If you experience performance problems, you can try the following workarounds: