php数据归档,Geodatabase10.2新特性数据归档(Data Archiving)

_evw.

也就是说,我们桌面上看到的非版本数据进行数据归档其实就是一个多版本视图。

这里面有一个问题希望大家知晓:因为我在进行数据归档时候,时间字段的信息并不是我笔记本的时间,而且帮助上说的UTC时间。It is important to understand how ArcGIS represents time when change is recorded. History can be recorded as either valid time, transaction time, or Coordinated Universal Time (UTC). Valid time is the actual moment at which a change occurred in the real world and is typically recorded by the user who is applying the change. Transaction time is the time an event was recorded in the database. Transaction times are generated automatically by the system. UTC is the primary standard used to regulate clocks and time over the Internet.

For archiving on versioned data ArcGIS uses transaction time, which is based on the current server time, to record changes to the data when changes are saved or posted to the DEFAULT version. Transaction time and the time the event occurred in the real world are rarely the same time. Time will elapse between an event happening in the real world and its being recorded in the database. For example, a parcel is sold on May 14, 2006; however, the change is not recorded to the data until June 5, 2006. The transaction time of June 5, 2006, is recorded in the archive class for this change.

When the edit occurs, ArcGIS will archive the transaction to the archive class. The difference between the time of the real-world event and the transaction time may seem insignificant, but it becomes more apparent when queries are performed against the archived information. Backlogs in editing and updating data are not uncommon in production systems, and they result in the time difference and lag between valid and transaction time.

The difference between valid and transaction time is also an issue in situations where history is recorded in a multiuser environment with many different users or departments editing the database. The sequence in which changes are performed and logged in the database may not be the same order in which those changes occurred in the real world.

Archiving on nonversioned data uses UTC to represent time. Changes to the data are recorded when edits are saved during an edit session.最后一行,非版本数据归档使用了UTC时间。版本数据的归档还是服务器时间或者北京时间。create table CONTINENT

(

objectid INTEGER not null,

continent NVARCHAR2(13),

shape ST_GEOMETRY,

gdb_from_date TIMESTAMP(6) default sys_extract_utc(systimestamp) not null,

gdb_to_date TIMESTAMP(6) default to_timestamp('12.31.9999 23:59:59.000000','mm.dd.yyyy HH24:MI:SS.FF6') not null,

gdb_archive_oid INTEGER not null

)Oracle数据库和SQL Server都是一样的使用UTC时间。

***************************************************************************

关于UTC时间

协调世界时,又称世界统一时间,世界标准时间,国际协调时间,简称UTC。它从英文“Coordinated Universal Time”/法文“Temps Universel Cordonné”而来。中国大陆、中国香港、中国澳门、中国台湾、蒙古国、新加坡、马来西亚、菲律宾、西澳大利亚州的时间与UTC的时差均为+8,也就是UTC+8。

可以简单理解:UTC时间=北京时间-8小时

更多参考:

UTC时间与北京时间的差多久:http://blog.csdn.net/dbafans/article/details/4393017

如何將 UTC 時間轉換為當地時間:http://support.microsoft.com/kb/884804/zh-tw

至于为什么Esri将非版本数据采用UTC时间,我现在也不太明白,帮助也没有写太多,但是这就出现了一个问题。

1:我对非版本数据进行数据归档,这个起始时间是UTC时间。

2:我进行数据编辑之前,要建立历史标记,这个历史标记的时间是服务器时间

test.jsp?url=http%3A%2F%2Fimg.blog.csdn.net%2F20130428154603268&refer=http%3A%2F%2Fblog.csdn.net%2Flinghe301%2Farticle%2Fdetails%2F8863597

3:进行相关数据编辑对要素的起始时间仍然是UTC时间。

那么在进行历史版本查询的时候,UTC时间和服务器时间差8个小时,肯定是查不到的。(所以,在建立历史标记的时候,可以自己减去8小时即可)

也可以直接修改操作系统的时区,但是个人认为这个方法不可取,毕竟系统记录的时间多为北京时间而不是UTC时间

test.jsp?url=http%3A%2F%2Fimg.blog.csdn.net%2F20130502144840487&refer=http%3A%2F%2Fblog.csdn.net%2Flinghe301%2Farticle%2Fdetails%2F8863597

