Ask Your Question

Program using database [closed]

asked 2017-08-27 14:56:39 +0100

MessyDrew gravatar image

updated 2020-10-13 22:08:15 +0100

Alex Kemp gravatar image

I'm a beginning programmer, using Java to build my first real program. With this project, I plan on starting fairly small and building it into, eventually, a full-fledged Android app that I can market. Because my idea for the app in its final stages is a lofty goal, I intend to learn a lot as I go.

In its initial stages, where I am now, I could do all that I need using LibreOffice Base and have a working foundation upon which to build. Once I'm making the smartphone app further down the road, I will need to incorporate Java so that it can run successfully. My question therefore is thus: should I incorporate Java, using an Oracle-built API included in the Java Development Kit (JDBC), to facilitate this as early as possible? I could theoretically build the first version in Base alone using the built-in tools for queries and forms, or I could use the API to do this using Java to make the necessary forms and the API for queries and access to information stored in the .odb file.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2020-10-13 22:08:23.221263

1 Answer

Sort by » oldest newest most voted

answered 2017-08-27 18:37:19 +0100

Ratslinger gravatar image

Your question in the end may have little or nothing to do with LO Base. It is worth repeating here, Base is NOT a database. Base is a front end to databases. LO ships with the HSQLDB embedded database but you can use a variety of databases instead. In fact, it is preferable to not use the embedded DB with large or critical data as there is the possibility of data corruption.

To use Base, Java RunTime Environment (JRE) must be installed. Depending upon usage the Java Development Kit (JDK) might be necessary. JDK includes JRE. The Java DataBase Connector (JDBC) packaged with HSQLDB, is for connection between an application to the HSQL database. You must use a connector which is designed for the database you are using. If using a different database, a different connector is necessary. There are also different types of connectors - JDBC, SDBC and ODBC.

So back to your question. If the end result, as stated, is that you are creating your own forms and storage for SQL (queries), then it is not apparent as to what else you would be accessing in the .odb as the only other contents not related to the database itself would be reports. Starting with Base will probably give you the background necessary for you to create whatever application you have conceived but probably will provide little basis for the resulting application.

edit flag offensive delete link more


Thanks for your input, hopefully the following clears things up a bit;

The tables are built and filled in as much as possible without the user's input. The next step is to build the queries to manage the input and fill in a few remaining fields.

I have someone helping me who has experience with databases and SQL, but we are trying to determine if the queries should be made in Base and SQL alone, or if using JDBC and Java instead of the built-in tools in Base would be a better option.

MessyDrew gravatar imageMessyDrew ( 2017-08-27 21:34:14 +0100 )edit

No, this still shows no need for Base at all. I can do all that from code - Python for example. Create & fill tables, run SQL, display data. Again, Base only provides an interface between user & DB. If you are writing/designing your own forms/displays, you don't need Base. Also, JDBC is a connector - only used to connect application to DB. The benefit to using Base is the forms & controls already available. The rest is bells & whistles.

Ratslinger gravatar imageRatslinger ( 2017-08-27 21:48:02 +0100 )edit

Just another comment. Queries & SQL are the same thing. A query is nothing more than an SQL Select statement. For all that it matters, queries/SQL can be stored in a text file or a record in a table or a variety of other ways & recalled for use at any time.

Ratslinger gravatar imageRatslinger ( 2017-08-27 22:33:28 +0100 )edit

Ok, thank you very much.

MessyDrew gravatar imageMessyDrew ( 2017-08-27 23:44:44 +0100 )edit

Question Tools

1 follower


Asked: 2017-08-27 14:56:39 +0100

Seen: 392 times

Last updated: Aug 27 '17