Results 1 to 7 of 7
Like Tree1Likes
  • 1 Post By Eranga

Thread: Choosing db option

  1. #1
    Levian is offline Senior Member
    Join Date
    Jun 2011
    Posts
    109
    Rep Power
    0

    Default Choosing db option

    Hi,

    I'm making a program again...but this time there will be no server as the data should be placed on the client itself, another to consider is that the data will be quite big...though I think of cutting it into tables still 1 table will consist of at least few thousand records...will be much larger if it were to be combined into 1 table.

    So I wonder what options do I have for the database...some suggested to record in txt file, while with the daily experience I think it maybe possible to use dbf file...both however I have no clue to start it out (have a feeling that this may have to do with java.io...at least for the txt part).
    Could someone please share something on these or maybe if there's another options to use ?



    Thanks in advance,
    First is to make something usable, next is to aim for perfection which means a never ending improvements.

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

    Default Re: Choosing db option

    Database full of tables and records with indexing the best option I recommended.
    Tolls likes this.

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,442
    Rep Power
    18

    Default Re: Choosing db option

    JDBC to a database.
    Since it's single client then you probably want to look at an embedded one. A Java-based db would be platform independent.
    A few thousand rows is not that many.
    Of course it all depends on exactly what it is you are going to be doing with this app.
    Please do not ask for code as refusal often offends.

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

    Default Re: Choosing db option

    Quote Originally Posted by Tolls View Post
    Of course it all depends on exactly what it is you are going to be doing with this app.
    Exactly!

  5. #5
    Levian is offline Senior Member
    Join Date
    Jun 2011
    Posts
    109
    Rep Power
    0

    Default Re: Choosing db option

    Thanks for the replies,
    I'm still a bit confused on this...java-based db ? and with indexing ?

    When I saw tables and indexing...it seems like dbf, but further reading...I feel lost.
    Sorry if it's quite a noob question, but in fact, it is...so, I appreciate if I can get a little more detail on this.



    Thanks in advance,
    Last edited by Levian; 03-08-2012 at 09:18 AM.
    First is to make something usable, next is to aim for perfection which means a never ending improvements.

  6. #6
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,442
    Rep Power
    18

    Default Re: Choosing db option

    An index is a DB thing.
    You create an index on column(s) of a table which allow the database engine to utilise them for faster access to rows.
    eg
    Java Code:
    SELECT * FROM sometable WHERE somecolumn = 123
    If 'somecolumn' has no index associated with it then the database would have to do a full table scan to find the relevant row.
    With an index it could access the index and narrow down the rows to search quite dramatically. Think HashMap.

    As for Java-based database, I simply put that foward if you wanted your app to work everywhere with the minimum of extra setup. A Java-based database (eg Derby/JavaDB) can be deployed with your app without worrying whether the underlying system is Windows or Linux or whatever.

    But, again, this all depends on what your app is for. There is no One-Size-Fits-All for this question. If there was, there's be only one database available.
    Please do not ask for code as refusal often offends.

  7. #7
    Levian is offline Senior Member
    Join Date
    Jun 2011
    Posts
    109
    Rep Power
    0

    Default Re: Choosing db option

    Thanks, I'll look on that JavaDB again later and maybe some other embedded-db if there is.
    First is to make something usable, next is to aim for perfection which means a never ending improvements.

Similar Threads

  1. Need guidance in choosing the appropriate technology
    By mstaszew in forum Enterprise JavaBeans (EJB)
    Replies: 1
    Last Post: 10-20-2011, 05:25 AM
  2. Choosing Boosting in Lucene
    By cristh in forum Lucene
    Replies: 0
    Last Post: 04-16-2011, 02:18 AM
  3. Need advise for choosing book
    By Teodor__b in forum New To Java
    Replies: 2
    Last Post: 02-19-2010, 01:13 PM
  4. Replies: 1
    Last Post: 10-24-2009, 03:10 AM
  5. Choosing a degree concentration
    By xcallmejudasx in forum Jobs Discussion
    Replies: 11
    Last Post: 08-14-2009, 11:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •