1

Recently I was asked in a interview to implement to e-commerce site .

One of the requirement was to maintain cart details across various devices .(i.e) if user adds a book from his iPhone , and when he again Login from his browser it should be available just like amazon

Should I have to maintain a separate table to maintain cart details per user , and a database call for every event . OR is there any other way of doing it

  • I think you've hit the nail on the head. You will need to store the cart server side, a database works to that end. If speed is an issue there are a number of in memory databases/caches. – Kain0_0 Apr 4 at 5:03
  • There're different ways in which we can do this and several factors to take into consideration. Probably the question was addressed to evaluate your analytical skills rather than finding a solution. – Laiv Apr 4 at 6:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.