亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? fastdb.htm

?? 俄羅斯牛人KK的作品,著名的ORDBMS,這里上傳最新的3.39版本源代碼.希望了解對象關(guān)系數(shù)據(jù)庫的同好,請不要錯過.
?? HTM
?? 第 1 頁 / 共 5 頁
字號:
In FastDB this request should be written as: 

<PRE>
     dbQuery q = "detail.name like",name,"and supplier.company like",company,
	         "and supplier.address like",address,"order by price";
</PRE>
     
FastDB will first perform index search in the table <code>Detail</code> for details
matching the search condition. Then it performs another index search to locate shipment 
records referencing selected details. Then sequential search is used to check the rest of
select predicate.
<P>

<H3><A NAME = "rectangle">Rectangle</A></H3>

GigaBASE has builtin support of spatial data. It provides <code>rectangle</code> type.
By default it has dimension 2 and integer coordinate types. It is possible to easily change
dimension or use floating point coordinates, but recompilation of GigaBASE is needed in 
this case.<P>

It is possible to use this type not only in geographical system for 
representing spatial objects but also in many other cases when date is organized as hyper-cube and queries specify range of values for each dimension, for example:

<PRE>
      select * from CAR where price between 20000 and 30000 
                          and producedYear between 1997 and 1999 
                          and mileage between 50000 and 100000;
</PRE>

If <code>%lt;price, producedYear, milage&gt;</code> are dimensions of the rectangle, 
then this query can be executed using only one indexed search in R-Tree.<P>

Rectangle fields can be indexed - <B>R-Tree</B> index is used in this case
The R-tree provides fast access to spatial data. Basically the idea behind
the R-Tree and the B-Tree are the same:
use a hierarchical structure with a high branching factor to reduce the
number of disk accesses. The R-tree is the extension of the B_tree for a
multidimensional object. A geometric object is represented by its minimum 
bounding rectangle (MBR). Non-leaf nodes contain entries of the form 
(R,<I>ptr</I>) where <I>ptr</I> is a pointer to a child node in the R-tree; R 
is the MBR that covers all rectangles in the child node. Leaf nodes contain 
entries of the form (obj-id, R) where
obj-id is a pointer to the object, and R is the MBR of the object. The main 
innovation in the R-tree is that the father nodes are allowed to overlap. By
this means the R-tree guarantees at least 50% space utilization and remains 
balanced. 
The first R-tree implementation was proposed by Guttman. The Gigabase <B>R-Tree</B>
class is based on Guttman's implementation with a quadratic split algorithm.
The quadratic split algorithm is the one that achieves the best trade-off
between splitting time and search performance.<P>

Rectangle class provides method for calculating distance between two rectangle, 
rectangle area, checking whether two rectangle overlap or one contains another.
Rectangle is specified by coordinates of two it's vertices. Rectangle class
contains array of coordinates. Coordinates of first vertex are placed at the 
beginning of array, and then - coordinates of another vertex.
Each coordinate of first vertex should not be large than correspondent coordinate of 
the second vertex. Singular rectangle with one or more coordinates of first vertex equals 
to the correspondent coordinate of the second vertex are allowed - this is a way of storing
points in the database.<P>

SubSQL provides some special operators for dealing with rectangle. First of all - 
all comparison operators can be used with the following semantic:<P>

<TABLE BORDER ALIGN=CENTER>
<TR><TD><code>a == b</code></TD><TD>Rectangle <code>a</code> is the same as rectangle <code>b</code></TD></TR>
<TR><TD><code>a != b</code></TD><TD>Rectangle <code>a</code> is not the same as rectangle <code>b</code></TD></TR>
<TR><TD><code>a &lt;= b</code></TD><TD>Rectangle <code>b</code> contains rectangle <code>a</code></TD></TR>
<TR><TD><code>a &lt; b</code></TD><TD>Rectangle <code>b</code> contains rectangle <code>a</code> and them are not the same</TD></TR>
<TR><TD><code>a &gt;= b</code></TD><TD>Rectangle <code>a</code> contains rectangle <code>b</code> and are not the same</TD></TR>
<TR><TD><code>a &gt; b</code></TD><TD>Rectangle <code>b</code> contains rectangle <code>a</code> and them are not the same</TD></TR>
</TABLE><P>

