5

JCart: Domain Modelling and Database Designing

 2 years ago
source link: https://www.sivalabs.in/2015/12/jcart-domain-modelling-and-database-designing/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

JCart: Domain Modelling and Database DesigningSkip to content

Share this:

While developing database driven applications using some ORM framework, some people prefer Object first approach and others follow DB first approach. I prefer DB first approach.

So, let us start listing down all the domain entities in our JCart application domain.

  • Product
  • Category
  • Customer
  • Order
  • OrderItem
  • Address
  • Permission

Let us create the database tables as follows:

jcart-db.webp

Though we identified Cart as a domain entity, we are not creating the table for holding the Cart details. We are going to take the simple approach of storing the active cart details in HttpSession only. But in real applications it is strongly recommended to store them in some persistent storage like database.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK