SessionStorage, localStorage and Cookies:- sessionStorage, localStorage and Cookies all are used to store data on the client side. Each one has its own storage and expiration limit. LocalStorage : stores data with no expiration date, and gets cleared only through JavaScript, or clearing the Browser Cache / Locally Stored Data SessionStorage : similar to localStorage but expires when the browser closed (not the tab). Cookie : stores data that has to be sent back to the server with subsequent requests. Its expiration varies based on the type and the expiration duration can be set from either server-side or client-side (normally from server-side). Cookies are primarily for server-side reading (can also be read on client-side), localStorage and sessionStorage can only be read on client-side.
MongoDB is a document database which belongs to a family of databases called NoSQL - not only SQL. In MongoDB, records are documents which behave a lot like JSON objects in JavaScript. Values in documents can be looked up by their field’s key. Documents can have some fields/keys and not others, which makes Mongo extremely flexible. Features Relational (SQL) Non-Relational (NoSQL) Data Type Hard to store rich data type Able to store literally any type of data Scaling Not trivial to scale, and not cheap Scaling is automatic and transparent Cost Expensive to build and maintain Around 10% cost to Relational DB Representation Represents data in tables and rows Represents data as collections of JSON documents Query Structured Query Language (SQL): makes SQL injection attack possible Object Querying: intuitive, passing a document to explain what you're querying for Multi-originated JOIN operation: perform query across multiple tables Multi-dimensional data type: support...
Comments
Post a Comment