2008年12月1日 星期一

判斷資料庫能否連線的方式

What validation Query to Use

Validation Query is mandatory to ensure that a connection returned to client code is valid. It has the following requirements:

  • It must be the most efficient query
  • It must return ONE and only ONE row

To declare it, use the Ubik Web Controler or open /config/datasource.xml and add or modify for your pool the parameter validationQuery:

>

>validationQuery>
>...>
>
Database
Query
DB2 SELECT COUNT(*) FROM SYSIBM.SYSTABLES OR SELECT CURRENT TIMESTAMP FROM SYSIBM.SYSDUMMY1
Informix SELECT COUNT(*) FROM SYSTABLES
Microsoft SQL Server SELECT 1
MySQL SELECT 1
Oracle SELECT 1 FROM DUAL
PointBase SELECT COUNT(*) FROM SYSTABLES
PostgreSQL SELECT 1
Progress SELECT COUNT(*) FROM SYSTABLES
Sybase SELECT 1

2008年10月16日 星期四

moon


moon
原由 peterpai 上載
pijnpijn

moon


moon
原由 peterpai 上載
fsdfasfasdgsdg

moon


moon
原由 peterpai 上載
test

2008年10月13日 星期一

UML六種箭頭的分別


(1) Unidirectional Aggregation

(2) Unidirectional Composition

(3) unidirectional association.

(4) Associations (relationships between classes).

(5) Aggregation (comprises) relationship relationship.1 Destroying the "whole" does not destroy the parts.

(6 ) Composition (has) relationship.1 The parts are destroyed along with the "whole." Doesn't really exist in Java. In C++

結合關係(association)有兩種變形,一種為空心菱形的「聚合關係」(aggregation),另一種為實心菱形的「組合關係」(composition)。聚合或組合關係兩端的物件,一端扮演「整體物件」(whole object,整件),另一端扮演「部分物件」(part object,部件)。在結合關係中,兩端的物件並不具有「整體-部分」(whole-part)的特色。

一般,我們可以透過檢核下列四項要件,判斷兩類別之間採用結合、聚合還是組合較適當:

1. 在企業領域的專業概念裡,兩種物件之間有一種固定不變且需要保存的靜態關係。(結合關係的要件)

2. 在資訊化時,系統會用到這些靜態關係,而且必須將它們存到資料庫。(結合關係的要件)(符合上述要件1~2,即可採用結合關係)

3. 在企業領域的專業概念裡,兩種物件之間有整體-部分的靜態關係。(聚合關係的要件)
(符合上述要件1~3,即可採用聚合關係)

4. 部件只能連結一個整件,且整件被註銷(destroy)時,部件必須一塊被註銷。(組合關係的要件)(符合上述要件1~4,即可採用組合關係)

2008年5月22日 星期四

天祥摔機


天祥摔機,原由 peterpai 上載。

摔什麼機…是sanyo c6 小相機……

話說那天,我滿心歡喜的在我的好小折上裝上sanyo c6,想說可以來個全程錄影……

結果,騎沒幾分鐘…就摔了……