我应该使用哪个数据库 [英] which Database should i use

查看:67
本文介绍了我应该使用哪个数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经为学者制作了密码加密软件项目..

现在我想将输入的密码和用户名保存在数据库中..

如果项目是用Java编码的,我应该使用哪个数据库.

还有什么是jdbc,以及如何在项目中使用jdbc..

请帮忙....注意:我们无法使用MS-ACCESS
----------------------------------------------
现在,我正在使用Oracle 10g XE Express Edition作为数据库..

但是我面临着连接数据库的问题.

设置路径:-c:\ jdk1.5.0 \ bin; f:\ oraclexe \ app \ oracle \ product \ 10.2.0 \ server \ BIN
设置类路径:-f:\ oraclexe \ app \ oracle \ product \ 10.2.0 \ server \ jdbc \ lib \ ojdbc14.jar

但是我没有安装哪种类型的oracle驱动程序,是OCI还是THIN ..所以我尝试了两种代码..
--------------------------------
使用Thin驱动程序连接

I have made password encryptor software project for academics..

Now i want to save those entered passwords with usernames in database..

Which database should i use if project is coded in java..

also what is jdbc and how can we use jdbc in our project..

please help.... NOTE: we cannot use MS-ACCESS
----------------------------------------------
Now I am using Oracle 10g XE express edition for database..

But i am facing problem of connecting to database..

Path is set:- c:\jdk1.5.0\bin;f:\oraclexe\app\oracle\product\10.2.0\server\BIN
Classpath is set:- f:\oraclexe\app\oracle\product\10.2.0\server\jdbc\lib\ojdbc14.jar

but i don''t which type of oracle driver is installed is it OCI or THIN.. so i tried both codes..
--------------------------------
Connecting using Thin driver

import  java.sql.*;

public class OracleThinConnection
{
 public static void main(String args[])
 {
  try
  {
   // load oracle driver
  Class.forName("oracle.jdbc.driver.OracleDriver");
  // connect using Thin driver
  Connection con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","hr","hr");
  System.out.println("Connected Successfully To Oracle");
  con.close();
  }
  catch(Exception ex)
  {
    ex.printStackTrace();
  }
 }
}
---------------------------------------------
Connecting to OCI driver

import  java.sql.*;

public class OracleOCIConnection
{
 public static void main(String args[])
 {
  try
  {
   // load oracle driver
  Class.forName("oracle.jdbc.driver.OracleDriver");
  // connect using Native-API (OCI) driver
  Connection con = DriverManager.getConnection("jdbc:oracle:oci8:@","hr","hr" );
  System.out.println("Connected Successfully To Oracle using OCI driver");
  con.close();
  }
  catch(Exception ex)
  {
    ex.printStackTrace();
  }
 }
}


-----------------------------------------------


-----------------------------------------------

推荐答案

这取决于您,取决于许多因素.您应该学习它并根据您的标准做出决定.是的,Access不是基于客户端-服务器模型的数据库,因此,它不适用于许多目的.

您可以根据以下比较表做出决定:
http://en.wikipedia.org/wiki/Comparison_of_database_tools [ http://en.wikipedia.org/wiki/JDBC [ http://en.wikipedia.org/wiki/JDBC_driver [ http://docs.oracle.com/javase/7/docs/ [ http://docs.oracle.com/javase/7/docs/technotes/guides/jdbc/index.html [ ^ ],
http://www.oracle.com/technetwork/java/javase/jdbc/index.html [ ^ ].

另外,请检查以下列表:
http://developers.sun.com/product/jdbc/drivers/ [
This is up to you and depends on many factors. You should learn it and make a decision based on your criteria. And yes, Access is not a database based on client-server model, so, it''s not suitable for many purposes.

You can make your decision based on this comparison table:
http://en.wikipedia.org/wiki/Comparison_of_database_tools[^].

You need to consider first of all: open-source or proprietary, license, supported platforms, availability of JDBC connectivity/adapter and then the features.



In response to the follow-up discussion:

For JDBC, please read:
http://en.wikipedia.org/wiki/JDBC[^],
http://en.wikipedia.org/wiki/JDBC_driver[^],
http://docs.oracle.com/javase/7/docs/[^],
http://docs.oracle.com/javase/7/docs/technotes/guides/jdbc/index.html[^],
http://www.oracle.com/technetwork/java/javase/jdbc/index.html[^].

Also, check with the list:
http://developers.sun.com/product/jdbc/drivers/[^].

—SA


要了解有关JDBC的信息,请参阅Wikipedia文章 http://en.wikipedia.org/wiki/Java_Database_Connectivity [ ^ ]

如果可以的话,我会认真看一下SQL-Server,它是免费的,只要只有几个连接即可.有很多免费选项.转到 http://en.wikipedia.org/wiki/Microsoft_SQL_Server . SQL-Server在Visual Studio上可以很好地工作.
To find out about JDBC look at the Wikipedia article http://en.wikipedia.org/wiki/Java_Database_Connectivity[^]

If you can, I would seriously look at SQL-Server, which is free as long there are only a few connections. There are quite a few free options. Goto http://en.wikipedia.org/wiki/Microsoft_SQL_Server. SQL-Server works very well with Visual Studio.


您当前正面临Oracle数据库-这是必需的吗?

Java与名为 Derby [
You are currently facing Oracle Databases - is that needed?

Java works fine with a small open source database called Derby[^]. Benefit is, that the user is not able to see that database at all, so you have the full control. It works fine with JDBC and is super easy to use.


这篇关于我应该使用哪个数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