Also SubSQL provides <code>overlaps</code> and <code>in</code> operators.
First checks if two rectangles overlap, the second is equivalent to <code>&lt;=</code> operator.
Rectangles can be added - result is minimal rectangle containing both rectangles-operands.
It is possible to access rectangle as array of coordinates - using <code>[index]</code>
notation. Coordinates in query are always returned as real numbers.<P>

Optimizer is able to use spatial index for all comparison operators (except <code>!=</code>)
and for <code>overlaps</code> operator.<P>


<H3><A NAME = "function">Functions</A></H3>
<TABLE BORDER ALIGN="center">
<CAPTION>Predefined functions</CAPTION>
<TR><TH>Name</TH><TH>Argument type</TH><TH>Return type</TH><TH>Description</TH></TR>
<TR><TD>abs</TD><TD>integer</TD><TD>integer</TD><TD>absolute value of the argument</TD</TR>
<TR><TD>abs</TD><TD>real</TD><TD>real</TD><TD>absolute value of the argument</TD</TR>
<TR><TD>area</TD><TD>rectangle</TD><TD>real</TD><TD>area of the rectangle</TD></TR>
<TR><TD>integer</TD><TD>real</TD><TD>integer</TD><TD>conversion of real to integer</TD</TR>
<TR><TD>length</TD><TD>array</TD><TD>integer</TD><TD>number of elements in array</TD</TR>
<TR><TD>lower</TD><TD>string</TD><TD>string</TD><TD>lowercase string</TD</TR><TR><TD>real</TD><TD>integer</TD><TD>real</TD><TD>conversion of integer to real</TD</TR>
<TR><TD>string</TD><TD>integer</TD><TD>string</TD><TD>conversion of integer to string</TD</TR>
<TR><TD>string</TD><TD>real</TD><TD>string</TD><TD>conversion of real to string</TD</TR>
<TR><TD>upper</TD><TD>string</TD><TD>string</TD><TD>uppercase string</TD</TR>
</TABLE><P>

FastDB allows user to define its own functions and operators.
Function should have at least one but no more than 3 parameters of string, integer, 
boolean, reference or user defined (raw binary) type. It should return value of integer, real, string or
boolean type.<P>
User functions should be registered by the <code>USER_FUNC(f)</code> macro, 
which creates a static object of the <code>dbUserFunction</code> class, binding 
the function pointer and the function name.<P>
There are two ways of implementing these functions in application.
First can be used only for functions with one argument. This argument should be of <code>int8, real8,
char*</code> types. And the function return type should be <code>int8, real8, char*</code> or <code>bool</code>.
If function has more than one parameters or it can accept parameters of different types (polymorphism)
then parameters should be passed as reference to <code>dbUserFunctionArgument</code> structure.
This structure contains <code>type</code> field, which value can be used in function implementation to
detect type of passed argument and union with argument value.
The following table contains mapping between argument types and where the value should be taken from:<P>

<TABLE BORDER ALIGN=CENTER>
<TR><TH>Argument type</TH><TH>Argument value</TH><TH>Argument value type</TH></TR>
<TR><TD><code>dbUserFunctionArgument::atInteger</code></TD><TD><code>u.intValue</code></TD><TD><code>int8</code></TD></TR>
<TR><TD><code>dbUserFunctionArgument::atBoolean</code></TD><TD><code>u.boolValue</code></TD><TD><code>bool</code></TD></TR>
<TR><TD><code>dbUserFunctionArgument::atString</code></TD><TD><code>u.strValue</code></TD><TD><code>char const*</code></TD></TR>
<TR><TD><code>dbUserFunctionArgument::atReal</code></TD><TD><code>u.realValue</code></TD><TD><code>real8</code></TD></TR>
<TR><TD><code>dbUserFunctionArgument::atReference</code></TD><TD><code>u.oidValue</code></TD><TD><code>oid_t</code></TD></TR>
<TR><TD><code>dbUserFunctionArgument::atRawBinary</code></TD><TD><code>u.rawValue</code></TD><TD><code>void*</code></TD></TR>
</TABLE><P>


For example the following
statements make it possible to use the <code>sin</code> function in SQL
statements:

<PRE>
        #include &lt;math.h&gt;
	...
        USER_FUNC(sin);
</PRE>


Functions can be used only
within the application, where they are defined. Functions are not accessible
from other applications and interactive SQL. If a function returns a string
type , the returned string should be copied by means of the operator
<code>new</code>, because
FastDB will call the destructor after copying the returned value.<P>

