do I need to install sqlite software to connect in java? - java

To make connection to sqlite database and do some transaction, is it mandatory that a database software should be installed in the machine. I have seen that some libraries just handle connection and transactions without even database software. Or did I miss to notice that there were some database is already installed? How does the connection mechanism works?
A link to good article with detailed explanation would help me!
Thank you.

There are 2 options:
Use your DB locally:
For this you will need to install SQLLite on your machine, and in your project use JDBC jars for the connections from your java project to the DB. You may send queries to the DB as a string like "SELECT XXX FROM YYY WHERE a>b" or use Object Relational Mapping (ORM) tools like Hibernate.
If you have a remote DB installed on a VM on some cloud for example, then you don't need to install any DB on your local computer. But you will still need to use JDBC for connection.

You need Jdbc driver only or you can use ORM like hibernate.
Youtube has many tutorials about java and databases:
https://www.youtube.com/results?search_query=java+database+tutorial
If you are a begginer, start with jdbc with sql queries, later you should start using ORM's.
Probably you need to install mysql server or use this website https://www.elephantsql.com/ to get database instant.

Related

Configuring database to connect 21c XE with primavera p6

I trying to connect primavera p6 to express edition 21c
1- XE db had been installed
2- started to configre db using "dbsetup" script
3- I got an error which show in the below image
Please if anyone have any help kindly share with me
When you configure a tool to setup some objects/users/etc in the database, it is going to ask you for database connection settings.
For XE, we have what is called a "multi-tenant" configuration, which means there is a "root" or "container" database that is generally not for use by end users, and one or more "pluggable" databases, into which you would configure your users etc.
The root database is called XE and the pluggable database is called XEPDB1, unless you didnt use the defaults.
Thus for Primavera you should nominate XEPDB1 as the database to install into. If you choose to install in "XE", then since this is the container database, there are rules as to what the users must be named, which is why you're getting this error. Switch to installing into the pluggable database and you should have more success.

Can I use Neo4j BI Connector with my Java app?

Neo4j have recently added a BI connector tool (neo4j.com/bi-connector) which can return relational data from your graph database to your business intelligence tool such as Tableau. The question is can i send SQL queries to this connector assuming i have added the jar file to my java application class path? If yes, which APIs should i use to send this SQL query to the driver?
I'm using Neo4j4.0.
For neo4j.com/bi-connector, if you look at the document PDF that you get when you download it, on page 10 where they show how to establish a connection you'll see that you get a connection object. After you have that, you have a standard JDBC connection which is a Java interface that tells libraries how to talk to a SQL database. There are a lot of different tools that use this interface, it's kind of user preference. A common one is JOOQ.

Java API to connect to any kind of database(oracle, mysql, mssql, db2, h2 etc...)

I have a typical requirement from my client. There will be several types of databases that I need to connect to and collect some data from them and invoke a webservice with collected data. He will provide all datasource configurations to connect to respected database. based on datasource I need to figure out which database it is and need to prepare a connection management to connect to respected database.
Before hand, I would like to know, Is there any off the shelf API that could suite my requirement. I googled but no luck and hence landed here to post query. Suggestions are invited.
With Java Database Connectivity (JDBC) you can connect to any of the above databases, and there are open source drivers for those and many more.
Here's an example of using JDBC with MySQL. You use the same method to connect to any datasource with a given JDBC driver.

Desktop app with local and online database

I want to create a Desktop App(Software), preferably in Java, which connects to a central MySQL DB on a local network whenever available.
I also want it to store and use a copy of the same DB when the central DB is not available, and sync whenever the central DB is available.
How can I store data locally, I mean which kind of database should I use for local database?
Also, are there any tools which speed up the Desktop App development?
Let's suppose that you will implement your solution in Java. You will need some classes (i.e. Data Access Obejcts, DAOs) in charge of interacting with the database on the network and on a file based database embedded in the application (the "local" database).
What you need:
A local database that you can ship with your application like H2 www.h2database.com, HSQLDB http://hsqldb.org/ or Derby db.apache.org/derby/.
To develop your DAOs (using JDBC or Hibernate) in such a way that you can instantiate them with different drivers, URLs, login/pwd and use only SQL standard / functions supported both by MySql and by the local DBMS. In practice you must avoid using DB specific functions.
You can use Hibernate or JPA for example, they have quite a nice and easy integration with your application.

Java Database with PHP support

I'm looking for a java database server that has support for database to be shared and opened from a PHP web application and a java application simultaneuosly.
I found Apache Derby and H2 Database but they don't have a clear support for PHP application.
Please suggest.
It must be a Java Database Server, since we are planning that we may have to distribute the applications to customers, so we need something portable and redistributable.
Most popular databases have drivers for PHP and for Java.
They also support concurrent connections. Choosing something like SQL Server, Oracle, MySql, Postgres will work just fine.
MySQL might work fine for you. I've used it myself in projects where I both need to access it from java and PHP.

Categories

Resources