- Applying aggregate SQL function count, SUM, MAX, MIN to the employees’ table
- SELECT SUM(Salary) AS employees_salaries FROM tblEmployees;
- SELECT MAX(Salary) AS max_salary FROM tblEmployees;
- SELECT MIN(Salary) AS min_salary FROM tblEmployees;
- SELECT AVG(Salary) AS avg_salary FROM tblEmployees;
- SELECT COUNT (*) AS employes FROM tblEmployees WHERE Department=’Technology’;
References
https://www.w3schools.com/sql/sql_count_avg_sum.asp
- Basic categories of NoSQL database.
There are many NoSQL databases currently available where some of them open-source while other some premium products. Many of them were built to serve for very different purposes. The NoSQL is grouped into four basic categories, which include the following.
- Document Databases
Document database stores data in the form of JSON, BSON, or XML documents. These documents can be stores and retrieved in a form that is much closer to the data objects used in applications, which means less translation is required to use the data in an application. SQL data must often be assembled and disassembled when moving back and forth between applications and storage. Document databases are popular with developers because they have the flexibility to rework their document structures as needed to suit their application, shaping their data structures as their application requirements change over time. This flexibility speeds development because, in effect, data becomes like code and is under the control of developers. The most widely adopted document databases are usually implemented with a scale-out architecture, providing a clear path to both data volumes and traffic scalability.
- Key-Value Stores
The key-value store is the simplest type of NoSQL database, which stores data elements in the database is stored as a key-value pair consisting of an attribute name (or “key”) and a value. In a sense, a key-value store is like a relational database with only two columns: the key or attribute name and the value. These NoSQL databases are the most basic type of NoSQL database. They are useful for storing reasonably necessary information, like details about a customer. There are several different key/value pair databases. The most popular is Redis, which incredibly fast and very flexible in terms of the languages and tools it can be used with. It can be used for a wide variety of purposes, and It’s also open-source with enterprise options available for users with significant requirements.
- Column-Oriented Databases
While many relational databases store data in rows and read data row by row, a column store is organized as a set of columns. This means that you can read those columns directly without consuming memory with the unwanted data when you want to run analytics on a small number of columns. Columns are often of the same type and benefit from more efficient compression, making reads even faster. Columnar databases can quickly aggregate the value of a given column. Columnar databases are great for analytics though how they write data makes it very difficult for them to be strongly consistent as writes of all the columns require multiple write events on disk.
- Graph Databases
A graph database focuses on the relationship between data elements. Each element is stored as a node. The connections between elements are called links or relationships. In a graph database, connections are first-class elements of the database, stored directly. In relational databases, links are implied, using data to express the relationships. A graph database is optimized to capture and search the connections between data elements, overcoming the overhead associated with JOINing multiple SQL tables. Graph databases, compared to relational databases, are multidimensional. They display not just essential relationships between tables and data, but more complex and multifaceted ones.
References
https://hub.packtpub.com/different-types-of-nosql-databases-and-when-to-use-them/
https://www.mongodb.com/scale/types-of-nosql-databases
- Key capabilities of NoSQL that extend what SQL can do.
NoSQL databases are becoming a significant part of the database landscape today, and with their handful of advantages, they can be a real game-changer in the enterprise arena. Significant data handling, elastic scalability, and open-source features make NoSQL an appealing option for many companies looking to integrate into Big Data. The following capabilities of NoSQL exceed what SQL can do.
- Elastic scaling
Earlier with a relational database or RDBMS, database administrators always relied on scaling up or buying bigger, expensive, multiple servers as database load increased rather than scaling out or distributing the database across multiple hosts. The new breed of NoSQL databases is designed to expand transparently and horizontally to take advantage of new nodes, and they’re usually designed with low-cost commodity hardware in mind. For NoSQL, servers can be added or removed from the data layer without application downtime.
- Bigger Data Handling Capability
RDBMS capacity has been growing to match the increase in volumes of data. Still, the limitations of data volumes that can be handled by a single RDBMS are intolerable for some enterprises. Hadoop, an enabler of certain types of NoSQL distributed databases, allows data to be spread across thousands of servers with little reduction in performance. It outstrips that which can be handled by the biggest RDBMS.
References
https://www.monitis.com/blog/cc-in-review-the-key-differences-between-sql-and-nosql-dbs/
VEiwAsMT8WEcOlQhZUeJFE-I2hBTYkl6TRpn40x80M0TmLW6qtDxTBdMCHPrJGRoCuVUQAvD_BwE
https://blog.udemy.com/nosql-vs-sql-2/?utm_source=adwords&utm_medium=udemyads&utm_campaign=DSA_Catchall_la.EN_cc.ROW&utm_content=deal4584&utm_term=_._ag_88010211481_._ad_437497337004_._kw__._de_c_._dm__._pl__._ti_dsa-393987629421_._li_9076839_._pd__._&matchtype=b&gclid=CjwKCAjwnK36BRBVEiwAsMT8WEcOlQhZUeJFE-I2hBTYkl6TRpn40x80M0TmLW6qtDxTBdMCHPrJGRoCuVUQAvD_BwE