In FastDB, the function argument can (but not necessarily must) be enclosed in 
parentheses. So both of the following expressions are valid:

<PRE>
        '$' + string(abs(x))
	length string y
</PRE><P>

Functions with two argument can be also used as operators. Consider the following example, 
in which function <code>contains</code> which performs case insensitive search for substring is defined:

<PRE>
     bool contains(dbUserFunctionArgument& arg1, dbUserFunctionArgument& arg2) { 
         assert(arg1.type == dbUserFunctionArgument::atString 
	     && arg2.type == dbUserFunctionArgument::atString);
         return stristr(arg1.u.strValue, arg2.u.strValue) != NULL;
     }

     USER_FUNC(contains);
    
     dbQuery q1, q2;
     q1 = "select * from TestTable where name contains 'xyz'";
     q2 = "select * from TestTable where contains(name, 'xyz')";
</PRE>

In this example, queries <code>q1</code> and <code>q2</code> are equivalent.<P>



<H2><A NAME = "cpp">C++ interface</A></H2>
One of the primary goals of FastDB is to provide a flexible and convenient
application language interface. Anyone who has  to use 
ODBC or similar SQL interfaces will understand what I am speaking about.
In FastDB, a query can be written in C++ in the following way:<P>

<PRE>
    dbQuery q; 
    dbCursor&lt;Contract&gt; contracts;
    dbCursor&lt;Supplier&gt; suppliers;
    int price, quantity;
    q = "(price >=",price,"or quantity >=",quantity,
        ") and delivery.year=1999";
    // input price and quantity values
    if (contracts.select(q) != 0) { 
        do { 
            printf("%s\n", suppliers.at(contracts->supplier)->company);
        } while (contracts.next());
    } 
</PRE>

<H3><A NAME = "table">Table</A></H3>

Data in FastDB is stored in tables which correspond to C++ classes
whereas the table records correspond to class instances. 
The following C++ types are accepted as atomic components of
FastDB records:<P>

<TABLE BORDER ALIGN="center">
<TR><TH>Type</TH><TH>Description</TH></TR>
<TR><TD>bool</TD><TD>boolean type (<code>true,false</code>)</TD></TR>
<TR><TD>int1</TD><TD>one byte signed integer (-128..127)</TD></TR>
<TR><TD>int2</TD><TD>two bytes signed integer (-32768..32767)</TD></TR>
<TR><TD>int4</TD><TD>four bytes signed integer (-2147483648..2147483647)</TD></TR>
<TR><TD>int8</TD><TD>eight bytes signed integer (-2**63..2**63-1)</TD></TR>
<TR><TD>real4</TD><TD>four bytes ANSI floating point type</TD></TR>
<TR><TD>real8</TD><TD>eight bytes ANSI double precision floating point type</TD></TR>
<TR><TD>char const*</TD><TD>zero terminated string</TD></TR>
<TR><TD>dbReference&lt;T&gt;</TD><TD>reference to class T</TD></TR>
<TR><TD>dbArray&lt;T&gt;</TD><TD>dynamic array of elements of type T</TD></TR>
</TABLE><P>

In addition to types specified in the table above, FastDB records can
also contain nested structures of these components. 
FastDB doesn't support unsigned types to simplify the query language,
to  eliminate bugs caused by signed/unsigned comparison
and to reduce the size of the database engine.<P>

