~ubuntu-branches/ubuntu/utopic/libgda5/utopic

« back to all changes in this revision

Viewing changes to tools/browser/help/zh_CN/virtual-connections.page

  • Committer: Package Import Robot
  • Author(s): Michael Biebl
  • Date: 2012-02-10 13:43:47 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120210134347-pnhy092ghuopf2gm
Tags: 5.0.3-1
* New upstream release.
* Add symbols file for libgda-5.0-4.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
    <link type="guide" xref="features"/>
6
6
    <link type="guide" xref="index#connections"/>
7
7
  </info>
8
 
  <title>Connections binding (i.e. virtual connections)</title>
9
 
  <p>
10
 
    Connection binding is a feature which allows to "bind" several connections and/or imported
11
 
    data sets into a single connection, which can be used almost like a regular connection.
12
 
  </p>
 
8
  <title>连接绑定(即虚拟连接)</title>
 
9
  <p>连接绑定功能是一个可以 "联合" 几个连接 并/或输入数据集到一个单一连接,与使用普通连接几乎一样。</p>
13
10
  <p>
14
11
    This feature is useful when one needs to execute an SQL command (for example to extract data)
15
12
    taking into account data actually stored in different databases. Without this feature, the way
23
20
    from which elements to be included in the "bound" connection can be defined as shown below.
24
21
  </p>
25
22
  <figure>
26
 
    <title>Dialog to create a new virtual connection</title>
27
 
    <desc>Here the current connection (c1) will be bound in the "c1" schema</desc>
 
23
    <title>建立新虚拟连接对话框</title>
 
24
    <desc>这里的当前连接 (c1) 将绑定到 "c1" 架构</desc>
28
25
    <media type="image" mime="image/png" src="figures/virtual-cnc.png"/>
29
26
  </figure>
30
27
  <p>
36
33
  </list>
37
34
 
38
35
  <section id="vcnc-use-case">
39
 
    <title>Use case for virtual connections</title>
40
 
    <p>
41
 
      To illustrate virtual connection usage, let's define a simple use case and see how it's useful. Suppose you have
42
 
      a database which contains the list of servers which you are responsible for. For simplicity, let's assume that
43
 
      the database contains a table named "server" with the following definition:
44
 
    </p>
 
36
    <title>虚拟连接的用例</title>
 
37
    <p>为了图解虚拟连接的使用,让我们定义一个简单的用例来看看虚拟连接是多么的有用。假设您有一个包含自己负责的服务器列表的数据库。简单起见,假定这个数据库中包含一张名为“server”的、使用以下方式定义的表:</p>
45
38
    <code>CREATE TABLE servers (name string, location string);</code>
46
 
    <p>
47
 
      Let's suppose this table contains the following information:
48
 
    </p>
 
39
    <p>我们假设表里含有下列信息:</p>
49
40
    <code>
50
41
&gt; select * from servers ;
51
42
name     | location
58
49
(5 rows)
59
50
&gt;
60
51
    </code>
61
 
    <p>
62
 
      Now let's assume you have a third party program which gives you a list of servers for which there might be a
63
 
      problem, the output of this program is a CSV file with a column for the server name, a column for the error code,
64
 
      and a column describing the problem. Let's assume the CSV file has the following contents:
65
 
    </p>
 
52
    <p>现在我们假设你有一个第三方的程序给你了一份有可能出问题的服务器列表, 这个程序输出的CSV文件中有一列是服务器名,一列是错误代码,还有一列是错误的描述。让我们假设这个CSV文件有下列内容: </p>
66
53
    <code>
67
54
$ cat problems.csv 
68
55
Server name,Error code,Error description
69
 
darkstar,0,file system full
70
 
vador,1,outdated AV signature
71
 
darkstar,2,overloaded
72
 
flag,0,file system full
 
56
darkstar,0,文件系统已满
 
57
vador,1,过期的AV签名
 
58
darkstar,2,过载
 
59
flag,0,文件系统已满
73
60
$
74
61
    </code>
75
62
    <p>
125
112
  </section>
126
113
 
127
114
  <section id="virtual-ddl-sql">
128
 
    <title>SQL usable with virtual connections</title>
 
115
    <title>虚拟连接可以使用的 SQL</title>
129
116
    <p>
130
117
      You can use the SQL understood by <link href="http://sqlite.org/lang.html">SQLite</link> in any virtual
131
118
      connection. Be aware however that if you define database objects (outside of the extended SQL