Differences between revisions 1 and 12 (spanning 11 versions)
Revision 1 as of 2010-01-11 02:44:45
Size: 4486
Editor: ZoomQuiet
Comment:
Revision 12 as of 2010-02-16 16:30:33
Size: 3670
Editor: MarchLiu
Comment:
Deletions are marked like this. Additions are marked like this.
Line 4: Line 4:
:status: 草稿 ;LX;完成度75%;
Line 6: Line 5:
.. contents::
  :depth: 3
:status: 完成度 100%
Line 9: Line 7:
MoinMoin 链接: .. contents:: :local:
Line 11: Line 9:
- `page with a ReStructuredText primer <HelpOnParsers/ReStructuredText/RstPrimer>`_
- `use of ReST in MoinMoin <HelpOnParsers/ReStructuredText>`_.
- `PyCon2010亚洲 <PyCon2010>`_
Line 14: Line 11:
外部链接: Introduction
=============
Line 16: Line 14:
- `Docutils-Users mailing list`_
- `Docutils project web site`_
Socrates is a Model maker tools base on RDB and ORM。 It defines the dynamic structure storage and manage funcitons by triples semantic. Triples semantic can make it easy that descrption relations between data, so it wanderful for directed graph or network graph with circle or long path releations.
Line 19: Line 16:
.. [#] If that relative link doesn't work, try the master document:
   http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html.
.. _Docutils-Users mailing list:
   http://lists.sourceforge.net/lists/listinfo/docutils-users
.. _Docutils project web site: http://docutils.sourceforge.net/


主标题
===============================

附件 |contribute_docs|

.. |contribute_docs| image:: 1.0/RoughDocs/contribute_docs.jpg

脚注 [#]_
* How long:25 Minute
* Level : Intermediate and Advance
* Categories: databases
Line 39: Line 23:
.. contents:: :local:
Line 41: Line 24:
项目背景 Background on project Background on project
Line 44: Line 27:
* 需要建立一个数据库,支持多个统计报表输出,每个报表都是临时性的,数据量不大,但是报表的格式和内容变化很大
* 需要支持当前不能预期的数据内容
* 需要支持一些网状关系模型,节点间的关系变更频繁,经常需要沿节点间的路径进行访问
* 游戏中的人物、道具等信息,展开为关系表会非常庞大,但是往往只有一部分字段有信息,此类稀疏数据结构用关系数据库表达比较浪费
 * We need create a database as fast as, to support multi-reporters. Every one is small and used once but unique.
 * Need support some unkown data types.
 * Need create network model, that is varable between nodes, and often been find by path.
 * Characters and toys in some games, would very huge if description by RDB table. But it is sparse.
Line 50: Line 33:
需要解决的问题 Problems to solve Problems to solve
Line 53: Line 36:
* 数据表的业务信息有内在的一致性,为每种变化建立一个新的数据表不经济  * The business information of the data sheet has its own internal consistency. it is not efficient or economic to establish a new data model for each and every change.
 * Modify the data table structure when every data change is not actuality.
 * RDB model is not good at description deep recursion as such as tree.
Line 55: Line 40:
* 频繁变化结构的数据,每次调整表结构不现实

* 关系数据库的模型适合表示大量同类数据的关系,但表达深度的递归关系,如树状结构,是比较难操作的

* 一些应用,如游戏中的人物、道具等信息,展开为关系表会非常庞大,但是往往只有一部分字段有信息,此类稀疏数据结构用关系数据库表达比较浪费

项目介绍 What's socrates?
What's socrates?
Line 64: Line 43:
 * Socrates 基于三元语义模型,可以方便的表达动态的数据结构和关系  * Socrates bases on the triple semantic logic model. It can descript model with dynamic structure and releations easy.
 * The model create by two layers: subject and segment
  * Every segment is a triple structure as (subject, predicate, object).
  * A subject is a subject descripted by some segments.
  * The predicate is what owned by the subject.
  * The object is what subject is in the predicate.
 * Every subject is a structure like dictionary.
 * The predicate must be a readable string, the name is the unique title.
 * The object is any type if the database can use it.
 * Socrates override RDB's statics and strongly data type, but play as dynamic data structure model.
 * Socrates bases on the python ORM tools named SQLAlchemy, it can use the greate power from SQLAlchemy.
 * Socrates in database is a universe ident creater, a little storage tables, some meta command data. The storage table can create in runtime.
Line 66: Line 56:
 * 模型分为两个层次:条目和子句

  * 每个子句是一个(主语,谓语,宾语)三元结构

  * 每个主语表示一个条目,每一到多个同一主语的子句描述一个完整的条目

  * 谓语表示主语拥有的特征

  * 宾语表示主语在当前谓语下表达的信息内容

 * 每个条目可以看成一个类字典的结构

 * 谓语是可读的文本,它的命名是其唯一标识特性

 * 宾语可以使用数据库平台所支持的任意数据类型

 * Socrates封装关系数据库的静态强类型本质,在使用接口上表现为动态数据模型

 * 访问层上,Socrates基于Python的ORM工具SQLAlchemy,可以使用SQLAlchemy的强大功能进行操作

 * Socrates 在数据库层表现为一个统一序列器,若干个存储表,十个元语命令的数据行,存储表可以由用户动态添加

动机 Why socrates?
Why socrates?
Line 91: Line 59:
* 小粒度数据,可以方便的对单一属性精确的访问  * Tiny size data model, access easy for any detail.
 * Socrates can use as dictonary.
  * Every subject is a structure as dictionary, can modify without effect other.
  * Subject and subject can create relations use segments by a easy way.
 * You can uses any RDB and use its specific data type.
Line 93: Line 65:
* 支持对数据进行类似字典操作的访问

 * 每一个数据条目就是一个类似字典的结构,可以独立的增删数据,不影响其它条目

 * 条目之间可以通过子句方便的建立关系

 *

支持多种不同数据库,允许使用具体平台的特定数据类型


简单的演示 Basic recurrence
Basic recurrence
Line 107: Line 68:
* 在不同数据库平台上“On Command”建立一个Socrates环境
* 注册新类型、新谓语
* 添加条目,建立关系
 * "One command" create Socrates environment on different database platform.
 * Registe new type and predicate.
 * Write subject, new releation.
Line 111: Line 72:
进一步的演示 More sophisticated recurrence
-----------------------------
More sophisticated recurrence
-------------------------------------------
Line 114: Line 75:
* 查询子句和条目

* 沿条目关系进行访问

* 访问和操作条目中的子句

* 谓词表达式
 * Query segments and subject
 * Find by relation pathes.
 * Access segments in subjects.
 * Predicate Expression.
Line 125: Line 83:
* 性能讨论  * Performance
 * Concurrent and Distributed.
 * Multi node by difference databases.
Line 127: Line 87:
* 并发和分布

* 异构数据库的多节点集群

结尾
The End
Line 134: Line 90:
* Socrates 提供了灵活的数据管理方式,为动态和复杂数据的管理提供了一种通用的方式  * Socrates Supports a flexible way to manage data. It can manager dynamic and complex data in a unitive technique.
 * Socrates need improve at DSL and distributed.
 * Socrates can be speed boost.
Line 136: Line 94:
* Socrates 在DSL和分布式集群方面还可以有所发展

* Socrates 的性能还有很大的提升空间

.. macro:: -- MarchLiu [<<Date(2010-02-17)>>]
Rendering of reStructured text is not possible, please install Docutils.

:status: 完成度 100%

.. contents:: :local:

- `PyCon2010亚洲 <PyCon2010>`_ 

Introduction
=============

Socrates is a Model maker tools base on RDB and ORM。 It defines the dynamic structure storage and manage funcitons by triples semantic. Triples semantic can make it easy that descrption relations between data, so it wanderful for directed graph or network graph with circle or long path releations.   

* How long:25 Minute
* Level : Intermediate and Advance
* Categories: databases

Socratse
=========


Background on project
---------------------------------------

 * We need create a database as fast as, to support multi-reporters. Every one is small and used once but unique. 
 * Need support some unkown data types.
 * Need create network model, that is varable between nodes, and often been find by path. 
 * Characters and toys in some games, would very huge if description by RDB table. But it is sparse. 


Problems to solve
------------------------------------

 * The business information of the data sheet has its own internal consistency. it is not efficient or economic to establish a new data model for each and every change.
 * Modify the data table structure when every data change is not actuality.
 * RDB model is not good at description deep recursion as such as tree.

What's socrates?
------------------------------------

 * Socrates bases on the triple semantic logic model. It can descript model with dynamic structure and releations easy.
 * The model create by two layers: subject and segment
  * Every segment is a triple structure as (subject, predicate, object).
  * A subject is a subject descripted by some segments.
  * The predicate is what owned by the subject. 
  * The object is what subject is in the predicate.
 * Every subject is a structure like dictionary.
 * The predicate must be a readable string, the name is the unique title.
 * The object is any type if the database can use it. 
 * Socrates override RDB's statics and strongly data type, but play as dynamic data structure model.
 * Socrates bases on the python ORM tools named SQLAlchemy, it can use the greate power from SQLAlchemy.  
 * Socrates in database is a universe ident creater, a little storage tables, some meta command data. The storage table can create in runtime. 

Why socrates?
------------------------

 * Tiny size data model, access easy for any detail.
 * Socrates can use as dictonary.
  * Every subject is a structure as dictionary, can modify without effect other.
  * Subject and subject can create relations use segments by a easy way.
 * You can uses any RDB and use its specific data type.

Basic recurrence
----------------------------------

 * "One command" create Socrates environment on different database platform.
 * Registe new type and predicate.
 * Write subject, new releation.

More sophisticated recurrence
-------------------------------------------

 * Query segments and subject
 * Find by relation pathes.
 * Access segments in subjects.
 * Predicate Expression.

Other capabilities of socrates
------------------------------

 * Performance
 * Concurrent and Distributed.
 * Multi node by difference databases.

The End
----------

 * Socrates Supports a flexible way to manage data. It can manager dynamic and complex data in a unitive technique.
 * Socrates need improve at DSL and distributed.
 * Socrates can be speed boost.

.. macro:: -- MarchLiu [<<Date(2010-02-17)>>]
.. macro:: -- ZoomQuiet [<<DateTime(2010-01-11T10:44:45+0800)>>]

SocratesIntro (last edited 2010-02-19 17:26:34 by MarchLiu)