关于这个问题,有可能出现个人理解的偏颇之处,仅供参考

****************************************************************

非版本数据的数据归档编辑跟版本数据一样

1:新创建的要素具有将 gdb_from_date 属性设置为存档操作的时间戳,将 gdb_to_date 属性设置为 12/31/9999 的属性值。

2:在编辑会话中更新的要素通过将 gdb_to_date 属性的属性值设置为存档操作的时间戳更新基础表中的相关的行和插入新行,为将 gdb_from_date 属性设置为存档操作的时间戳,将 gdb_to_date 属性设置为 12/31/9999 的属性值。

3:在编辑会话中删除的功能通过设置 gdb_to_date 属性值等于存档操作的时间戳更新基础表中的相关的行。

****************************************************************

而且我们也可以直接使用SQL进行数据编辑,这个时候,系统会自动对归档的起始时间以及归档ID进行维护SQL> insert into CONTINENT(objectid,continent,shape) values(100,'aa',sde.ST_Poly

FromText('polygon ((52 28,58 28,58 23,52 23,52 28))', 300002));

已创建 1 行。

SQL> commit;

提交完成。

SQL> select objectid,continent,gdb_from_date,gdb_to_date,gdb_archive_oid from continent where objectid=100;

OBJECTID CONTINENT GDB_FROM_DATE GDB_TO_DATE GDB_ARCHIVE_OID

--------------------------------------- --------------------------- -------------------------------------

100 aa 28-4月 -13 07.10.22.350000 下午 31-12月-99 11.59.59.000000 下午 15

****************************************************************

有好多用户反映,数据归档三个按钮,用时候比较麻烦,老是不知道怎么操作这些功能是可用的。

test.jsp?url=http%3A%2F%2Fresources.arcgis.com%2Fzh-CN%2Fhelp%2Fmain%2F10.1%2F003n%2FGUID-0538791B-09F7-4340-8318-D486442916F6-web.png&refer=http%3A%2F%2Fblog.csdn.net%2Flinghe301%2Farticle%2Fdetails%2F8863597

1:查看历史版本

test.jsp?url=http%3A%2F%2Fimg.blog.csdn.net%2F20130428161533794&refer=http%3A%2F%2Fblog.csdn.net%2Flinghe301%2Farticle%2Fdetails%2F8863597

2:添加归档类

test.jsp?url=http%3A%2F%2Fimg.blog.csdn.net%2F20130428161639475&refer=http%3A%2F%2Fblog.csdn.net%2Flinghe301%2Farticle%2Fdetails%2F8863597

3:添加历史标记

test.jsp?url=http%3A%2F%2Fimg.blog.csdn.net%2F20130428161728229&refer=http%3A%2F%2Fblog.csdn.net%2Flinghe301%2Farticle%2Fdetails%2F8863597

同样可以使用版本管理器来管理

test.jsp?url=http%3A%2F%2Fimg.blog.csdn.net%2F20130428162111046&refer=http%3A%2F%2Fblog.csdn.net%2Flinghe301%2Farticle%2Fdetails%2F8863597

****************************************************************

-------------------------------------------------------------------------------------------------------

-------------------------------------------------------------------------------------------------------

本文原创发布php中文网,转载请注明出处,感谢您的尊重!

相关文章

相关视频

网友评论

文明上网理性发言,请遵守 新闻评论服务协议我要评论

47d507a036d4dd65488c445c0974b649.png

立即提交

专题推荐064df72cb40df78e80e61b7041ee044f.png独孤九贱-php全栈开发教程

全栈 100W+

主讲:Peter-Zhu 轻松幽默、简短易学,非常适合PHP学习入门

7dafe36c040e31d783922649aefe0be1.png玉女心经-web前端开发教程

入门 50W+

主讲:灭绝师太 由浅入深、明快简洁,非常适合前端学习入门

04246fdfe8958426b043c89ded0857f1.png天龙八部-实战开发教程

实战 80W+

主讲:西门大官人 思路清晰、严谨规范,适合有一定web编程基础学习

php中文网:公益在线php培训,帮助PHP学习者快速成长!

Copyright 2014-2020 https://www.php.cn/ All Rights Reserved | 苏ICP备2020058653号-1e6cebb680dfe320dad7e62bd6442c3a6.gif

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值