{"id":1286,"date":"2023-09-18T12:00:00","date_gmt":"2023-09-18T19:00:00","guid":{"rendered":"https:\/\/letsbuildroboticswithshadow8472.com\/?p=1286"},"modified":"2023-09-18T11:18:39","modified_gmt":"2023-09-18T18:18:39","slug":"what-are-relational-databases","status":"publish","type":"post","link":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/2023\/09\/18\/what-are-relational-databases\/","title":{"rendered":"What are Relational Databases?"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Good Morning from my Robotics Lab! This is Shadow_8472 and today I am targeting Nextcloud for major milestone completion. Let\u2019s get started.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Previously on my Nextcloud saga, I finally managed to run a pod with both Nextcloud and MariaDB in their own containers and get them to talk. The words they exchanged were along the lines of \u201cAccess Denied.\u201d I also have a script to add a temporary third container for database command line access.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">My next immediate job is learning enough MySQL to diagnose Nextcloud\u2019s refusal to create an admin account. I found a few commands to try and learned that the database I expected to be there on container creation didn\u2019t appear to be. Container logs didn\u2019t report any errors. I need some more background research, even if that\u2019s the only thing I do this week.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Most important things first: what is the relationship between MariaDB and MySQL? I\u2019ve been treating the former as if it were an implementation or distribution of the later \u2013 like the difference between Debian and Linux. But according to MariaDB\u2019s site, they\u2019re a fork that avoids \u201cvendor-lock\u201d while maintaining protocol compatibility with MySQL [1]. So MySQL help should still work for MariaDB on a \u201cclose enough\u201d basis, sort of like how Debian solutions may still work for Ubuntu systems. When available: use a matching guide.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Contrary to what I said in my closing words last time I handled Nextcloud, commands being written in all caps is only convention \u2013 the software is usually a lot more forgiving. SELECT equals sELeCT which equals select and SelEct as well as the other 60 possible combinations.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">MariaDB is what is called a \u201crelational database.\u201d Fancy phrase to me, but here goes an explanation. Data is information. Information can be organized into tables for later retrieval. Zoom out one level, and now tables with information themselves become data that interacts with information in other tables. MariaDB can track these \u201crelations.\u201d<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Takeaway<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Needless to say, relational databases gets messy fast. Considering how my database is meant to be locked up tight within a pod on a server that blocks direct access, a containerized webUI I can expose will do nicely. MariaDB\u2019s website has a lengthy list of graphical clients, but only phpMyAdmin showed up as having this feature when I used \u201cfind on page\u201d [2]. Importantly, it also shows up in Docker.io as a Docker Official Image, which I can run on Podman.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Final Question<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As of posting, I\u2019m planning on spending a week or few each for learning phpMyAdmin and refining my MariaDB understanding. Otherwise, if someone can answer what my problem is that Nextcloud isn\u2019t finding the expected database. The following is a command from my pod creation script.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>podman create \\\n        --pod NextcloudRedLaptop \\\n        --name MariaDBContainer \\\n        -v MariaDBVolume:\/var\/lib\/mysql:Z \\\n        -e MARIADB_ROOT_PASSWORD=\"&lt;gibberish1>\" \\\n        -e MARIADB_DATABASE=NextcloudDB \\\n        -e MARIADB_USER=nextcloudDbUser \\\n        -e MARIADB_PASSWORD=\"Gibberish2\" \\\n        --restart on-failure \\\n        docker.io\/library\/mariadb:latest<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">And here is what I think is the important output from MariaDB:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>MariaDB &#91;(none)]> SHOW DATABASES;\n+--------------------+\n| Database           |\n+--------------------+\n| information_schema |\n| mysql              |\n| performance_schema |\n| sys                |\n+--------------------+\n4 rows in set (0.010 sec)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If I understand what I need correctly, I should have had one show up titled \u201cNextcloudDB\u201d on container creation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And so, my final question is this: Why doesn\u2019t it work? Am I even looking in the right spot?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If I oversimplified or got something wrong about relational databases, be sure to tell me all about it in the comments!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Works Cited<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">[1] MariaDB, &#8220;MariaDB vs. MySQL The difference between choice and vendor lock-in,&#8221; <em>MariaDB<\/em>, [Online]. Available: <a href=\"https:\/\/mariadb.com\/database-topics\/mariadb-vs-mysql\/\">https:\/\/mariadb.com\/database-topics\/mariadb-vs-mysql\/<\/a>. [Accessed Sept. 18, 2023].<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">[2] MariaDB, &#8220;Graphical and Enhanced Clients,&#8221; <em>MariaDB<\/em>, [Online]. Available: <a href=\"https:\/\/mariadb.com\/kb\/en\/graphical-and-enhanced-clients\/\">https:\/\/mariadb.com\/kb\/en\/graphical-and-enhanced-clients\/<\/a>. [Accessed Sept. 18, 2023].<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Good Morning from my Robotics Lab! This is Shadow_8472 and today I am targeting Nextcloud for major milestone completion. Let\u2019s get started. Previously on my Nextcloud saga, I finally managed to run a pod with both Nextcloud and MariaDB in their own containers and get them to talk. The words they exchanged were along the &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/2023\/09\/18\/what-are-relational-databases\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;What are Relational Databases?&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[90],"tags":[140,277,278,211,283,138,282],"class_list":["post-1286","post","type-post","status-publish","format-standard","hentry","category-red-hat-server","tag-docker","tag-mariadb","tag-mysql","tag-nextcloud","tag-phpmyadmin","tag-podman","tag-relational-database"],"_links":{"self":[{"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/posts\/1286","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/comments?post=1286"}],"version-history":[{"count":1,"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/posts\/1286\/revisions"}],"predecessor-version":[{"id":1288,"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/posts\/1286\/revisions\/1288"}],"wp:attachment":[{"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/media?parent=1286"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/categories?post=1286"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/tags?post=1286"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}