开发工具分享
  • 首页
  • 计算科学
  • 文化旅游
  • 项目和网站
    • OSSEZ 计算技术
    • USRealEstate 社区
    • 地区文化
    • CWIKI.US
    • BUG.OSSEZ.COM
    • RSS.OSSEZ.COM
CWIKIUS.CN
一个有独立思考和温度的清新站
  1. Home
  2. Computer Science
  3. This article

IRIS / Chronicles 数据结构备忘录

2024年04月08日 438Browse 0Like 0Comments

数据结构的内容主要涉及到索引和全局变量。

这部分的内容的问题在于概念多,和普通的数据库对应的内容也不太一样,需要花点时间了解。

networked items

有关英文的解释是:

Networked items that point to databases that use padded-string IDs always store the external (unpadded) form of the target record’s .1 item. This eliminates the padding factor dependency, which could be changed through a data conversion. If the database networked to uses numeric IDs, then the value stored in the item is identical to the record’s ID.

说人话就是对于一个 Item 是 networked 的话,这个 Item 中存储的数据就是根据 .1 这个 Item external (unpadded) 来的。

这里有 2 个概念,.1 这个 Item 可以存字符串,.1 这个Item 也可以存全是数字,当如果 .1 存储是全是数字的话,networked 的存储数据和 .1 中的数据是相同的。
但是,因为 padded 的问题,针对 String 的 Padded 的时候,会在字符串前面加空格,这会导致在数据转换的时候可能会不一致。
这个知识点就想表达的意思就是可能数据在转换的时候会不一致。

Chronicles Locators

Chronicles Locators describe the subscripts used to define nodes in Chronicles Data Globals. The 5 standard locators are INI, ID, DAT, Item # and Line #. In addition to being subscripts to globals, the locators are also used as input to various routines and utilities, as well as arguments to Chronicles API.

Chronicles Locators 主要用途就是把数据从 Chronicles Data Globals 读取出来。要读取 Chronicles Data Globals 中的数据,需要有 5 个参数:INI, ID, DAT, Item # 和 Line #。

用中文来翻译的话,这个应该叫做 Chronicles 数据全局。

Chronicles Data Globals 可以认为是 Chronicles 和 M 语言全局变量中的一个映射。

根据我们对 Chronicles 数据库的了解,Chronicles 将会把数据映射到 M 语言的全局变量中,然后提供语言级别的调用,这个和我们常用的关系数据库不一样,因为我们不可能把数据库中的内容全部映射到一个程序语言的全局变量中,这会导致溢出的。

但 Chronicles 这个数据就是这样操作的。

Remember to look before you leap; view your test data before writing code to load it, so you know what to expect. To create your test data, use Chronicles. To see the raw data and locators along with most translations, use the Record Viewer. The important locators can be seen in the chart below and will be critical to loading in the next section.

Determine the number of lines of data in an item

Multiple, related and related-multiple response items maintain a line count within line 0 of the item. This line 0 line count is not necessary for a single response item because single response items (by definition) may not have more than one line.

Multiple, related 和 related-multiple 这 3 个 Response Type 中的数字分别有不同的意思。

Multiple, related 的 Line 0 表示的是一共有多少个 Line。

related-multiple 的 Line 0 表示的内容也是 Count 这个 Line 的数量,但是后面用一个 2 维数组来表示了。比如说,1,0 的值如果是 1 的话,表示这个 RM 只有一个 Line。

那对应的下一个 Line # 就是 1,1。

如果 1,0 的值为 2 的话,就表示这个 RM 会有 2 个 Line。

那么对应的好后续值分别为 1,1 和 1,2。

 

 

哪怕就是采用上面的表示方式,related-multiple 还是有一个 Line 为 0 的东西,这个表示的是这个 related-multiple 下面一共有多少条记录。

总结来说,当 Line # 为 0 的时候表示的就是数量。

Explain what is used to identify contacts in Chronicles Data Globals that store information over time

Contacts are identified by DAT. The DAT is derived from the internal format of the date subtracted from a constant (121531) to ensure that when using a natural sort order the most recent information is returned first.

在 Chronicles Data Globals 中,就是在 M 语言的全局变量中,Contacts 数据是通过 DAT 来进行定义的。

这里就有一个计算方法了,DAT=121531-DTE。

所以随着时间的推移,DAT 在系统中的数值是越来越小的,等于在系统中是递减的,然后在显示的时候排序就是小的在前面,这样能够保证最新的数据在最前面,按照 DAT 从小到大的方式来显示。

 

 

上图显示了 DAT 的排序情况。

 

https://www.isharkfly.com/t/iris-chronicles/15621

Tags: None
Last updated:2024年04月08日

HoneyMoose

有温度的人文和独立的思考

Like
< Previous
Next >

Comments

Cancel reply

Archives
  • May 2026
  • April 2026
  • March 2026
  • February 2026
  • January 2026
  • December 2025
  • November 2025
  • October 2025
  • September 2025
  • August 2025
  • July 2025
  • June 2025
  • May 2025
  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • June 2024
  • May 2024
  • April 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • July 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • February 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • June 2018
  • May 2018
  • April 2018
  • March 2018
Categories
  • Computer Science (2,362)
    • Confluence (663)
    • Gradle (12)
  • U.S. (482)
  • 文化旅游 (145)

COPYRIGHT © 2020 CWIKIUS. ALL RIGHTS RESERVED.

THEME KRATOS MADE BY VTROIS

湘ICP备2020018253号-1