ArcGIS中的schema

schema指的是数据库的数据结构。对于Geodatabase中的表来说,schema指的是这个表的结构、表名称、字段名称、字段类型等等。对于Geodatabase来说,schema指的是Geodatabase中的表、要素集、要素类、子类和关联类(relationship)等等。

About schema locks

A schema within the geodatabase is the structure or design of a geodatabase or geodatabase object, such as a table, feature class, or attribute domain as opposed to the underlying data. Schema locks are used to manage geodatabase schemas to ensure the structure of a dataset will not change once it has been opened or referenced.

The ISchemaLock interface is used to manage the schema locks associated with a dataset or object. The following are the schema lock types:

Shared schema locks—These are applied automatically by the geodatabase when accessing a dataset and are removed when all references to the dataset are removed. For this reason, it is not necessary to explicitly apply or remove shared schema locks. There is no limit to the number of shared schema locks a dataset or object can have.

Exclusive schema locks—In contrast to shared schema locks, exclusive schema locks are controlled by the developer or ArcGIS application, such as ArcMap or ArcCatalog. An exclusive lock is used to lock a geodatabase dataset or object from use by others to make the necessary changes to it. An exclusive lock is promoted from a shared lock and demoted back to a shared lock when no longer needed. The presence of additional shared schema locks on a dataset or object prevents an exclusive schema lock from being applied and precludes the ability to make changes to the underlying dataset and its schema while it is in use. Only one exclusive schema lock is allowed per dataset. As opposed to shared schema locks, exclusive schema locks are not applied or removed automatically. It is the responsibility of the developer to apply or remove exclusive schema locks.

ISchemaLock    Provides access to members for accessing schema locking functionality.

When To Use Use

ISchemaLock to establish an exclusive lock on a dataset when changing its schema, or performing other operations that require exclusive access to the data.

public void DeleteField(IObjectClass objectClass, String fieldName){// Get the field to be deleted.int fieldIndex = objectClass.FindField(fieldName);    IField field = objectClass.Fields.get_Field(fieldIndex);// Cast to the ISchemaLock interface.ISchemaLock schemaLock = (ISchemaLock)objectClass;try{// Get an exclusive schema lock on the object class. schemaLock.ChangeSchemaLock(esriSchemaLock.esriExclusiveSchemaLock);// Alter the class extension for the class.objectClass.DeleteField(field);    }catch (Exception e)    {// An error was raised; therefore, notify the user.Console.WriteLine(e.Message);    }finally{// Since the Finally block is always called, the exclusive lock is demoted// to a shared lock after the field is deleted and after an error is raised.schemaLock.ChangeSchemaLock(esriSchemaLock.esriSharedSchemaLock);    }}

http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/index.html#/d/0001000004qw000000.htm

(0)

相关推荐

  • ArcGIS 10.2 软件安装教程

    软件 下载 [名称]:ArcGIS 10.2 [语言]:简体中文 [安装环境]:Win10/Win8/Win7 [下载链接]: 链接: https://pan.baidu.com/s/18Ze_c7y ...

  • ArcGIS中如何用栅格裁剪栅格

    自然资源频道 学习改变生活 知识创造未来 4篇原创内容 公众号 在使用ArcGIS的过程中常常需要从一张大的栅格图像中抠出我们需要用的那一部分,特别是需要用的部分的形状不规则该怎么办喃??? 上图中彩 ...

  • ArcGIS中不小心移动的图斑怎么还原?(附自动保存插件下载)

    原创 GIS前沿小助手 GIS前沿 昨天 工作中我们努力认真地在ArcGIS中"一笔一画"绘制着 突然! 鼠标乱窜,键盘狂点! 哎-我就不好好工作,就是玩儿! 玩完后我们发现好不容 ...

  • 如何在ArcGIS中使用不规则三角网(TIN)详细介绍

    如何在ArcGIS中使用不规则三角网(TIN)详细介绍

  • ArcGIS中附件功能使用介绍

    在arcgis中,可以向要素类或表中添加文件(图像.PDF.文本或任意其他文件类型)作为附件. 我们以一个行政区的面状要素为例,介绍如何使用附件,如下图: 这是我们本次要使用的数据 以下是我们作为附件 ...

  • ArcGIS中使用模型构建器快速计算图斑面积占比

    操作要求:使用模型构建器计算单类图斑占总面积的比值 使用软件:ArcMap 操作思路: 1. 常见思路一般是直接在要素图斑的属性表中进行融合--汇总面积--添加字段--计算字段.(此办法对于单个文件操 ...

  • ArcGIS中利用模型构建器将较多数据合并为一份数据

    昨天 今天开始我们来介绍一些非常独特的工具,他不存在于Arctoolbox中,仅在模型构建器中可以找到并使用. 我们新建模型后找到工具栏插入--仅模型工具,在里面可以发现一些平时不常使用的工具. 掌握 ...

  • ArcGIS中的地理坐标系转换方法参数

    地理坐标系变换是数据处理过程中常遇到的问题,今天就说下这方面的问题. 如果遇到这种情景:两份数据有不同的坐标系,想叠加在一起显示,作图或显示精度要求不高. 这种情况使用 ArcMap 的动态投影即可, ...

  • 在 ArcGIS 中由激光雷达创建强度图像

    强度以及强度图像 强度是反映生成某点的激光雷达脉冲回波强度的一种测量指标(针对每个点而采集).该值在一定程度上基于被激光雷达脉冲扫到的对象的反射率.其他对强度的描述包括"回波脉冲振幅&quo ...

  • arcgis中超链接工具的使用

    arcgis中超链接工具的使用