{"id":21881,"date":"2016-06-09T09:08:04","date_gmt":"2016-06-09T09:08:04","guid":{"rendered":"https:\/\/www.testingdocs.com\/questions\/?p=21881"},"modified":"2024-12-16T14:26:26","modified_gmt":"2024-12-16T14:26:26","slug":"what-is-a-database-table","status":"publish","type":"post","link":"https:\/\/www.testingdocs.com\/questions\/what-is-a-database-table\/","title":{"rendered":"What is a Database Table?"},"content":{"rendered":"<h2>What is a Database Table?<\/h2>\n<p>A Relational Database Management System( RDBMS) organizes and stores information in the form of tables. The Relational model store information about real-world things in a database table.<\/p>\n<h2>Database Table<\/h2>\n<p>A table is an ordered collection of one or more columns and an unordered collection of zero or more<br \/>\nrows. Each column in the table has a name and a data type. Each table row has exactly one value<br \/>\nfor each column. The values in the table are atomic. A particular row and a particular<br \/>\ncolumn can contain only one piece of data.<\/p>\n<p>MySQL Server can manage multiples databases or schemas. Each database can have multiple database tables.<\/p>\n<p>For example, the database tables in MySQL world database can be listed using the following command:<\/p>\n<p><em>mysql&gt; SHOW TABLES;<\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-21891\" src=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/MySQL-Database-Table.png\" alt=\"MySQL Database Table\" width=\"1920\" height=\"1080\" title=\"\" srcset=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/MySQL-Database-Table.png 1920w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/MySQL-Database-Table-300x169.png 300w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/MySQL-Database-Table-1024x576.png 1024w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/MySQL-Database-Table-768x432.png 768w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/MySQL-Database-Table-1536x864.png 1536w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/p>\n<h2>Table Structure<\/h2>\n<p>To know the table structure i.e number of columns, column data types, table constraints, etc.<\/p>\n<p><em>mysql&gt; DESCRIBE City;<\/em><br \/>\n+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8212;+&#8212;&#8211;+&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;-+<br \/>\n| Field | Type | Null | Key | Default | Extra |<br \/>\n+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8212;+&#8212;&#8211;+&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;-+<br \/>\n| ID | int | NO | PRI | NULL | auto_increment |<br \/>\n| Name | char(35) | NO | | | |<br \/>\n| CountryCode | char(3) | NO | MUL | | |<br \/>\n| District | char(20) | NO | | | |<br \/>\n| Population | int | NO | | 0 | |<br \/>\n+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;-+&#8212;&#8212;+&#8212;&#8211;+&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;-+<br \/>\n5 rows in set (0.05 sec)<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-21901\" src=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Database-Table-Structure.png\" alt=\"Database Table Structure\" width=\"1920\" height=\"1080\" title=\"\" srcset=\"https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Database-Table-Structure.png 1920w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Database-Table-Structure-300x169.png 300w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Database-Table-Structure-1024x576.png 1024w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Database-Table-Structure-768x432.png 768w, https:\/\/www.testingdocs.com\/questions\/wp-content\/uploads\/Database-Table-Structure-1536x864.png 1536w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/p>\n<p>&#8212;<\/p>\n<h2>MySQL Tutorials<\/h2>\n<p>MySQL Tutorials on this website:<\/p>\n<p><a href=\"https:\/\/www.testingdocs.com\/mysql-tutorials-for-beginners\/\">https:\/\/www.testingdocs.com\/mysql-tutorials-for-beginners\/<\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is a Database Table? A Relational Database Management System( RDBMS) organizes and stores information in the form of tables. The Relational model store information about real-world things in a database table. Database Table A table is an ordered collection of one or more columns and an unordered collection of zero or more rows. Each [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[520],"tags":[],"class_list":["post-21881","post","type-post","status-publish","format-standard","hentry","category-mysql-database","has-post-title","has-post-date","has-post-category","has-post-tag","has-post-comment","has-post-author",""],"_links":{"self":[{"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/posts\/21881","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/comments?post=21881"}],"version-history":[{"count":19,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/posts\/21881\/revisions"}],"predecessor-version":[{"id":26494,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/posts\/21881\/revisions\/26494"}],"wp:attachment":[{"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/media?parent=21881"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/categories?post=21881"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.testingdocs.com\/questions\/wp-json\/wp\/v2\/tags?post=21881"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}