存档
Java数据库连接(JDBC)由一组用 Java 编程语言编写的类和接口组成。JDBC 为工具/数据库开发人员提供了一个标准的 API,使他们能够用纯Java API 来编写数据库应用程序。然而各个开发商的接口并不完全相同,所以开发环境的变化会带来一定的配置变化。本文主要集合了不同数据库的连接方式。
一、连接各种数据库方式速查表
下面罗列了各种数据库使用JDBC连接的方式,可以作为一个手册使用。
1、Oracle8/8i/9i数据库(thin模式)
Java代码
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
String url="jdbc:oracle:thin:@localhost:1521:orcl"; //orcl为数据库的SID
String user="test";
String password="test";
Connection conn= DriverManager.getConnection(url,user,password);
2、DB2数据库
Java代码
Class.forName("com.ibm.db2.jdbc.app.DB2Driver").newInstance();
String url="jdbc:db2://localhost:5000/sample"; //sample为你的数据库名
String user="admin";
String password="";
Connection conn= DriverManager.getConnection(url,user,password);
很早的一篇文章了,2006年7月。算是sybase自吹自擂的,但也给sybase-dba稍微一些信心。
15 reasons why Sybase will be in your future
--01 July 2006
I've heard Sybase is facing difficulties. What do you think Sybase will become? What will happen to its software?
Is it a right moment to get into Sybase?
> EXPERT RESPONSE
There are many reasons to use Sybase products
I would go for Sybase since it has a well-established and skilled workforce, both in the infrastructure and development teams who are fully familiar with the Sybase range of products
Applications developed using Sybase have now been running for a while. They provide adequate service to the business community. There is absolutely no guarantee that migrating these applications to other DBMS, such as Oracle, will result in the same level of service and, consequently, the business will not suffer. Additionally, there has been no known, published case where a migration from Sybase to Oracle or otherwise has resulted in a noticeable performance gain
Sybase products are generally perceived within the DBA community to be very reliable and easier to maintain, compared to peers like Oracle.
Any move from Sybase to other DBMS have got to be justified in terms of the current level of dissatisfaction with Sybase and the level of desire to use other. In the investment banking arm, neither of these conditions prevail and I cannot recall anywhere else this is valid.
The exit barriers from Sybase and the entry barriers to others are high. For a medium-to-large application, it will take an average of ten years for investment for ROI. A simple cost/benefit analysis will verify this statement.
Sybase enjoys a far more favourable Total Cost of ownership (TCO) compared to Oracle.
Following TCO, on average, based upon experience in the City, one requires 2.5 Oracle DBAs to provide the same level of service as a single Sybase DBA.
Sybase is fairly modular with a simpler syntax. This needs to be contrasted with what Oracle offers. In most cases with Oracle, you require a third-party product to allow the DBA to reduce his/her workload. Perhaps that may be a reason why TOAD, a non-Oracle product, is the most popular GUI interface for Oracle!
The majority of complex trading systems of bank use sophisticated replication technology to provide publisher-subscriber or peer-to-peer replication. At this juncture, none of the competitors, including Oracle, can provide the same degree of functionality that Sybase Replication server provides. This will expose banks to unnecessary risks. Buying third party products, such as Golden Gate etc., will add additional complexity, dependency on multiple vendors and cost.
Linux is becoming an ideal and cost-effective platform for the development teams and small- to medium-sized companies. With the availability of heterogeneous dump and load of Sybase databases across different operating systems, Sybase, by virtue of its modularity and ease of use is an ideal DBMS for Linux. This needs to be contrasted with Oracle which is, pound for pound, a far heavier beast and resource hungry.
The latest Sybase flagship product, ASE 15, has filled much of the perceived functionality gap between ASE and others if there was any. ASE 15 also provides additional functionalities that others do not offer. It is also debatable how much this functionality that other RDBMS claim to have and ASE not, are practical as opposed to being over-engineered and esoteric. An example would be Oracle functionality claims.
The future of Sybase is secure. More than half of Wall Street runs on Sybase. Since Sybase arguably provides the most secure database (please read articles on security issues with regard to Oracle and Microsoft), it is a favourite with the US Dept. of Defense and CIA.
SAP's release of its lightway product for Sybase on Linux and IBM's steps towards selling their line of P5 Linux servers with ASE, while they have DB2 and Informix themselves, are pretty strong statements about the future of Sybase.
Sybase realizes the importance of financial services as its prime market. Thus, it works closely to react to banks' requirements whereas with Oracle and Microsoft, despite the size of banking organizations, they are to some extent "just another customer." This is one reason why Sybase is reacting quickly in bringing the security features required by the investment banking customers, such as extensive Kerberos support, programmable authentication and data encryption to the market..
Also it is worthwhile noting that that several major financial institutions have switched Sybase from SELL or HOLD to BUY. This cannot be proved openly, because these customers' names are confidential - but it is true.
全球领先的企业级与移动软件公司Sybase, Inc. (NYSE: SY) 近日宣布已与Aleri Inc. 正式签署资产购置合同,此举将帮助Sybase公司扩充实力,以满足金融服务等机构要求进行实时分析处理的需求。Aleri 是企业级复杂事件处理(CEP)技术与基于CEP技术解决方案的领军企业。
“通过此项交易,Sybase成功跻身为CEP领域的领头羊。通过增加流动性风险管理和业界领先的流动性管理组件,我们强化了我们的实时分析平 台”,Sybase高级副总裁及首席市场官Raj Nathan博士说道,“客户期望Sybase能够提供多样化分析投资组合以满足其日益增长的需求,我们正朝着这个方向努力”。
CEP是实时分析不可分割的一部分。通过此次收购,Sybase强化其总体分析平台并稳固了其领先地位,以便更好地满足需进行实时分析处理企业 的需求。
“Sybase开发资源融入Aleri平台将加速创新进程,从而促使CEP引擎增加新的特性,” Sybase研发副总裁(Aleri前任首席技术官及研发副总裁)Jerry Baulier说道,“此外,Aleri客户可以从Sybase全球客户支持机构所提供的全方位服务中受益”。
据Forrester研究公司的报告,“Aleri平台是由强势策略支持的优质产品。” 2009年8月4日,Forrester研究公司刊登名为《Forrester Wave™: 复杂事件处理(CEP)平台》(Q3 2009)这一报告,其中Aleri被列为CEP领域杰出的领军企业。如欲查阅完整的报告,敬请浏览网站www.forrester.com 。
同时,Aleri还是首家获准作为安全技术评估中心基准(STAC-certified)的CEP厂商。
目前尚未公开交易条款,Sybase不期望此项交易对2010年财务成果产生任何实质性的影响。
关于 Sybase
Sybase是全球领先的企业级和移动软 件公司,致力于信息的管理、分析和移动。在所有主要的系统、网络和设备上,我们都是全球公认的在数据密集应用领域有杰出的性能表现的领导者。Sybase 的信息管理、分析和企业移动解决方案已经为全球的金融服务、通信、制造和政府等的业务关键系统提供强劲动力。欲了解更多信息,请访问:http://www.sybase.com 并阅读Sybase博 客:http://blogs.sybase.com。
关于 Aleri
Aleri 致力于提供Continuous Intelligence™相关工具及解决方案,以便企业即时洞悉环境变化并迅速做出明智的商业决策。该方案核心为Aleri CEP技术,特为高速实时数据流分析而设计,配有快速应用开发与部署的工具。Aleri以CEP为所有解决方案的核心,提供了一系列常见商业问题的解决方 案。2008年3月,Aleri 与另一家CEP技术领军企业 Coral8合并,以便在瞬息万变的商业环境中,在连续智能和业务敏捷领域提供全套的工具及解决方案。Aleri成立于1999年,其总部设立在芝加哥, 且交易时该公司为私营性质。