关系代数与OO理论

20 views
Skip to first unread message

open audio

unread,
Apr 18, 2011, 11:33:35 PM4/18/11
to pongba
1、关系数据库是一阶逻辑的子集,所体现的,就是事物之间的逻辑关系。 

2、E-R模型,已经背离了关系逻辑的本意,这个E,不应该是实体,而仅仅是一个名字,关系建模不应该采用E-R图的方式。 

3、一些在关系数据库上很好的设计模式,被OO分析给破坏掉了,大多数人归罪于数据库思维没有OO思维先进,实际上关系代数比OO的理论(如果说OO还有理论的话)要深刻得多。 

4、采用OO思维方式下很复杂的模型,在关系数据库中会变得很简单,如果关系数据库往提供图灵完备的语言,而不是SQL的方向去发展的话,会更简单。

5、ORM是一个严重的错误,它把真实世界的关系强行用OO建模,又用ORM映射到关系数据库中,也就是说,在两个本来兼容的世界之间搭起一座与它们都不兼容的桥梁,没有比这更荒诞的事情了。 

open audio

unread,
Apr 18, 2011, 11:40:23 PM4/18/11
to pongba
勘误:
1、关系代数是一阶逻辑的子集,所体现的,就是事物之间的逻辑关系。

Stanley Xu

unread,
Apr 20, 2011, 9:10:34 AM4/20/11
to pon...@googlegroups.com
ORM没有什么荒谬的,无非是Framework给你做还是你自己手工写代码处理这个mapping而已。难道为了访问数据库,然后这个是关系代数,所以我就用一门关系代数语言写网站?

Best wishes,
Stanley Xu



2011/4/19 open audio <open...@gmail.com>

supern lee

unread,
Apr 20, 2011, 10:44:18 AM4/20/11
to pon...@googlegroups.com
lisp?

open audio

unread,
Apr 20, 2011, 10:56:41 AM4/20/11
to pon...@googlegroups.com
comments of somebody:

      1. 
  Entity is a name. the only meaning of a name is its connection to other names. 
   
  Connection(relationship) is the relationship of entities. 
   
  2. 
  "shared entity"(class, type, schema) could have many instances (rows) 
   
  "single entity" (instance, row, object) is just one entity, together with its own connections(relationship with other entities, class definition) 
   
  3. 
  "static entity"(class, type, schema, or just instance object) is defined before its life-cycle 
  "dynamic entity"(typically an instance object, or more generally an AST node) is dynamically defined/modified during its life-cycle.

4. 
  the path of (table_name->column_name->entity) and the path of (class_instance_object_name->method_name_or_field_name->entity) is similar. They represent a typical relationship of entities: the tree relationship. 
   
  The travelling of a tree relationship, is a specific form of travelling within the "network of entities". The process of travelling, is marked by the sequence of "name". 
   
  5. 
  Travelling is Searching. The "concatenation of name" (sequence of name) is the searching path within a state expansion space of the current "entity network realm". travelling by name(searching) eliminates the need for a much larger expansion space. 
   
  A language, is essentially the system of names provided for us to search/perform any desired entity within another system. (for example, using Java to use JVM, using commands to order a group of soldiers) 
   
  The better one language caters to the model our brain uses to search something, the better the language will be received by human beings.
Reply all
Reply to author
Forward
0 new messages