{"id":2901,"date":"2019-06-19T21:09:09","date_gmt":"2019-06-19T19:09:09","guid":{"rendered":"http:\/\/miro.borodziuk.eu\/?p=2901"},"modified":"2019-08-31T23:49:11","modified_gmt":"2019-08-31T21:49:11","slug":"relational-databases-fundamental","status":"publish","type":"post","link":"http:\/\/miro.borodziuk.eu\/index.php\/2019\/06\/19\/relational-databases-fundamental\/","title":{"rendered":"Databases Fundamentals"},"content":{"rendered":"<p>Relational database management systems (<strong>RDBMS<\/strong>) are used when the data to be managed has formal and fixed relationships. Data is stored on disk as &#8220;rows,&#8221; and entire rows must be parsed even if individual attributes are all that&#8217;s needed. Reading one attribute from 10,000 records requires 10,000 rows to be read from the disk.<br \/>\n<!--more--><\/p>\n<p>Every table has a schema that defines a fixed layout for each row, which is defined when the table is created. Every row in the table needs to have all the attributes and the correct data types.<br \/>\nRDBMS conforms to the ACID system: Atomicity, Consistency, Isolation, and Durability. This impacts the ability to achieve high performance levels and limits scalability, but for more applications of an RDBMS, the trade-off is worth it. SQL (Structured Query Language) is used to interact with most SQL (relational) database products.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-2902 aligncenter\" src=\"http:\/\/miro.borodziuk.eu\/wp-content\/uploads\/RDFundamentals1.jpg\" alt=\"\" width=\"633\" height=\"359\" srcset=\"http:\/\/miro.borodziuk.eu\/wp-content\/uploads\/RDFundamentals1.jpg 633w, http:\/\/miro.borodziuk.eu\/wp-content\/uploads\/RDFundamentals1-300x170.jpg 300w\" sizes=\"(max-width: 633px) 100vw, 633px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #3366ff;\">Relational (SQL) vs. NoSQL <\/span><br \/>\nIn a relational database, a record is often normalized and stored in separate tables, and relationships are defined by primary and foreign key constraints.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-2924 aligncenter\" src=\"http:\/\/miro.borodziuk.eu\/wp-content\/uploads\/RelationalvsNoSql.jpg\" alt=\"\" width=\"626\" height=\"160\" srcset=\"http:\/\/miro.borodziuk.eu\/wp-content\/uploads\/RelationalvsNoSql.jpg 626w, http:\/\/miro.borodziuk.eu\/wp-content\/uploads\/RelationalvsNoSql-300x77.jpg 300w\" sizes=\"(max-width: 626px) 100vw, 626px\" \/><\/p>\n<p>In a NoSQL database like DynamoDB, a book record is usually stored as a single <strong>JSON<\/strong> document.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2925\" src=\"http:\/\/miro.borodziuk.eu\/wp-content\/uploads\/NoSQLJson.jpg\" alt=\"\" width=\"302\" height=\"264\" srcset=\"http:\/\/miro.borodziuk.eu\/wp-content\/uploads\/NoSQLJson.jpg 302w, http:\/\/miro.borodziuk.eu\/wp-content\/uploads\/NoSQLJson-300x262.jpg 300w\" sizes=\"(max-width: 302px) 100vw, 302px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-2905 aligncenter\" src=\"http:\/\/miro.borodziuk.eu\/wp-content\/uploads\/RDFundamentals2.jpg\" alt=\"\" width=\"619\" height=\"736\" srcset=\"http:\/\/miro.borodziuk.eu\/wp-content\/uploads\/RDFundamentals2.jpg 619w, http:\/\/miro.borodziuk.eu\/wp-content\/uploads\/RDFundamentals2-252x300.jpg 252w\" sizes=\"(max-width: 619px) 100vw, 619px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Relational database management systems (RDBMS) are used when the data to be managed has formal and fixed relationships. Data is stored on disk as &#8220;rows,&#8221; and entire rows must be parsed even if individual attributes are all that&#8217;s needed. Reading one attribute from 10,000 records requires 10,000 rows to be read from the disk.<\/p>\n","protected":false},"author":1,"featured_media":2907,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[79],"tags":[],"_links":{"self":[{"href":"http:\/\/miro.borodziuk.eu\/index.php\/wp-json\/wp\/v2\/posts\/2901"}],"collection":[{"href":"http:\/\/miro.borodziuk.eu\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/miro.borodziuk.eu\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/miro.borodziuk.eu\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/miro.borodziuk.eu\/index.php\/wp-json\/wp\/v2\/comments?post=2901"}],"version-history":[{"count":6,"href":"http:\/\/miro.borodziuk.eu\/index.php\/wp-json\/wp\/v2\/posts\/2901\/revisions"}],"predecessor-version":[{"id":2927,"href":"http:\/\/miro.borodziuk.eu\/index.php\/wp-json\/wp\/v2\/posts\/2901\/revisions\/2927"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/miro.borodziuk.eu\/index.php\/wp-json\/wp\/v2\/media\/2907"}],"wp:attachment":[{"href":"http:\/\/miro.borodziuk.eu\/index.php\/wp-json\/wp\/v2\/media?parent=2901"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/miro.borodziuk.eu\/index.php\/wp-json\/wp\/v2\/categories?post=2901"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/miro.borodziuk.eu\/index.php\/wp-json\/wp\/v2\/tags?post=2901"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}