Cart session

I am trying to create a shopping cart, when order is finished, they should be redirected to checkout page to get invoice and pay it.
When they finish ordering on cart and redirecting to checkout page, the checkout page enforce them to login, if not logged in they will be redirected to login page, they can login here or go to create account page to create an account, if they were logged in while ordering on cart then they reach to checkout page directly. According to my experience the cart session may be destroyed for any reason during these redirections or during create account or captcha session on create account page, so we should not expect to have cart sessions safely. so I was thinking to save cart info in cart session table in database and checkout page tries to fetch info from db rather than from session.

Now my question:

  1. Is it better to save cart session in table anyway regardless they are already logged in or not and checkout page just fetch the info from db?
  2. Or after finishing order on cart, better first checking whether client is already logged in before inserting cart session in db, if not logged in save it in db and redirect them to login page and if logged in already then directly redirect them to checkout page, and checkout page first check whether a cart session exists, if exists then fetch info from session if session not exists then tries to fetch from db?