How should I make a simple database of names? - java

I am currently working on a simple web-based program involving a user typing in a word in a client program(written in Java), and sending the word and other basic information to a database. I am finished with the word typing portion, but I have no idea what to do about the database. What software should I use for the database? Here are the requirements that I need for the database:
Read/Write Functionality
Java compatibility
Easy to use/set up
Has plenty of tutorials/documentation
Thank you all for your help!

It sounds to me that this is either a dev experiment or a school project. If this is something you're playing with I think the easiest/quickest would be to go with Sqlite. Here is some info on using it with Java: Java and SQLite
If it is something you intend to deploy in a production environment then go with mysql and jdbc.

How about sqlite?
Its very simple, extremely well supported and if you need to do some more advanced SQL queries it can do that as well.

I would use MySQL and a JDBC driver for communicating with it. The trick is to Google
java mysql jdbc
That should give a lot of usefull results. Good luck!

If you're just learning about databases and getting started, nothing is simpler than an sqlite database since it's actually nothing more than a static file. Here is a jdbc driver for it: http://www.zentus.com/sqlitejdbc/

Related

Develop a java program on as400 to create xml file from db2

I have some experience with java ee development and some web applications.
Now I have to create a java program on AS400, one I have never heard before. Program is to create xml file from db2.
Do you have any idea how I should approach the development with no knowledge of AS400 and DB2?
I do appreciate any kind of suggestions and help!!!
Well, in general, Java, on IBM i (previously known as AS/400), is java ... and DB2 is accessed via JDBC... so there isn't a whole lot different to consider.
You'll want to get the JT400 library for a JDBC driver. Javadocs for JT400 can be found here.
If you have specific questions, or run into problems, consider subscribing to the JAVA400-L mailing list.

Connecting NetBeans 8.0.2 to Microsoft SQL Server Management Studio

I am working on an app in NetBeans for a class and need the GUI to be able to communicate to a database that I created in Microsoft SQL Server Management Studio. The GUI need to be able to take user information and import it to the database. It also needs to be able to retrieve information from the database for review and editing purposes. I have never used the database before, but was able to teach myself the basics. I am having trouble finding out how to connect the GUI to my database though. Is there an easy way to connect the two? I don't mind learning myself, in fact that would be preferable, but any links or suggestions would be very much appreciated.
There is a tutorial here for connecting to a MySQL database:
https://netbeans.org/kb/docs/ide/mysql.html
Almost everything will be the same with Microsoft, except you will need a different JDBC driver. You might want to practice with MySQL first since it is free. The MySQL driver comes with Netbeans but the Microsoft Driver will need to be downloaded separately. I believe you can get at the following, but I haven't tried it.
https://msdn.microsoft.com/en-us/sqlserver/aa937724.aspx
You add drivers to Netbeans by going to the Services Tab, Right-click on Databases -> New Connection and click the Add button in the dialog.
You will also need to add the driver to each projects libraries.
The general JDBC tutorial is here:
https://docs.oracle.com/javase/tutorial/jdbc/
which covers the common interface between databases.
It is not necessary but it can be useful and or easier to do beans binding between Gui and database.
See this tutorial:
https://netbeans.org/kb/docs/java/gui-binding.html

The derby database

In the IT class room I constantly hear chat about the derby database not being built for netbeans. I write code in java and becuase I am learning to implement databases and I have the oppurtunity to be taught sql code. My question is, is the derby database not meant for netbeans and if not why why? So far it works fine for me. Our education system is a bit out of order so I like to be well informed about things.(You don't have to worry about making sense about the last statement).I use the database for recording details in shop and company scenarios so far. So answer could relate to this.
The Java DB(Derby) database is Oracle's supported distribution of Apache Derby. Java DB(Derby) is a fully transactional, secure, standards-based database server, written entirely in Java, and fully supports SQL, JDBC API, and Java EE technology. The Java DB database is packaged with the GlassFish application server, and is included in JDK 8(except Mac OS X) as well.
There is a whole official NetBeans IDE Tutorial about Working with the Java DB(Derby) Database. Whoever has suggested you those incorrect details,he might not have got to work with Derby Database OR might be a fan of Oracle/MySQL,etc. databases! But,I and all the commentators post suggest you to move frankly with Derby database as there is no such problem!
Also,I am leaving you the official tutorial's link---> Official NetBeans IDE Tutorial on Java DB(Derby) Database

HSQL access from both Java and Ruby?

Is it possible to access a local HSQL database from Ruby as well as from Java? (separately of course, not concurrent) The Ruby SQL toolkit called Sequel, for example, claims to have "adapters" for JDBC, so I think the answer is yes, yes? =)
If the answer is "kind of" or something, is there a better RDBMS that would allow straightforward access from both languages? Ideally I would want support for server-side DB's as well...
Yes, provided that you use the JRuby implementation of Ruby. I've used Sequel with H2 on JRuby - IIRC I just installed Sequel and the h2 gem on JRuby and then specified the database connection as normal.
There is a rubyforge project for an HSQLDB driver. I haven't used it, but it looks like what you're after.
I am not a Ruby programmer so not sure about Ruby. But if there is a JDBC adapter for that database then you should be able to access the database.
If you're using JRuby, you can use all JDBC adapters.

Cheap/free query tool for multi-database Java/hibernate developer

I'm very interesting in inexpensive (better free) SQL query tool for working with multiple databases.
Generally speaking it should works with all databases which Hibernate supports, but it must work with Microsoft SQL Server (2000/2005/2008), Oracle (9i/10g/11g), Postgres 8.x, Sybase, Firebird, MySQL and HSQLDB.
Must have features:
SQL code completion
Syntax highlighting
Nice to have features:
Hibernate integration
Database specific options (like query execution plan)
Not sure if it worth to mentioned, but it will be used together with Eclipse (multiple workspaces).
My favorite is Squirrel SQL. Works well, simple to set up, nice GUI, works with all JDBC databases.
http://squirrel-sql.sourceforge.net/
I really liked SQUrrel until I discovered DBClient THere's also DbVisualizer but it's not free anymore
I'm really surprised nobody mentioned any Eclipse plugins which will fit neatly into your requirements. See my answer to this question. Also, MyEclipse recently released a cool visual query builder which you might want to check out.
i think everyone will give you same solution, squirrel sql ,we are all using same tool =)

Categories