Unfortunately C++ provides no way
to get metainformation about a class at runtime (RTTI is not supported by all 
compilers and also doesn't provide enough information).
Therefore the programmer 
has to explicitly enumerate class fields to be included in the database table 
(it also makes mapping between classes and tables more flexible). 
FastDB provides a set of macros and classes to make such mapping as simple as 
possible.<P>

Each C++ class or structure, which will be used in the database, should 
contain a special method describing its fields. The macro 
<code>TYPE_DESCRIPTOR(</code><I>field_list</I><code>)</code> will construct 
this method. The single argument of this macro is - enclosed in parentheses -
a list of class field descriptors.
If you want to define some methods for the class
and make them available for the database, then the macro 
<code>CLASS_DESCRIPTOR(</code><I>name, field_list</I><code>)</code>
should be used instead of <code>TYPE_DESCRIPTOR</code>. The class name is
needed to get references to member functions.<P>

The following macros can be used for the construction of field
descriptors:

<DL>
<DT><B>FIELD(</B>name<B>)</B><DD>Non-indexed field with specified name.
<DT><B>KEY(</B>name, index_type<B>)</B><DD>Indexed field. <I>index_type</I> 
should be a combination of <code>HASHED</code> and <code>INDEXED</code> flags.
When the <code>HASHED</code> flag is specified, FastDB will create a hash table
for the table using this field as a key. When the <code>INDEXED</code> flag is 
specified, FastDB will create a (special kind of index) T-tree for the table 
using this field as a key. 
<DT><B>UDT(</B>name, index_type, comparator<B>)</B><DD>User defined raw binary type. 
Database deals with this type just as with sequence of bytes of specified size.
This field can be used in query (compared with query parameter of the same type), 
may be indexed and used in <code>order by</code> clause. Comparison is performed by means of
<code>comparator</code> function provided by programmer. Comparator functions receives three
arguments: two pointers to the compared raw binary objects and size of binary object.
The semantic of <I>index_type</I> is the same as of <code>KEY</code> macro.
<DT><B>RAWKEY(</B>name, index<B>)</B><DD>Raw binary type with predefined comparator.
This macro is just specialized version of <code>UDT</code> macro with <code>memcmp</code>
used as comparator.
<DT><B>RAWFIELD(</B>name<B>)</B><DD>One more specialization of <code>UDT</code> macro
for raw binary fields with predefined comparator <code>memcmp</code> and without indices.
<DT><B>SUPERCLASS(</B>name<B>)</B><DD>Specifies information about the base class
(parent) of the current class.
<DT><B>RELATION(</B>reference, inverse_reference<B>)</B>
<DD>Specifies <I>one-to-one, one-to-many</I> or <I>many-to-many</I>
relationships between classes (tables). Both <I>reference</I>
and <I>inverse_reference</I>
fields should be of reference or of array of reference type.
<code>inverse_reference</code> is a field of the referenced table
containing the inverse reference(s) to the current table. Inverse references
are automatically updated by FastDB and are used for query optimization
(see <A HREF="#inverse">Inverse references</A>).
<DT><B>OWNER(</B>reference, inverse_reference<B>)</B>
<DD>Specifies <I>one-to-many</I> or <I>many-to-many</I>
relationship between classes (tables) of owner-member type. 
When owner record is removed all referenced member records are also removed
(cascade delete). If member record has reference to owner class, it should be 
declared with RELATION macro.
<DT><B>METHOD(</B>name<B>)</B><DD>Specifies a method of the class.

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
手机精品视频在线观看| 美女一区二区视频| 久久久不卡网国产精品二区| av激情成人网| 成人自拍视频在线观看| 亚洲成人综合在线| 夜夜嗨av一区二区三区网页| 精品国产一区二区三区不卡| 7777精品伊人久久久大香线蕉超级流畅 | 欧美精品一区二区三区蜜桃视频| 国产精品456| 高清视频一区二区| www.av精品| 91一区一区三区| 99久久久久免费精品国产| 99re在线视频这里只有精品| 国产精品一线二线三线| av一区二区三区黑人| 色噜噜久久综合| 国产成人三级在线观看| 99精品国产91久久久久久| 欧美日韩中文精品| 欧美一区二区三区在线看| ww久久中文字幕| 国产精品乱码人人做人人爱| 亚洲综合丁香婷婷六月香| 久久精品国产久精国产爱| 粉嫩av一区二区三区在线播放| 欧洲亚洲精品在线| 日韩精品一区国产麻豆| 亚洲国产精品一区二区www| 成人精品国产福利| 国产精品久久久久7777按摩| 久久av资源网| 精品理论电影在线| 精品一区二区在线免费观看| 精品入口麻豆88视频| 免费精品99久久国产综合精品| 日韩午夜中文字幕| 精品一区二区三区视频在线观看| 91麻豆精品国产91| 国产精品一区二区在线观看网站| 这里只有精品视频在线观看| 日本色综合中文字幕| 国产日韩欧美不卡| 91捆绑美女网站| 美女高潮久久久| 中文字幕不卡一区| 欧美在线看片a免费观看| 亚洲国产精品视频| 久久色中文字幕| 91网站视频在线观看| 奇米影视在线99精品| 国产精品三级在线观看| 欧美日韩在线播放一区| 国产成人8x视频一区二区| 亚洲女爱视频在线| 国产亚洲欧美在线| 欧美肥妇bbw| aaa亚洲精品| 精品无码三级在线观看视频| 亚洲综合色视频| 国产精品私人自拍| www激情久久| 91精品久久久久久蜜臀| 在线日韩国产精品| 91麻豆精品国产91久久久资源速度 | 欧美一区二区三区免费| 91免费视频观看| 成人av电影免费在线播放| 成人小视频在线| 国产精品一区二区果冻传媒| 欧美一三区三区四区免费在线看 | 欧美中文字幕不卡| 成人丝袜18视频在线观看| 国产91精品入口| 成人午夜视频在线观看| 成人免费视频app| av在线播放成人| 在线视频亚洲一区| 777午夜精品视频在线播放| 91精品国产麻豆| 国产亚洲一区二区三区在线观看| 欧美一二区视频| 国产欧美日韩一区二区三区在线观看| www日韩大片| 亚洲裸体xxx| 蜜桃视频免费观看一区| 国内精品久久久久影院色| av激情成人网| 久久综合资源网| 一二三四区精品视频| 欧美aa在线视频| 色狠狠一区二区| 久久综合色8888| 日韩激情在线观看| 99国内精品久久| 国产亚洲女人久久久久毛片| 亚洲第一久久影院| 99久久精品免费看国产| 日韩美女主播在线视频一区二区三区| 国产精品久久久久影院| 国产一区二区不卡在线| 在线观看国产91| 亚洲欧洲三级电影| 成人一区二区三区视频| 日韩一区二区三区电影在线观看| 亚洲欧美区自拍先锋| 高清成人在线观看| 久久视频一区二区| 美女视频一区二区三区| 日韩欧美一区二区视频| 久久激情五月激情| 日韩欧美aaaaaa| 国产成人精品网址| 国产精品麻豆久久久| 色琪琪一区二区三区亚洲区| 亚洲午夜在线视频| 欧美午夜在线观看| 视频在线观看91| 久久―日本道色综合久久| 国产不卡高清在线观看视频| 久久久久久一二三区| 国产白丝精品91爽爽久久| 亚洲男人的天堂在线观看| 欧美日韩精品一区二区| 麻豆91精品91久久久的内涵| 欧美国产日韩一二三区| 91国在线观看| 久久不见久久见免费视频1| 自拍偷拍欧美激情| 欧美一区二区三区白人| 91在线播放网址| 紧缚奴在线一区二区三区| 日本一区二区三区国色天香| 97超碰欧美中文字幕| 欧美日韩一区二区三区四区| 亚洲一区二区在线观看视频 | 一本在线高清不卡dvd| 日韩电影免费一区| 有坂深雪av一区二区精品| 日韩欧美中文一区二区| 在线视频国内自拍亚洲视频| 国产成人亚洲综合a∨婷婷| 麻豆国产欧美一区二区三区| 一区二区三区中文字幕电影| 国产精品免费免费| 国产日韩精品一区| 国产精品色哟哟| 国产精品成人网| 综合av第一页| 亚洲男人天堂一区| 一区二区三区在线视频观看58| 精品成人一区二区三区| 日韩免费一区二区| 欧美精品一区男女天堂| 久久久久久99久久久精品网站| 久久综合色8888| 国产夜色精品一区二区av| 国产日韩欧美精品综合| 国产精品福利影院| 亚洲一区二区3| 黄页视频在线91| 91色porny| 精品国产一区二区三区忘忧草| 制服丝袜亚洲播放| 久久精品一二三| 亚洲精品视频观看| 免费人成网站在线观看欧美高清| 精品无码三级在线观看视频| 成人av小说网| 精品美女在线播放| 亚洲免费在线播放| 久久99精品久久只有精品| 91免费版在线| 久久久99精品免费观看| 亚洲一区二区三区美女| 粉嫩13p一区二区三区| 欧美日本国产视频| 日韩美女精品在线| 不卡视频在线观看| 国产蜜臀av在线一区二区三区 | 欧美成人性战久久| 一区二区三区精品在线| 99久久久久久| 亚洲天堂免费看| 99久久综合国产精品| 亚洲国产激情av| 色欲综合视频天天天| 最新不卡av在线| 色诱亚洲精品久久久久久| 国产精品久久久久久久久快鸭| 国产成人精品免费| 国产精品动漫网站| 色婷婷av一区二区三区大白胸| 亚洲综合在线视频| 宅男噜噜噜66一区二区66| 精一区二区三区| 国产精品久久久久三级| 欧美日韩一区二区不卡|