{"id":228,"date":"2020-05-06T21:03:00","date_gmt":"2020-05-06T18:03:00","guid":{"rendered":"https:\/\/blog.gunlerveisler.gen.tr\/?p=228"},"modified":"2020-09-21T04:14:38","modified_gmt":"2020-09-21T01:14:38","slug":"how-i-started-to-build-my-first-web-application-customer-cards-database","status":"publish","type":"post","link":"https:\/\/aliyargunes.com.tr\/blog\/how-i-started-to-build-my-first-web-application-customer-cards-database\/","title":{"rendered":"How I started to build my first web application: Customer Cards Database"},"content":{"rendered":"\n<p>It started out with some test of sql queries and practising Mysql Workbench to learn it and want to try on some basic relational algebra operators.  I have created a database to store customer and order information of an imaginary company. At the tables I have tried to perform some atomicity\/singularity processes, I tried to make sure that every single column in a table is single, then at second and third normal form. I can say that it started out with my sql learning event. I have faced some problems like &#8220;partial dependencies&#8221;, which means when the thing we&#8217;re talking about changes the data describing it will also change and if I have a &#8220;partial dependency&#8221; the data only describes part of the key. And that&#8217;s not allowed! In a nutshell I started to ask myself &#8220;does this belong here, does it describe all of the columns inside of the primary key?&#8221;. If it does it&#8217;s appropriate, if it doesn&#8217;t it&#8217;s not appropriate and I need to put it somewhere else. Also whenever have a transitive dependency all have to do is grab what the closest to the primary key and put it on its own table. <\/p>\n\n\n\n<p>Then, I googled the ACID properties (also found that MySQL is not ACID compliant because it doesn&#8217;t support consistency, isolation, or durability.) and test some relationships such as one-to-one, one-to-many, many-to-many. And Entity, referential and domain integrity and some sql joins. Also I wrote some procedures and views to storing and showing data. I upload all of these queries to my github <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/algunes\/TechLog\/tree\/master\/db_design\" target=\"_blank\">repository<\/a>. <\/p>\n\n\n\n<!--more-->\n\n\n\n<p>After all of these I thought that Why am I not able to build an app from scratch? I can start with store customer personal info cards as a beginning. I can use Java 8 and I&#8217;am familiar with sql so why not. I start to review some java ORM documentation, I felt obligated to shift sql to object oriented domain so I picked to use Hibernate 5 for persistence provider, Mysql 8 for database server, C3P0 for managing database connection pooling, Hibernate Search for Full-text search for entities, Apache Log4j2 for trace level logging, Tomcat 9 for Java Web server, Servlet 4 web containers as Controller and JSP (with Bootstrap 4.5) as View.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/aliyargunes.com.tr\/blog\/wp-content\/uploads\/2020\/07\/two-and-three-tier-architecture.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"565\" src=\"https:\/\/blog.gunlerveisler.gen.tr\/wp-content\/uploads\/2020\/07\/two-and-three-tier-architecture-1024x565.png\" alt=\"\" class=\"wp-image-230\" srcset=\"https:\/\/aliyargunes.com.tr\/blog\/wp-content\/uploads\/2020\/07\/two-and-three-tier-architecture-1024x565.png 1024w, https:\/\/aliyargunes.com.tr\/blog\/wp-content\/uploads\/2020\/07\/two-and-three-tier-architecture-300x165.png 300w, https:\/\/aliyargunes.com.tr\/blog\/wp-content\/uploads\/2020\/07\/two-and-three-tier-architecture-768x423.png 768w, https:\/\/aliyargunes.com.tr\/blog\/wp-content\/uploads\/2020\/07\/two-and-three-tier-architecture.png 1226w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption>2 and 3 Tiered DB Architectures<\/figcaption><\/figure>\n\n\n\n<p> Also I will use three-tier architecture I&#8217;am not sure these combination is suitable for this kind of job but I will see. When I finish it I will deploy the application to my vps and share the link.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It started out with some test of sql queries and practising Mysql Workbench to learn it and want to try on some basic relational algebra operators. I have created a database to store customer and order information of an imaginary &hellip; <a href=\"https:\/\/aliyargunes.com.tr\/blog\/how-i-started-to-build-my-first-web-application-customer-cards-database\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,7,8],"tags":[69,67,66,68,43],"class_list":["post-228","post","type-post","status-publish","format-standard","hentry","category-projects","category-techlog","category-works","tag-3-tiered-architecture","tag-c3p0","tag-hibernate-5","tag-java-web-application","tag-mysql"],"_links":{"self":[{"href":"https:\/\/aliyargunes.com.tr\/blog\/wp-json\/wp\/v2\/posts\/228"}],"collection":[{"href":"https:\/\/aliyargunes.com.tr\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aliyargunes.com.tr\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aliyargunes.com.tr\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aliyargunes.com.tr\/blog\/wp-json\/wp\/v2\/comments?post=228"}],"version-history":[{"count":11,"href":"https:\/\/aliyargunes.com.tr\/blog\/wp-json\/wp\/v2\/posts\/228\/revisions"}],"predecessor-version":[{"id":511,"href":"https:\/\/aliyargunes.com.tr\/blog\/wp-json\/wp\/v2\/posts\/228\/revisions\/511"}],"wp:attachment":[{"href":"https:\/\/aliyargunes.com.tr\/blog\/wp-json\/wp\/v2\/media?parent=228"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aliyargunes.com.tr\/blog\/wp-json\/wp\/v2\/categories?post=228"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aliyargunes.com.tr\/blog\/wp-json\/wp\/v2\/tags?post=228"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}