robot
最新文章(10)
MadButterfly 和 Javascript 合體的威力
Adapt C code for Javascript
OpenVG for Linux/FreeBSD with X
回收 Linux cached memory
公告: 更換 domain name
關於 GCC nested function
GLUT 作為 Embedded System 的 UI 平台
別被 kernel 嚇到了
SVG 加 Gecko 完全攻略
在 OSDC 展示的 Plurk client
首頁
新編
最新留言
Entries RSS
重要關鍵字(10)
coding (120)
Python (93)
FreeBSD (71)
WEB (61)
URL (48)
hardware (46)
雜記 (45)
javascript (36)
Linux (31)
blog (30)
所有關鍵字
新增 URL
Dia 除了畫圖 2
by thinker
2 Columns
關鍵字:
Python
coding
在 linkname:[Dia 除了畫圖] http://heaven.branda.to/~thinker/GinGin_CGI.py/show_id_doc/301 之後,又持續做一些圖形化 CASE 的$研究$。雖然這算是老掉牙的主題了,但透過 open source 加以實作,還是值得嘗試。之前透過定義 class diagram ,以產生 schema ,這次要透過 linkname:dia http://www.gnome.org/projects/dia/ 畫出 object diagram 配合 class diagram ,產生 query 。如下圖: [attach:table.png] view 的部分是定義一個 query ,透過 view depend on 一個 connected object diagram (全部用 association 連在一起) 我們定義了一個 SQL command ,以 join 運算產生 view 。這裡所說的 view 並不是 DBMS 提供的 view ,而是 join 所得的結果。 $UML$ 的 object diagram 的名稱可由 <object name>:<type name> 格式的字串組合而成,如 a_item:Item 就是一個名為 a_item 的物件,其 type 為 Item 。在我們的使用$範例$中, type name 直接對應到 table 的名稱。於是, export 的結果為下: {{{#!raw views = \ { 'content_of_an_order': 'select * from Item AS a_item JOIN Order AS _TID_739369024 ON a_item.order = _TID_739369024.sn JOIN Product AS _TID_739369040 ON a_item.product = _TID_739369040.sn'} }}} 重點來了,用這樣的圖形,是否比 SQL command 本身容易理解?初步的答案是肯定的,不知道各位的看法如何? linkname:[source code download] attach:sqlschema.py
最後更新時間: 2007-12-10 23:36:35 CST |
引用
查詢:
COMMENTS: