Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How Derby Store data

 
Abhi Venu
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Hi Mates,

I was trying a example downloaded from web .It is A derby database application.

I could see this code

String userHomeDir = System.getProperty("user.home", ".");
String systemDir = userHomeDir + "/.addressbook";
System.setProperty("derby.system.home", systemDir);

i could see a directory like this was created C:\Users\manu\.addressbook

But when i chek the directory assuming this is the location of the files. I couldnt find any.which is the acataualy physical location of the files?

I could find folders log,seg0 and a properties file which has some DAt files....How is data stored in the case of derby....?


Regards
Abhilash

 
Wendy Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the seq0 directory will get lots of files in it. I have no idea what is in them as they are binary files.
 
Abhi Venu
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Mates,

are these data stored in flat files or it can be read only thru application
 
William P O'Sullivan
Ranch Hand
Posts: 859
Chrome IBM DB2 Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, You want the database engine to manage these files for you.

WP
 
Abhi Venu
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply
Is there any way to BCP data like we do in SQLSERVER....i have 3 files about 20 MB size....but the delimiter here is ~. in some Derby doc it says the delimiter neeeds to be comma....But replacing all
~ with comma wont work for me.. because it needs to be done in a 60 MB file...whats the best work around....
 
William P O'Sullivan
Ranch Hand
Posts: 859
Chrome IBM DB2 Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you trying to convert and input from another source "~" delimited into Derby?

If so, I would NOT attempt to create your own Derby files. There are indexes, system tables etc. hidden deep in their.

I would convert your file, then import it using Derby tools.

WP
 
Abhi Venu
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It work like this a set of files having data...each coloumn in file is seperated by a ~ whic is the delimiter.This acts as the source.

This file needs to be BCP ed into Derby DB... Any way WP
 
Wendy Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Abhi Venu wrote:It work like this a set of files having data...each coloumn in file is seperated by a ~ whic is the delimiter.This acts as the source.

This file needs to be BCP ed into Derby DB... Any way WP


william answered your question in his previous post.
 
Abhi Venu
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

sorry i dint get it earlier Now i got it...

but the conversion process will be time consuming and not a efficient one...i.e replace ~ with , in each of the 20 Mb files...whats the best way to do it
 
William P O'Sullivan
Ranch Hand
Posts: 859
Chrome IBM DB2 Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it a "one off", or multiple times?

Again, If you are converting to a new DB, then bite the bullet.

WP
 
Abhi Venu
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
William P O'Sullivan wrote:Is it a "one off", or multiple times?

Again, If you are converting to a new DB, then bite the bullet.

WP



hai WP can you clarify it a bit...what you meant by new DB?/ also what you meant by "one off"
 
Wendy Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Abhi Venu wrote:
William P O'Sullivan wrote:Is it a "one off", or multiple times?

Again, If you are converting to a new DB, then bite the bullet.

WP



hai WP can you clarify it a bit...what you meant by new DB?/ also what you meant by "one off"


One-off: this means doing something only once, never to be repeated.
new DB: are you migrating to a new Database.
Bite the bullet: it is a horrible job but it has to be done, just get on with it.
 
Abhi Venu
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i still didn't get diff between one time and multiple times..............for a 20 Mb file there may be 10 00 records ie rows...each having abt 7 cols ie 6 delimiters...in each roe the delimiter neds to be replaced....
again this repeats for other two files too... and regarding new DB a new Db needs to be created.....
 
Wendy Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Abhi Venu wrote:i still didn't get diff between one time and multiple times..............for a 20 Mb file there may be 10 00 records ie rows...each having abt 7 cols ie 6 delimiters...in each roe the delimiter neds to be replaced....
again this repeats for other two files too... and regarding new DB a new Db needs to be created.....


once you have converted this file this one time, will you ever have to convert a file ever again? or will that be it job finished?
 
Abhi Venu
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Hi,

My plans are as follows convert the two file(20 Mb) files and load data into DB. after another week i will have anothers set of files.The same process needs to be continued for them too..

File a1.txt -----> gets covereted to B1.txt after replacing the needed delimiter...use B1 data to load tables


Regards
Abhilash
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic