Discuz! Board

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 1820|回复: 0
打印 上一主题 下一主题

mork数据库

[复制链接]

388

主题

602

帖子

2218

积分

金牌会员

Rank: 6Rank: 6

积分
2218
跳转到指定楼层
楼主
发表于 2016-3-13 20:41:25 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式


https://developer.mozilla.org/en-US/search?q=mork
firemail中邮件存储相关的msf文件和通讯录存储用的都是mork数据库
https://wiki.mozilla.org/Mork

https://wiki.mozilla.org/Examples_of_various_Address_Book_formats
Model
The basic Mork content model is a table (or synonymously, a sparse matrix) composed of rows containing cells,where each cell is a member of exactly one column (col). Each cell is one attribute in a row. The name of the attribute is a literal designating the column, and the content of the attribute is the value. The content value of a cell is either a literal (lit) or a reference (ref). Each ref points to a lit or row or table, so a a cell can "contain" another shared object by reference.

稀疏矩阵(sparse matrix):
矩阵中非零元素的个数远远小于矩阵元素的总数,并且非零元素的分布没有规律,则称该矩阵为稀疏矩阵(sparse matrix);与之相区别的是,如果非零元素的分布存在规律(如上三角矩阵、下三角矩阵、对称矩阵),则称该矩阵为特殊矩阵


  • < - open angle - begins a dict (inside a dict, begins metainfo row)
  • > - close angle - ends a dict
  • [ - open bracket - begins a row (inside a row, begins metainfo row)
  • ] - close bracket - ends a row
  • { - open brace - begins a table (inside a table, begins metainfo row)
  • } - close brace - ends a table
  • ( - open paren - begins a cell
  • ) - close paren - ends a cell
  • ^ - up arrow - dereference following id for literal value
  • r - lower r - dereference following oid for row (by ref) value
  • t - lower t - dereference following oid for table (by ref) value
  • : - colon - next value is scope namespace for preceding id
  • = - equals - begin a literal value inside a cell
  • + - plus - add update: insert content
  • - - minus - cut update: remove content
  • ! - bang - put update: clear and set content


A Mork implementation should have more than one map -- one for each scope is needed. But version 1.4 of Mork only uses two scopes: a for atom literals and c for column literals. The former, a, is the default scope for idss in a dict, unless explicitly changed to the latter by a metadict containing a (atomScope=c) cell.

all cols default to scope c and all slots default to scope a.

oid ( object identity)   composed of two parts: id and scope
octet sequence  字节序列

panacea.dat    https://wiki.mozilla.org/User:Em ... ssageincomingserver


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|firemail ( 粤ICP备15085507号-1 )

GMT+8, 2024-5-2 23:50 , Processed in 0.056318 second(s), 19 queries .

Powered by Discuz! X3

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表