I've been provided a Dbase file (.dbf) and have been asked to implement a parser to load the data into an Oracle DB. The only available tools I have on hand are Java 8 and Oracle PL/SQL. Having never written a parser or dealt with this data format before, I'm completely lost as to how to go about the whole thing. Any help or guidance would be most appreciated.
Thank you,
Asked
Active
Viewed 1,524 times
1

Debojit
- 568
- 1
- 10
- 24
-
1See if you can find a JDBC driver for dBase. – Bob Jarvis - Слава Україні May 22 '19 at 03:14
-
Is this a one off process or are you going to be provided this file on a regular basis for processing? If it is a one off then Microsoft Access is able to import from a .dbf file. I know you said you only had Java and Oracle but people often overlook access, once in a access format you can then export to CSV or use a JDBC connection for access (might be easier to find than one for dBase). – Shaun Peterson May 22 '19 at 04:23
-
@ShaunPeterson This is going to be part of a regular load, I'm afraid. We're going to be provided a DBase file on a daily basis, and we'll have to load the data into a staging table on Oracle for further processing. – Debojit May 22 '19 at 05:55
-
OK I have no experience doing this myself.... But my usual goto location for anything like this is asktom. oracle.com.... He has an example based in oracle 8, but by the looks of it people have contributed updated version for newer versions of oracle. Can not testify to how good this is (hence not putting it down as an answer).... but https://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:711825134415 may give you a good start. – Shaun Peterson May 22 '19 at 06:12
-
1I had a look at that one, actually. It runs without an error, but the results are blank, as in it can read the file, but not parse it. I'm going through it again now, but this looks like it'll take some time to make sense. I was just hoping that there would've been a better solution in the last 19 years :) – Debojit May 22 '19 at 06:30
-
Possible duplicate of [What is the best opensource dbf driver for java?](https://stackoverflow.com/questions/8064937/what-is-the-best-opensource-dbf-driver-for-java) – Oleg May 22 '19 at 06:53
-
@Oleg I'm afraid that throws an ecxeption `Exception in thread "main" java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver`. And on further reading, it seems that Odbc support has been removed from Java from Java 7. – Debojit May 22 '19 at 07:09
-
try https://stackoverflow.com/q/22984438/1398418 – Oleg May 22 '19 at 07:12
-
@Debojit I am very interested in this answer. I have posted somewhat of a more detailed approach in seeking answers regarding dbf files. https://stackoverflow.com/questions/56283826/how-does-one-find-out-how-a-dbf-file-or-any-file-is-formatted?noredirect=1#comment99181616_56283826 – Code Novice May 23 '19 at 23:10
-
https://www.clicketyclick.dk/databases/xbase/format/ – Code Novice May 23 '19 at 23:20
1 Answers
0
After tearing my hair out for some time, I think I've finally found an answer. Seemed a little crass to answer my question myself, so I posted it here: https://stackoverflow.com/a/56303353/1148258
Hope it helps anyone else looking for similar answers.

Debojit
- 568
- 1
- 10
- 24
-
I do this often actually! I find that I come up with my own answer after posting as I usually continue to work on my issues while hoping somebody else already has the knowledge I'm seeking. – Code Novice May 25 '19 at 15:45