Reputation: 43
I want to make a library management system in which I want to store book name and book ID etc. But I am restricted not to use the database functionality and save that data only during the time of execution.
How could I go about this?
Upvotes: 4
Views: 850
Reputation: 12391
Yes, 2 quick ways that come to my mind right now are (if you are not using database):
1) use filing (searching and update could be harder)
2) user data structures - in memory storage (select the flexible data structure, storing data objects in array list would be easy but again depends on your requirements and nature of data)
Upvotes: 1
Reputation: 2935
Some type of storage medium needs to be decided on. There are a couple choices you can use. You can store the data as property files, xml or json.
There are tools like Jackson that can serialize and deserialize objects to json files and POJOs respectively to make persistence easier. There are also tools for xml and property file as well.
Upvotes: 2
Reputation: 140427
Your options are straight forward:
Upvotes: 6