reading_notes

Read : Class 12 - Mongo and Mongoose:

Databases

SQL VS noSQL:

SQl NoSQL
are primarily called as Relational Databases RDBMS primarily called as non-relational or distributed database
table based databases document based, graph databases
predefined schema dynamic schema for unstructured data
vertically scalable horizontally scalable
Examples: MySql, Oracle, Sqlite, Postgres and MS-SQL Examples: MongoDB, BigTable, Redis, RavenDb, Cassandra, Hbase, Neo4j and CouchDb
good fit for the complex query not good fit for the complex query
not best fit for hierarchical data storage fits better for the hierarchical data storage and highly preferred for large data set

SQL VS. NoSQL

What kind of data is a good fit for an SQL database?

Give a real world example.

MySql is available for all major platforms like Linux, Windows, Mac, BSD and Solaris. It also has connectors to languages like Node.js, Ruby, C#, C++, C, Java, Perl, PHP and Python.

What kind of data is a good fit a NoSQL database?

Give a real world example.

is currently being used by some big companies like The New York Times, Craigslist, MTV Networks, Benefits: Speed: For simple queries, it gives good performance, as all the related data are in single document which eliminates the join operations. Scalability: It is horizontally scalable i.e. you can reduce the workload by increasing the number of servers in your resource pool instead of relying on a stand alone resource. Manageable: It is easy to use for both developers and administrators. This also gives the ability to shard database Dynamic Schema: Its gives you the flexibility to evolve your data schema without modifying the existing data

Which type of database is best for hierarchical data storage?

MongoDB

Which type of database is best for scalability?

MongoDB horizontally scalable. You can just add few more servers easily in your NoSQL database infrastructure to handle the large traffic.


What does SQL stand for?

Structure Query Language.

What is a relational database?

a type of database that stores and provides access to data points that are related to another one.

What type of structure does a relational database work with?

Data tables, indexes and views – remain separate from the physical storage, allowing administrators to edit the physical data storage without affecting the logical data structure.

What is a ‘schema’?

Structure described in a formal language supported by the database management system (DBMS). The term “schema” refers to the organization of data as a blueprint of how the database is constructed (divided into database tables in the case of relational databases)

What is a NoSQL database?

NoSQL can be defined as an approach to database designing, which holds a vast diversity of data such as key-value, multimedia, document, columnar, graph formats, external files, etc. NoSQL is purposefully developed for handling specific data models having flexible schemas to build modern applications.

How does it work?

NoSQL databases allow the data to be stored in ways that are more intuitive and easier to understand, or closer to the way the data is used by applications—with fewer transformations required when storing or retrieving using NoSQL-style APIs. Moreover, NoSQL databases can take full advantage of the cloud to deliver zero downtime.

What is inside of a Mongo database?

Mongo has data stored as documents which are then put into collections. A database can have one or more of these collections that have been formed.

Which is more flexible - SQL or MongoDB? and why.

MongoDB is more flexible and ensures high and diverse data availability, Whereas a SQL Database operates with the ACID (Atomicity, Consistency, Isolation, and Durability) properties and ensures greater reliability of transactions.

What is the disadvantage of a NoSQL database?

NoSQL databases don’t have the reliability functions which Relational Databases have (basically don’t support ACID(Atomicity, Consistency, Isolation, and Durability))


Things I want to know more about:

Of course databases is very important topic that I love to go deep in.