{"id":197,"date":"2021-02-17T13:22:10","date_gmt":"2021-02-17T05:22:10","guid":{"rendered":"https:\/\/www.tonghin.com.my\/blog\/?p=197"},"modified":"2021-02-17T13:22:12","modified_gmt":"2021-02-17T05:22:12","slug":"mostly-database","status":"publish","type":"post","link":"https:\/\/www.tonghin.com.my\/blog\/2021\/02\/17\/mostly-database\/","title":{"rendered":"Mostly Database!"},"content":{"rendered":"\n<p>Last week, What have I done? <\/p>\n\n\n\n<p>Oh yes, I was still doing the invoices module, fixed the issues related to the services and repositories files as well as created tests for the needed methods in the module. All the created tests have passed successfully. <\/p>\n\n\n\n<p>I have also got exposed to new terms this week. Database transaction which means a unit of work carried out in a database management system. Next, a two phase commit as defined by techopedia.com is &#8220;a standardized protocol that ensures that a database commit is implementing in the situation where a commit operation must be broken into two separate parts&#8221;. Last concept, Concurrency in database that is known as the ability to control data being saved into the database during a concurrent execution, as in two users saving information on the database at the same time. <\/p>\n\n\n\n<p>Concurrency has two types called optimistic and pessimistic. Optimistic concurrency involves the logic of users being informed when a change is being made to a data in the database, and whether they wish to continue with the changes being made, or in the case of different parts of data being changed, both changes gets updated into the database. Pessimistic concurrency revolves around the idea of initiating a lock or a read-only feature, that is activated when one user is making a change such that other users cannot make a change at the same time. Entity Framework implements the logic of Optimistic concurrency. <\/p>\n\n\n\n<p>Aside from new terms and concepts, I was introduced to data migration from visual studio to database. The entities defined in visual studio were created into the database by using the concept of data migration using Package Manager Console in visual studio. <\/p>\n\n\n\n<p>Finally, I started designing the invoice detail view and binding the commands to the correct view model context. <\/p>\n\n\n\n<p>See you all next week again \ud83d\ude00<\/p>\n\n\n\n<p> <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last week, What have I done? Oh yes, I was still doing the invoices module, fixed the issues related to the services and repositories files as well as created tests for the needed methods in the module. All the created tests have passed successfully. I have also got exposed to new terms this week. Database &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.tonghin.com.my\/blog\/2021\/02\/17\/mostly-database\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Mostly Database!&#8221;<\/span><\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[59,60,61],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v15.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Mostly Database! | Tong Hin&#039;s Blog<\/title>\n<meta name=\"description\" content=\"Database Management System terms such as Database transaction, Two-phase commit, Optimistic and Pessimistic Concurrency.\" \/>\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.tonghin.com.my\/blog\/2021\/02\/17\/mostly-database\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Mostly Database! | Tong Hin&#039;s Blog\" \/>\n<meta property=\"og:description\" content=\"Database Management System terms such as Database transaction, Two-phase commit, Optimistic and Pessimistic Concurrency.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.tonghin.com.my\/blog\/2021\/02\/17\/mostly-database\/\" \/>\n<meta property=\"og:site_name\" content=\"Tong Hin&#039;s Blog\" \/>\n<meta property=\"article:published_time\" content=\"2021-02-17T05:22:10+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-02-17T05:22:12+00:00\" \/>\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\":\"Organization\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#organization\",\"name\":\"TONG HIN MACHINERY\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/\",\"sameAs\":[\"https:\/\/www.youtube.com\/channel\/UC60EoxJMNbu8mV0LuEGfrBg\"],\"logo\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#logo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/wp-content\/uploads\/2020\/10\/web_logo_180_180.jpg\",\"width\":180,\"height\":180,\"caption\":\"TONG HIN MACHINERY\"},\"image\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#logo\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#website\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/\",\"name\":\"Tong Hin&#039;s Blog\",\"description\":\"Sharing About Technology\",\"publisher\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/www.tonghin.com.my\/blog\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/02\/17\/mostly-database\/#webpage\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/02\/17\/mostly-database\/\",\"name\":\"Mostly Database! | Tong Hin&#039;s Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#website\"},\"datePublished\":\"2021-02-17T05:22:10+00:00\",\"dateModified\":\"2021-02-17T05:22:12+00:00\",\"description\":\"Database Management System terms such as Database transaction, Two-phase commit, Optimistic and Pessimistic Concurrency.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/02\/17\/mostly-database\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.tonghin.com.my\/blog\/2021\/02\/17\/mostly-database\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/02\/17\/mostly-database\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/02\/17\/mostly-database\/\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/02\/17\/mostly-database\/\",\"name\":\"Mostly Database!\"}}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/02\/17\/mostly-database\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/02\/17\/mostly-database\/#webpage\"},\"author\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#\/schema\/person\/11b81d489377d44deb601a79a57599ee\"},\"headline\":\"Mostly Database!\",\"datePublished\":\"2021-02-17T05:22:10+00:00\",\"dateModified\":\"2021-02-17T05:22:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/02\/17\/mostly-database\/#webpage\"},\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#organization\"},\"keywords\":\"Concurrency,transaction,two-phase commit\",\"articleSection\":\"Experiential\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.tonghin.com.my\/blog\/2021\/02\/17\/mostly-database\/#respond\"]}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#\/schema\/person\/11b81d489377d44deb601a79a57599ee\",\"name\":\"Faizah Chaibou\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5c69df35ce6d69b7d1b66311b4144ea8?s=96&d=mm&r=g\",\"caption\":\"Faizah Chaibou\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/posts\/197"}],"collection":[{"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/comments?post=197"}],"version-history":[{"count":4,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/posts\/197\/revisions"}],"predecessor-version":[{"id":203,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/posts\/197\/revisions\/203"}],"wp:attachment":[{"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/media?parent=197"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/categories?post=197"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/tags?post=197"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}