I am not sure which category does this question belong to so am posting this in
Java in General forum. I am implementing a shopping cart. Which of the below ways should I use to implement the shopping cart:
Simply save the shopping cart items in an arrayList and save this arrayList variable in the session.
Or
Save all this in database. User hibernate and a one to many mapping between cart and items?
thanks.