Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 43

Thread: java-database

  1. #21

    Quote Originally Posted by kamsky View Post
    why do you need SAX/XML/Java Object for dictionary?

    how difficult is dictionary with structure such as:

    abacus=a calculator that performs arithmetic

    as simple as ResourceBundle, it's easy. You dont need to have to EventHandler on visiting xml elements/attributes. For sure maps are faster than xml parsing.
    Faster siguro ang maps kay i think iya man i-load sa memory ang mga keys. I am concern here kung dako na kaayo ang data. Just imagine na iyang i-load tanan keys sa memory. I think mopadulong gyud na silay ug parsing sa file if dako na kaayo ang data. Puwede siguro ilang i-follow ang implementation sa lucene.

    In terms pud sa OOP mas maayo XML can be easily map to the Java Objects. I think properties file is not a structured.
    Last edited by eax; 06-28-2009 at 01:00 AM.

  2. #22
    Junior Member
    Join Date
    Jun 2009
    Gender
    Male
    Posts
    478
    Quote Originally Posted by eax View Post
    Faster siguro ang maps kay i think iya man i-load sa memory ang mga keys. I am concern here kung dako na kaayo ang data. Just imagine na iyang i-load tanan keys sa memory. I think mopadulong gyud na silay ug parsing sa file if dako na kaayo ang data. Puwede siguro ilang i-follow ang implementation sa lucene.

    In terms pud sa OOP mas maayo XML can be easily map to the Java Objects. I think properties file is not a structured.
    understand the problem first, how does an XML solve the efficiency and performance? If search for word 'zeta', it will visit all elements to 'a' then 'b' to 'z'. Do you think sax parsing wont load the big files too? They are thesSame crap in terms of performance but still the maps still the easier to implement even with your eyes are closed.

    why do you have java objects to load dictionary? it's keys and value, nothing complex. Save your java/xml to other projects not in this type of problem. "XML is not the silver bullet".

  3. #23
    guys, this is for my project study. I think I will try using property files kay as what kamsky had presented, it's kinda easier to use. haven't used it yet but will try. create man gud ko ug context-driven machine translation bay, then thousands of words akong i-enter sa database including keyboards (1 english word may have at least 5 keywords related to it) and cebuano translations of each of the words in a database. so mao na ngita ko ug lightest file nga pwede nako magamit.

  4. #24
    usa pud bay, due to time constraints, i have no time to study about XML and some stuffs, so the easiest and the most common text file as data bank, the better. thanx guys

  5. #25
    I've been looking for that java book by Deitel at bookstores since late last year but to no avail, bay. will try looking for it again.

  6. #26
    Junior Member
    Join Date
    Jun 2009
    Gender
    Male
    Posts
    478
    Quote Originally Posted by sogate View Post
    usa pud bay, due to time constraints, i have no time to study about XML and some stuffs, so the easiest and the most common text file as data bank, the better. thanx guys
    learning sax and creating handlers is at leat 3 days for you to ramp-up. Learning property files i just 2 hours. That depends on you how fast you are though.

  7. #27
    Quote Originally Posted by kamsky View Post
    this implementation would not be efficient as encart, but if it's homework, this is okey.

    suggestion for the structure would be like this:

    1) master.properties -- holds all the property files
    2) a.properties -- holds all the words as keywords and definitions as values
    ...
    n) z.properties -- holds all the words that starts with z and definitions as values

    so if you search for 'abacus', it starts with a, so you should load a.properties and get the value from the key 'abacus'.

    make sense?

    Yes, make sense . will try this and try to study property files in just 2 hours, as what you've said hehehe

  8. #28
    Quote Originally Posted by sogate View Post
    Yes, make sense . will try this and try to study property files in just 2 hours, as what you've said hehehe
    Just make sure na dili ka maka-generate ug OutOfMemoryException.

  9. #29
    Junior Member
    Join Date
    Jun 2009
    Gender
    Male
    Posts
    478
    Quote Originally Posted by eax View Post
    Just make sure na dili ka maka-generate ug OutOfMemoryException.
    his project is so simple. why insist on memory exception? i doubt he has database of 100 mb cebuano words. you can set your memory pool as 512 mb easily -- memory is so cheap. i am sure most of us has at least 1 GB of ram.

  10. #30
    Quote Originally Posted by kamsky View Post
    his project is so simple. why insist on memory exception? i doubt he has database of 100 mb cebuano words. you can set your memory pool as 512 mb easily -- memory is so cheap. i am sure most of us has at least 1 GB of ram.
    OT:

    Para nako it's not a standard practice siguro na mo-ingon ka ug memory is cheap or upgrade lang ta ug hardware kung maka-encounter na mga in-ana na scenario. I think practice pud ug programming efficiency na dili lang mag-agad sa mga external factors. Especially, kung maka-trabaho na siya ug sa industries na lisud or daghan bureacracy ang pag-upgrades sa hardware and software. If I where him practice optimizing sa mga codes and logics.
    Last edited by eax; 06-28-2009 at 05:39 PM.

  11.    Advertisement

Page 3 of 5 FirstFirst 12345 LastLast

Similar Threads

 
  1. Java database connection question
    By jairoh_ in forum Programming
    Replies: 7
    Last Post: 01-06-2013, 06:19 PM
  2. Need help with my java to database
    By brianegalorio in forum Programming
    Replies: 7
    Last Post: 03-17-2012, 11:57 PM
  3. using java code for database program
    By istoryansucks in forum Programming
    Replies: 8
    Last Post: 07-12-2010, 04:04 PM
  4. java, byte, images, database
    By poymode in forum Programming
    Replies: 12
    Last Post: 09-06-2008, 02:50 PM
  5. Mobile Java Games
    By Nezumix22 in forum Gizmos & Gadgets (Old)
    Replies: 23
    Last Post: 05-06-2005, 05:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top