MariaDB in this. I could use MySQL but ever since Oracle took it over, I've been slightly uncomfortable in using/recommending it. Besides, MariaDB is a drop-in replacement, so any code you wrote (or will write) for MySQL will be OK with a MariaDB database.
As not to be bogged down by database design details, we'll just have a 1 table database for Contacts.
As for our management tool, we will be using Netbeans. Yes, Netbeans. (I'll let that sink in.)
You can manage your MariaDB database in Netbeans just by registering it and running queries against it. And it does have a few GUI features like a 'Create-Table' wizard. To register your MariaDB database(I'm assuming that you have Netbeans and MariaDB installed already) do the following:
- Download the java-client driver
- In Netbeans, go to the "Services" tab, right-click on it and select "New Connection"
- Pick new driver
- On the new window, locate the java-client driver you just downloaded
- Set the driver class to:
- Pick a name for this new connection
You should be then able then to connect to your MariaDB instance. To test, try executing the command:
create database tangledb;
That should execute without a problem. As for creating a "Contacts" table, that should be fairly straight-forward. Just open up the new tangledb database and on the table folder, right-click and add new table.
- id (integer, pk)
- firstname (varchar(50), nullable)
- lastname (varchar(50), nullable)
- nickname (varchar(50), not nullable)
- birthday (date)
- mobile (varchar(15), nullable)
- landline (varchar(15), nullable)
- e-mail (varchar(150), nullable)
Click OK and there you have your MariaDB database.