PC SOFT

WINDEV的在线文档

  • Overview
  • Generating the CDM
  • Special case: Updating an existing LDM
  • Notes
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系:info@cn.windev.com
产品
WinDevWebDev-服务器代码WebDev-浏览器代码WinDev Mobile报表和查询
平台
WindowsLinuxWindows MobileWindows PhoneWindows Store appsAndroidAndroid Widget iPhone/iPad
语言
JavaPHPAjax用户代码(MCU)外部语言
数据库
HFSQLHFSQL Client/Server存储过程HF 5.5OLE DBODBC本地访问

Overview
To associate a CDM (Conceptual Data Model) with a project, you must generate the associated LDM (Logical Data Model). Indeed, it is the LDM that is associated with the project (and not the CDM).

The generation of the CDM is used to automatically create the corresponding LDM once the validity of the CDM has been checked.

Generating the CDM
To generate the LDM from the CDM:
  1. Select "Analysis .. Generate the logical model (Analysis)".On the "概念数据模型" pane, in the "数据模型" group, click "生成逻辑模型".
  2. Define the parameters for generating the LDM from the CDM:
    • the name and path of the generated LDM. The LDM corresponds to a ".WDA" file. By default, this file will be created in the directory of the project analysis (<Project name>.ANA directory). This directory must be accessible in read/write.
    • whether the captions of the associations without property (in the CDM) are kept to identify the links of the LDM ("Generation" tab).
    • the type of access to the data files ("File" tab). Depending on the selected type, the data files will be handled by the WinDev engine, by an OLEDB driver or by one of the native accesses of WinDev, WebDev and WinDev Mobile (SQL Server, Oracle, ...).
    • the type of the database used.
    • the format of the characters used in the analysis.
  3. Validate the generation. The LDM corresponding to the CDM is automatically created.

Special case: Updating an existing LDM
If the name and path of the LDM specified when generating the CDM correspond to an existing LDM, the existing LDM will be updated with the new description of the CDM.
When updating an existing LDM, the generation checks:

  1. The existence of the entity in the LDM:
    • if the entity is a new one, the corresponding file is created.
    • if the entity already exists, its properties are updated.
  2. The existence of the properties in the LDM:
    • if the property is a new one, the corresponding item is created.
    • if the property already exists, with the same description, no action is performed.
    • if the property already exists, with a different description, a conflict occurs. The data model editor proposes:
      • to ignore the new description of the property and to perform no modification.
      • to update the existing item with the new description of the property.
      • to create a new description synonym with the new description of the property.
  3. The existence of relationships and associations. When the association requires the creation of one or more relation files, the files and the items of the LDM are updated as described above. When a relationship was modified, the link with the LDM is re-created or updated:
    • if the identifying properties of one of the entities have been modified, the cardinality of the existing links are updated and new links are created.
    • if no identifying property of one of the entities was modified, the cardinalities are updated.

Notes

  • The deletion of entities, relationships or associations are not taken into account when generating a the LDM from a CDM.
  • The deletion of the entity properties can be taken into account by unchecking "Keep the LDM modifications" in the options for generating the LDM from the CDM. In this case, the files of the LDM only contain the items of the corresponding entity in the CDM after the conversion.