Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How can i design a database for my website using mongoDB

I just want..

Collection

  • Signup
  • admin
  • products
  • cart
  • orders
  • payments
  • stocks

What is the better way to linked each other and optimized my database.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

In mongoDB you have by Default ID. so you can use it to link collections each other.

  • you do not need to make 2 collections for signup and admin.just add one field in single collection.
{
email,
password,
role
}
  • Also you can set userID to cart and Payment collection to get particular user data.
Cart collection.
{
   itemname,
   itemID,
   price,
   userID
}
  • Use can make payment and order collection like cart collection.
    Thank you!
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading