PDMS数据库快速索引查询

本文介绍如何使用C#接口访问PDMS的Dabacon数据库,通过NameTable类实现在PDMS中快速查询以特定字符开头的数据库元素,提高查询效率。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一、 概述

在PDMS的标准工具History中有一个功能在文本框中输入名称,系统快速动态的列出类似的元素,AVEVA PDMS采用Dabacon数据库,默认情况下我们访问PDMS数据库都是通过Navigation的形式,从World到Site再到Zone的方式。本文介绍通过C#接口访问Dabacon Tables实现在PDMS中快速查询数据库的功能。

 

二、 实现方法

在开发文档中介绍到Dabacon schema数据中,有一张类似 key/value 键值对的数据表如下:

…..
Janet = 123/456
John = 321/543
Jonathon = 111/321

我们可以通过NameTable类的静态成员函数返回一个NameTable对象。

 1 string nam1=new string(“/B”);
 2 string nam2=new string(“/D”);
 3 NameTable ntable = NameTable.GetNameTable(db, DBAttribute.NAME, nam1, nam2);
 4 using (ntable)
 5 {
 6    foreach (DbElement in ntable)
 7    {
 8    // Do something here with each element
 9    }
10 }

在这里将会列出所有以B开头和C的对象(到D结束)。

具体效果如下;

 

三、 总结

通过使用NameTable我们可以快速的在数据库中查找到以某些字符开头的数据,非常快速高效。但有一些遗憾的是不能进行模糊查找。如果需要模糊查找只能用过Filter过滤的方式进行搜索和判断了, 这样的执行效率没有直接从数据库中拿数据这么高。

 

转载于:https://www.cnblogs.com/jevon1982/p/9531659.html

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Guide Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Product Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . Compare and Update Data . . . . . . . . . . . . . . . . . . . Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Instrumentation and Electrical Elements Matching . . . . . . Dabacon Elements Matching . . . . . . . . . . . . . . . . . . . . . . . . Display of Comparison Results . . . . . . . . . . . . . . . . . . . . . . Element Grid Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Accept Changes for Update . . . . . . . . . . . . . . . . . . . . . . . . . Linking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Update the Target Database . . . . . . . . . . . . . . . . . . . . . . . . . Update the Schematic Database . . . . . . . . . . . . . . . . . . . . . . . . . . . Update the Catalogue Database . . . . . . . . . . . . . . . . . . . . . . . . . . . Update the Design Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Update one Dabacon Database from Another Dabacon Database . Using Compare/Update from PML . . . . . . . . . . . . . . . . . . . .
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值