• Post Reply Bookmark Topic Watch Topic
  • New Topic

serialization or persisting into database  RSS feed

 
Ravi Tej Pidatala
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ,

I am working on a project where I need to read all log files from different production instances and find if there has been any exceptions or errors that occured. Currenltly I am reading the log files using java program and persisting the individual logs into database (and show the Exceptions that occured in a particular interval on jsp page on request ) , but there are too many instances that the space on database may not be sufficient . So does java serialization help me in here ? I mean is it a good idea to design in such a way that java would read all the log files and persist the individual log object into .ser file(instead of persisting them into database) ? The number of logs need to be serialized would be more than 10,000 . Can serialization handle it ??


Please suggest me on this .
 
Jeff Verdegan
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's unlikely that what you need to store is too big for a DB but not to big for your file system. The real questions you should be asking when deciding which to use a things like:

Are there many different types of data? If so, you might want a DB with a table for each type.

Are there non-trivial relationships among the data? If so, you might want a DB to help model those relationships.

Do you need to query, update, or delete records based on non-trivial criteria? If so you may want a DB for the ability to express these criteria in SQL?

Or are there just big lists of a small number of types of things that are mostly independent of each other and that you'll just be accessing sequentially? If so, simple file system storage may be appropriate for you.
 
Ravi Tej Pidatala
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Jeff
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!