Dear readers of our blog, we'd like to recommend you to visit the main page of our website, where you can learn about our product SQLS*Plus and its advantages.
 
SQLS*Plus - best SQL Server command line reporting and automation tool! SQLS*Plus is several orders of magnitude better than SQL Server sqlcmd and osql command line tools.
 

REQUEST COMPLIMENTARY SQLS*PLUS LICENCE

Enteros UpBeat offers a patented database performance management SaaS platform. It proactively identifies root causes of complex revenue-impacting database performance issues across a growing number of RDBMS, NoSQL, and deep/machine learning database platforms. We support Oracle, SQL Server, IBM DB2, MongoDB, Casandra, MySQL, Amazon Aurora, and other database systems.

NoSQL: life without a schema

2 May 2022

Preamble

SQLS*Plus - 1649775237893610072A1 7637 46C0 A590 D80EAFB159F5 optimize

​​

NoSql is not a replacement for SQL databases but is a valid alternative for many situations where standard SQL is not the best approach for storing your data.

Since we were taught that whenever you need to store data in a “data warehouse” and query that data for extraction, SQL is the best solution, you only have to decide which SQL Engine to use and the game is over.

In 2012 this suggestion was wrong, I mean that you can no longer assume that SQL is the “only way” to store data, but you should know that there are other alternatives and they are called NO SQL. Under this term, we have different storage mechanisms that are not based on SQL, and in .NET we have an exceptional product called RavenDB (you can find a really good introduction to RavenDb in the Mauro blog).

The first big difference with standard SQL is the absence of a schema

One of the most annoying limitations of SQL Server is the need to specify the exact format of the data you want to store in your storage. This is necessary for many good reasons, but there are situations where you really do not care about it, especially if your software is largely based on the OOP concept. Suppose you have this object

1: class player

2: {

3: public String Name { get; set; }

4:

5: public DateTime RegistrationDate { get; set; }

6:

7: public Int32 Age { get; set; }

8: }

For a moment there is no concern that this object is poorly encapsulated (it has a public method of obtaining and installing it), but only focused on the need to “store” this object somewhere. If you use a standard SQL repository, the first thing you need to do is to create a table, then define the columns, define the maximum length for the Name column, and finally select the ORM to use or create a dedicated data layer, and finally, you can save the object.

If you are working with a crow, this is the only code that you need

1: var store = new DocumentStore { Url = "http://localhost:8080" };

2: store.Initialize();

3: using (var session = store.OpenSession())

4: {

5: var player = new Player

6: {

7: Age = 30,

8: RegistrationDate = DateTime.Now,

9: Name = "Alkampfer",

10: };

11: session.Store(player);

12: session.SaveChanges();

13: }

The server simply takes the object and saves it.

In order to save an object to the data warehouse only two functions are needed: “Save” to tell the repository the object you want to save, and “SaveChanges”, which actually perform the saving.

What do you get with this simple code fragment? Just go to the standard browser at the server address and you should see the contents of the database.

Database Contents After Simple Object Insertion

Database Contents After Simple Object Insertion

In Figure, you can see the contents of the database crow, it contains a player and a small 1 next to the object is Id, which Raven uses internally to uniquely identify this object. Another object, called Sys Doc Hilo / Players, takes care of generating an identifier for the Players object with the Hilo algorithm.

This is all, there is no need to define the scheme, there is no need to have a special Id property or any other requirement to make the object compatible with the repository, just call the Store method for any .NET object, and your object is in the database, Period!

 Steven Lott | NoSQL doesn’t mean No Schema

Enteros

About Enteros

Enteros offers a patented database performance management SaaS platform. It proactively identifies root causes of complex business-impacting database scalability and performance issues across a growing number of RDBMS, NoSQL, and machine learning database platforms.

 
Tags: ,

MORE NEWS

 

Preamble​​MongoDB Conditional operators specify a condition to which the value of the document field shall correspond.Comparison Query Operators $eq...

5 Database management trends impacting database administrationIn the realm of database management systems, moreover half (52%) of your competitors feel...

The data type is defined as the type of data that any column or variable can store in MS SQL Server. What is the data type? When you create any table or...

Preamble​​MS SQL Server is a client-server architecture. MS SQL Server process starts with the client application sending a query.SQL Server accepts,...

First the basics: what is the master/slave?One database server (“master”) responds and can do anything. A lot of other database servers store copies of all...

Preamble​​Atom Hopper (based on Apache Abdera) for those who may not know is an open-source project sponsored by Rackspace. Today we will figure out how to...

Preamble​​MongoDB recently introduced its new aggregation structure. This structure provides a simpler solution for calculating aggregated values rather...

FlexibilityOne of the most advertised features of MongoDB is its flexibility.  Flexibility, however, is a double-edged sword. More flexibility means more...

Preamble​​SQLShell is a cross-platform command-line tool for SQL, similar to psql for PostgreSQL or MySQL command-line tool for MySQL.Why use it?If you...

Preamble​​Writing an application on top of the framework on top of the driver on top of the database is a bit like a game on the phone: you say “insert...

Preamble​​Oracle Coherence is a distributed cache that is functionally comparable with Memcached. In addition to the basic function of the API cache, it...

Preamble​​IBM pureXML, a proprietary XML database built on a relational mechanism (designed for puns) that offers both relational ( SQL / XML ) and...

  What is PostgreSQL array? In PostgreSQL we can define a column as an array of valid data types. The data type can be built-in, custom or enumerated....

Preamble​​If you are a Linux sysadmin or developer, there comes a time when you need to manage an Oracle database that can work in your environment.In this...

Preamble​​Starting with Microsoft SQL Server 2008, by default, the group of local administrators is no longer added to SQL Server administrators during the...

Preamble​​When administering PostgreSQL database servers, one of the most common tasks you will probably perform is enumerating databases and their tables....