Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; mythemes_layout has a deprecated constructor in /customers/c/1/c/kristenhuber.com/httpd.www/wp-content/themes/verbo/fw/mythemes_layout.class.php on line 6 Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; my_wdg_meta has a deprecated constructor in /customers/c/1/c/kristenhuber.com/httpd.www/wp-content/themes/verbo/fw/plg/my_widgets/my_wdg_meta.php on line 2 Notice: The called constructor method for WP_Widget in my_wdg_meta is deprecated since version 4.3.0! Use
__construct()
instead. in /customers/c/1/c/kristenhuber.com/httpd.www/wp-includes/functions.php on line 3986 Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; my_wdg_post_categories has a deprecated constructor in /customers/c/1/c/kristenhuber.com/httpd.www/wp-content/themes/verbo/fw/plg/my_widgets/my_wdg_post_categories.php on line 2 Notice: The called constructor method for WP_Widget in my_wdg_post_categories is deprecated since version 4.3.0! Use
__construct()
instead. in /customers/c/1/c/kristenhuber.com/httpd.www/wp-includes/functions.php on line 3986 Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; my_wdg_post_tags has a deprecated constructor in /customers/c/1/c/kristenhuber.com/httpd.www/wp-content/themes/verbo/fw/plg/my_widgets/my_wdg_post_tags.php on line 2 Notice: The called constructor method for WP_Widget in my_wdg_post_tags is deprecated since version 4.3.0! Use
__construct()
instead. in /customers/c/1/c/kristenhuber.com/httpd.www/wp-includes/functions.php on line 3986 Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; my_wdg_newsletter has a deprecated constructor in /customers/c/1/c/kristenhuber.com/httpd.www/wp-content/themes/verbo/fw/plg/my_widgets/my_wdg_newsletter.php on line 2 Notice: The called constructor method for WP_Widget in my_wdg_newsletter is deprecated since version 4.3.0! Use
__construct()
instead. in /customers/c/1/c/kristenhuber.com/httpd.www/wp-includes/functions.php on line 3986 Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; my_wdg_website_description has a deprecated constructor in /customers/c/1/c/kristenhuber.com/httpd.www/wp-content/themes/verbo/fw/plg/my_widgets/my_wdg_website_description.php on line 2 Notice: The called constructor method for WP_Widget in my_wdg_website_description is deprecated since version 4.3.0! Use
__construct()
instead. in /customers/c/1/c/kristenhuber.com/httpd.www/wp-includes/functions.php on line 3986 SQL vs NoSQL. Part Three. | Kristen Huber: Stories

Welcome.

SQL vs NoSQL. Part Three.

In previous posts I talked about SQL and NoSQL, and I want to go into a little more detail (while keeping it simple) what makes them different.

Scalability>>> Think making big things small. In SQL data is stored vertically (so typically all on one server- expensive!).  NoSQL stores it horizontally (many servers==ok).

Schema>>> Technically schema means a representation of some model. In programming land, it is used to refer to a structure of a database.  So think because you can’t see a database (at least I hope you can’t) you have to think how that structure is represented.   In SQL, the schema is fixed, columns must be decided ahead of time, and you have to put data in every column.  Remember that wine shelf? You can’t really be adding a new column to your shelf after you’ve built it…it will probably look like all the images when you google “shelf fail.”

Shelf Fail

I don’t know why, but this shelf is kind of cute.

Also, you have to put a bottle in every slot. Someone’s going to be a happy wine collector.

NoSQL deals with schema in a very different way. It just says “Nope.” and walks away. You can add (or leave out) anything you want, anytime you want. Now that’s flexibility.

Data>>> Finally let’s get to the data. In SQL all rows contain one specific entry. For example, in a row containing information about a bottle of wine you might have “Year”,”Location”,”Winery” etc. You can’t have two years for a bottle of wine, or two locations. In NoSQL, that’s A-OK. You can have two wineries (maybe it was a collaboration?) or no wineries. If that’s what you want.

More reading.

Next post I’ll be going into more detail about NoSQL and specifically MongoDB.

Peace,

Kristen

Leave a reply

Your email address will not be published.

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>