MongoDB

Showing posts with label MongoDB. Show all posts
Showing posts with label MongoDB. Show all posts

Friday, April 24, 2020

E commerce system using MERN stack - Part 2





After setting up the project , it was time to get into coding , it was decided to implement the back-end first.

An express server was setup after installing the necessary dependencies. We opted to go with an open- source MongoDB GUI named Robo 3T . Once the necessary database connection was created and with the required project structure the project was pushed to a repository created on GitHub so that all the members of the team could follow the same structure.

I started working on the product model as it was a necessity for the requirements I had to follow. And then within the controllers folder I created the required methods that a stock manager needs to conduct the CRUD services , next within the routes folder the required routes were implemented to act as  REST API to the HTTP end points such as GET,POST,PUT and DELETE.

Friday, April 17, 2020

E commerce system using MERN stack - Part 1 (Diagrams)



As our Application Framework module project we were given instructions to implement online shopping cart system for a Fashion store using the MERN stack. We as a 4 member group decided on the prerequisites such as ,
  • The IDE to work on as WebStorm.
  • To use GitHub to host the version controlling.
  • As per the instructions to use the MERN stack to implement the application.
  • Understand the requirements that is needed for the project.
  • To use Bootstrap 4 and react-bootstrap to add styling.
According to the user roles provided I was given the user role of store manager, and according to the store manager's functionalities i was able to come up with several diagrams.

High level architecture diagram based on the store managers functionalities






Physical Diagram based on the store managers functionalities




After understanding about what needed to be implemented , we dived straight into  coding.....




Saturday, February 15, 2020

MongoDB vs MySQL - The Basics




The universe of innovation progresses each second thus the universe of business should be adjusted to such advances. In the online business world finding the ideal database model is a migraine. As the organization develops the measure of information develops, so finding a database that can cling to the load is significant.

Relational databases (MySQL, Oracle, MS SQL) were the first as a main priority for such organizations, be that as it may, the circumstances are different and the interest is high for something basic and adaptable.

Therefore it is essential to understand the importance of MongoDB and MySQL and observe what the contrasts are.

What is MongoDB ?

MongoDB is the most mainstream document- based database following NoSQL. It was first discharged in 2010 by the organization MongoDB inc. 
MongoDB utilizes key-value sets, called record store. These record stores made are put away in BSON(Binary JSON) documents. BSONs are altered JSON(JavaScript Object Notation).
JSON permits the information trade among customers and servers to be done in human documentation.
Since MongoDB is schema less,a fixed model structure isn't required. Additionally MongoDB will give an immense lift to execution and give solid unwavering quality and effectiveness.

What is MySQL ?

MySQL is an open-source Relational Database Management System (RDBMS). 

MySQL uses Structured Query Language (SQL) to conduct the CRUD (Create, Read, Update,Delete) operations. The CRUD operations are what is used to conduct all the operations related to database functions, starting from reading data to inserting, updating and deleting. It follows a concept of creating tables and inserting columns of data with the appropriate row.
Regardless of whether different tables are available in a database the utilization of JOIN is an amazing way to construct an association between numerous schema.

Flexibility of schema

MongoDB

  • There are no restrictions on the schema creation, using collections documents can be added, without ever needing to create any relationships.
  • High flexibility.

MySQL

  • Tables needs to be defined before any data can be added, rows needs to be defined,and rows adjacent to columns needs to be defined.
  • Due to normalization there is no flexibility in the manner of storing data.
Rigid table design is observed 

Querying language 

MongoDB

  • un-Structured Query language
  • A document(JSON) is needed to be build containing the properties that matches the values.

MySQL

  • Structured Query language
  • Consists of 2 main parts  
  1. DDL(Data Definition Language)
  2. DML(Data Manipulation Language)
Comparison of MySQL vs MongoDB query writing


To be continued....