Interbase 入门

与桌面型数据库(相对真正的数据库而言,其时应该叫数据表)不同的是,Interbase数据库只存在一个以 .GDB 为扩展名的“大文件”,此文件将所有的数据表、索引、存储过程、视图、触发器、异常等“打包”在一起。这样的数据库对数据的维护与备份等都大大简化。

要创建一个数据库,首先你得先安装Interbase,以下的讨论都以Interbase 6 版本进行讨论,没有Interbase 6 的,请在本站的软件下载栏内或到相关数据站点下载一个Interbase 6 进行安装。Interbase 6 的默认安装路径为“C:\Program Files\Borland\InterBase”。
打开“开始”->“程序”->“Interbase”->“IBConsole”。
你就会看到IBConsole的操作主界面:
操作步骤如下:
1:数据库服务器登录。
A:双击 Interbase Servers 或选中 Interbase Servers 按鼠标右键选中 Register 菜单,打开 Register Server and Connect 窗口。
B:如果是登录到本地,在 Server Information 页面内选择 Local Server。在 Login Information 页面内录入你的用户名及正确的密码。Interbase 的默认用户名为 SYSDBA ,密码为:masterkey (注意密码大小写敏感)。
C:如果你是登录到远程服务器上,请在 Server Information 页面内选择 Romote Server ,与 Local Server 不同的是,此页面内的 Server Name ,Netword Protocol,与 Alias Name 变为可选,要求用户填写。(如:Server Name 设为 3hsoft。Network Protocol 选择 TCP/IP,Alias Name 我们设为 Test。)其中的 Login Information 页面内的操作同以上 B 。
2:创建数据库A:按以上的步骤成功登录到服务器后,打开 IBConsole 内的左边窗口的 Local Server (假定我们是以本地服务器的方法登录)。
B:选中其中的 Databases 选项,按鼠标右键,出现 Register 与 Create Database 两个选项菜单,因为我们在这里是创建数据库,因此我们选择 Create Database 菜单,弹出 Create Database 窗口。
C:在 Create Database 窗口中的 Alias 内填写数据库的别名。如:Test
D:在 File(s) 页面下的 Filename 内填写你要创建的数据名,此数据库名必需含正确的路径。如:(E:/3hsot/Application/Book/Test/ExtraData/Test.gdb。)
E:如果是在网络上创建一个数据库,你还得加上服务器的名称。如:3hsot:G:\Application\Book\Test\Test.gdb。不同的通信协议,书写方式略有不同。a:TCP: 服务器名称:路径
b:NetBEUI: \\服务器名称\路径
c:SPX: 服务器名称@路径
【注】
这里的路径是指服务器的绝对路径,并非是通过本地 PC 对服务器的映射路径等。很多初学者在与 Interbase 的服务器并行连接时,就是路径这儿(同时也决定通信协议)出错。F:Options的选项a:选择 Page Size 大小,一般选择 4096。Page Size 的大小有时直接影响数据库的存取速度。
b:设置 Default Character Set,此项设置数据库的默认语言字符,一般设为None就可以了。
c:设置 SQL Dialect。 如果你要创建的数据库需要与旧版的 Interbase 兼容的话, 请将其值设为 1 。 相反, 请设置为 3 。
G:单击“OK”按钮,搞定。
H:当然,你也可以利用命令行的方式来创建数据库,但这要求对 SQL 语句比较熟练,如要创建上面一样的数据库,打开 Interactive SQL 窗口,书写如下语名并执行即可:CREATE DATABASE ?E:/3hsot/Application/Book/Test/ExtraData/Test.gdb? PAGE_SIZE 4096;在后面的章节中,我会专门讨论 Create Database语名的一些使用方法与技巧。
3:回到IBConsole主窗口,你就可以看到你刚才创建的数据库 Test 了,但里面内容为空,因为你还没有创建表、视图、存贮过程等,这只是开了一个头,但愿是一个好头。


README FOR INTERBASE 5.6 Online documentation and Release Notes For a description of new features and changes in InterBase 5.6, use Acrobat Reader to view the ReleaseNotes.pdf file. In addition, the complete 5-volume document set for InterBase 5.5 is available in PDF format with InterBase 5.6. Use Adobe Acrobat Reader 3 to view these PDF files. To take advantage of the full-search indexing for the document set, you need Acrobat Reader 3.0.1 (or later) With Search. This version of Reader is included on your InterBase 5.6 CD-ROM. You can also download it from http://www.adobe.com/prodindex/acrobat/readstep.html If you go directly to this Adobe site, be sure to download the version "With Search", not the plain version. ACCESSING THE DOCUMENT SET: You can open any of the books directly from the InterBase folder in the Start menu if you have Acrobat Reader already installed and the PDF extension is associated with Acrobat Reader. To access the books from the Help menu in Server Manager, choose InterBase Help and choose the book you want from the "InterBase Books Online" section. ________________________ Uninstalling InterBase 5.6 The Windows InterBase installation allows you to choose between performing a complete install or selecting individual components. If you install a subset of the components, you can run the install again later to add more components. However, when you uninstall, only the components that you installed the last time are removed. ------------------------------------- Copyright (c) 1999 Inprise Corp. All rights reserved.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值