{"id":4793,"date":"2020-04-19T18:21:34","date_gmt":"2020-04-19T18:21:34","guid":{"rendered":"https:\/\/www.testpreptraining.com\/tutorial\/?page_id=4793"},"modified":"2020-04-19T18:21:34","modified_gmt":"2020-04-19T18:21:34","slug":"cloud-spanner-overview-google-professional-data-engineer-gcp","status":"publish","type":"page","link":"https:\/\/www.testpreptraining.ai\/tutorial\/cloud-spanner-overview-google-professional-data-engineer-gcp\/","title":{"rendered":"Cloud Spanner Overview Google Professional Data Engineer GCP"},"content":{"rendered":"<ul>\n<li>A fully managed service<\/li>\n<li>relational database service<\/li>\n<li>offers transactional consistency at global scale<\/li>\n<li>automatic synchronous replication for high availability<\/li>\n<li>Has interleaved schema &#8211; Group primary key and foreign keys together for faster access<\/li>\n<li>Cascade on delete can be done with interleave.<\/li>\n<li>Primary keys don&#8217;t have sequential keys and make sure its distributed<\/li>\n<li>Secondary indexes make the query efficient<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>CAP Theorem<\/p>\n<p>The CAP theorem is for distributed system and they can guarantee at most two qualities only:<\/p>\n<ul>\n<li>Consistency: All observers see the most recent data and order of events is guaranteed<\/li>\n<li>Availability: The system is always online and able to handle all requests<\/li>\n<li>Partition tolerance: The system continues to operate during network disruptions<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul>\n<li>RDBMS can best provide CP<\/li>\n<li>NoSQL can provide AP<\/li>\n<li>Spanner provides all three \u2013 CAP.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>Comparison with other data models<\/p>\n<table>\n<thead>\n<tr>\n<td><\/td>\n<td><strong>Cloud Spanner<\/strong><\/td>\n<td><strong>Traditional Relational<\/strong><\/td>\n<td><strong>Traditional Non-Relational<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Schema<\/td>\n<td>Yes<\/td>\n<td>Yes<\/td>\n<td>No<\/td>\n<\/tr>\n<tr>\n<td>SQL<\/td>\n<td>Yes<\/td>\n<td>Yes<\/td>\n<td>No<\/td>\n<\/tr>\n<tr>\n<td>Consistency<\/td>\n<td>Strong<\/td>\n<td>Strong<\/td>\n<td>Eventual<\/td>\n<\/tr>\n<tr>\n<td>Availability<\/td>\n<td>High<\/td>\n<td>Failover<\/td>\n<td>High<\/td>\n<\/tr>\n<tr>\n<td>Scalability<\/td>\n<td>Horizontal<\/td>\n<td>Vertical<\/td>\n<td>Horizontal<\/td>\n<\/tr>\n<tr>\n<td>Replication<\/td>\n<td>Automatic<\/td>\n<td>Configurable<\/td>\n<td>Configurable<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>TrueTime<\/p>\n<ul>\n<li>Used For strong consistency<\/li>\n<li>Google datacenters have atomic clocks<\/li>\n<li>It gives Spanner nodes to determine the current time down to a very fine resolution. the margin of error in system time is about 7 ms.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>Paxos consensus algorithm<\/p>\n<ul>\n<li>Allows consensus to be reached in very unreliable environments<\/li>\n<li>ideal for maintaining consensus across large bodies of data.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>Read \/ Write<\/p>\n<ul>\n<li>queries are performed using strong reads that guarantee the most recent results<\/li>\n<li>queries may result in a slight performance hit.<\/li>\n<li>Clients can specify an exact staleness in queries<\/li>\n<li>the client provides a timestamp and Spanner executes the query on the most recent data relative to that timestamp.<\/li>\n<li>Spanner APIs provide write operation<\/li>\n<li>For write give a number of mutations to be executed,<\/li>\n<li>each mutation affects a single cell<\/li>\n<li>Spanner supports up to 20,000 mutations in a single transaction, and affected indexes are also counted.<\/li>\n<li><\/li>\n<li>Cloud Spanner offers two types of transaction<\/li>\n<\/ul>\n<ul>\n<li>read-only transactions &#8211; non-locking operations and it ensures that the data being read is not updated from the observer\u2019s point of view over the course of one or many reads. Any update during a read-only transaction are ignored<\/li>\n<li>read-write transactions &#8211; locking operations so, data will be blocked until the transaction is committed. It supports rollbacks.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>A fully managed service relational database service offers transactional consistency at global scale automatic synchronous replication for high availability Has interleaved schema &#8211; Group primary key and foreign keys together for faster access Cascade on delete can be done with interleave. Primary keys don&#8217;t have sequential keys and make sure its distributed Secondary indexes make&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"categories":[617],"tags":[684,686,619,623,622,618,621],"class_list":["post-4793","page","type-page","status-publish","hentry","category-google-gcp","tag-cloud-spanner","tag-cloud-spanner-overview","tag-data-engineer","tag-gcp","tag-google-certification","tag-google-cloud","tag-professional-data-engineer"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Cloud Spanner Overview Google Professional Data Engineer GCP - Testprep Training Tutorials<\/title>\n<meta name=\"description\" content=\"Google Cloud Certified Professional Data Engineer Tutorial, dumps, brief notes on Cloud Spanner Overview\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.testpreptraining.ai\/tutorial\/cloud-spanner-overview-google-professional-data-engineer-gcp\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Cloud Spanner Overview Google Professional Data Engineer GCP - Testprep Training Tutorials\" \/>\n<meta property=\"og:description\" content=\"Google Cloud Certified Professional Data Engineer Tutorial, dumps, brief notes on Cloud Spanner Overview\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.testpreptraining.ai\/tutorial\/cloud-spanner-overview-google-professional-data-engineer-gcp\/\" \/>\n<meta property=\"og:site_name\" content=\"Testprep Training Tutorials\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/cloud-spanner-overview-google-professional-data-engineer-gcp\/\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/cloud-spanner-overview-google-professional-data-engineer-gcp\/\",\"name\":\"Cloud Spanner Overview Google Professional Data Engineer GCP - Testprep Training Tutorials\",\"isPartOf\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#website\"},\"datePublished\":\"2020-04-19T18:21:34+00:00\",\"dateModified\":\"2020-04-19T18:21:34+00:00\",\"description\":\"Google Cloud Certified Professional Data Engineer Tutorial, dumps, brief notes on Cloud Spanner Overview\",\"breadcrumb\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/cloud-spanner-overview-google-professional-data-engineer-gcp\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.testpreptraining.ai\/tutorial\/cloud-spanner-overview-google-professional-data-engineer-gcp\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/cloud-spanner-overview-google-professional-data-engineer-gcp\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Cloud Spanner Overview Google Professional Data Engineer GCP\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#website\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\",\"name\":\"Testprep Training Tutorials\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.testpreptraining.ai\/tutorial\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#organization\",\"name\":\"Testprep Training\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png\",\"contentUrl\":\"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png\",\"width\":583,\"height\":153,\"caption\":\"Testprep Training\"},\"image\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Cloud Spanner Overview Google Professional Data Engineer GCP - Testprep Training Tutorials","description":"Google Cloud Certified Professional Data Engineer Tutorial, dumps, brief notes on Cloud Spanner Overview","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.testpreptraining.ai\/tutorial\/cloud-spanner-overview-google-professional-data-engineer-gcp\/","og_locale":"en_US","og_type":"article","og_title":"Cloud Spanner Overview Google Professional Data Engineer GCP - Testprep Training Tutorials","og_description":"Google Cloud Certified Professional Data Engineer Tutorial, dumps, brief notes on Cloud Spanner Overview","og_url":"https:\/\/www.testpreptraining.ai\/tutorial\/cloud-spanner-overview-google-professional-data-engineer-gcp\/","og_site_name":"Testprep Training Tutorials","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/cloud-spanner-overview-google-professional-data-engineer-gcp\/","url":"https:\/\/www.testpreptraining.ai\/tutorial\/cloud-spanner-overview-google-professional-data-engineer-gcp\/","name":"Cloud Spanner Overview Google Professional Data Engineer GCP - Testprep Training Tutorials","isPartOf":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#website"},"datePublished":"2020-04-19T18:21:34+00:00","dateModified":"2020-04-19T18:21:34+00:00","description":"Google Cloud Certified Professional Data Engineer Tutorial, dumps, brief notes on Cloud Spanner Overview","breadcrumb":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/cloud-spanner-overview-google-professional-data-engineer-gcp\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.testpreptraining.ai\/tutorial\/cloud-spanner-overview-google-professional-data-engineer-gcp\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/cloud-spanner-overview-google-professional-data-engineer-gcp\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.testpreptraining.ai\/tutorial\/"},{"@type":"ListItem","position":2,"name":"Cloud Spanner Overview Google Professional Data Engineer GCP"}]},{"@type":"WebSite","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#website","url":"https:\/\/www.testpreptraining.ai\/tutorial\/","name":"Testprep Training Tutorials","description":"","publisher":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.testpreptraining.ai\/tutorial\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#organization","name":"Testprep Training","url":"https:\/\/www.testpreptraining.ai\/tutorial\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/","url":"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png","contentUrl":"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png","width":583,"height":153,"caption":"Testprep Training"},"image":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/4793","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/comments?post=4793"}],"version-history":[{"count":1,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/4793\/revisions"}],"predecessor-version":[{"id":4803,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/4793\/revisions\/4803"}],"wp:attachment":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/media?parent=4793"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/categories?post=4793"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/tags?post=4793"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}