{"id":77769,"date":"2024-08-31T21:47:27","date_gmt":"2024-08-31T14:47:27","guid":{"rendered":"https:\/\/itviec.com\/blog\/?p=77769"},"modified":"2024-08-31T21:47:27","modified_gmt":"2024-08-31T14:47:27","slug":"cach-tao-database-trong-mysql","status":"publish","type":"post","link":"https:\/\/itviec.com\/blog\/cach-tao-database-trong-mysql\/","title":{"rendered":"T\u1ea1o database trong MySQL: H\u01b0\u1edbng d\u1eabn c\u00e1c c\u00e1ch t\u1ea1o CSDL chi ti\u1ebft"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">N\u1ed9i dung b\u00e0i vi\u1ebft<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/itviec.com\/blog\/cach-tao-database-trong-mysql\/#MySQL_la_gi\" >MySQL l\u00e0 g\u00ec?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/itviec.com\/blog\/cach-tao-database-trong-mysql\/#Tao_database_trong_MySQL_bang_MySQL_Command_Line\" >T\u1ea1o\u00a0database trong MySQL b\u1eb1ng MySQL Command Line<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/itviec.com\/blog\/cach-tao-database-trong-mysql\/#Tao_database_trong_MySQL_bang_MySQL_Workbench\" >T\u1ea1o\u00a0database trong MySQL b\u1eb1ng MySQL Workbench<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/itviec.com\/blog\/cach-tao-database-trong-mysql\/#Tuy_chinh_Charset_va_Collation_khi_tao_database_trong_MySQL\" >T\u00f9y ch\u1ec9nh Charset v\u00e0 Collation khi t\u1ea1o database trong MySQL<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/itviec.com\/blog\/cach-tao-database-trong-mysql\/#Mot_so_thao_tac_khac_voi_Database\" >M\u1ed9t s\u1ed1 thao t\u00e1c kh\u00e1c v\u1edbi Database<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/itviec.com\/blog\/cach-tao-database-trong-mysql\/#Cac_luu_y_quan_trong_khi_tao_database_trong_MySQL\" >C\u00e1c l\u01b0u \u00fd quan tr\u1ecdng khi t\u1ea1o database trong MySQL<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/itviec.com\/blog\/cach-tao-database-trong-mysql\/#Cau_hoi_thuong_gap_ve_tao_database_trong_MySQL\" >C\u00e2u h\u1ecfi th\u01b0\u1eddng g\u1eb7p v\u1ec1 t\u1ea1o database trong MySQL<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/itviec.com\/blog\/cach-tao-database-trong-mysql\/#Tong_ket_cach_tao_database_trong_MySQL\" >T\u1ed5ng k\u1ebft c\u00e1ch t\u1ea1o database trong MySQL<\/a><\/li><\/ul><\/nav><\/div>\n<p><em><strong>MySQL l\u00e0 m\u1ed9t trong nh\u1eefng h\u1ec7 qu\u1ea3n tr\u1ecb c\u01a1 s\u1edf d\u1eef li\u1ec7u ph\u1ed5 bi\u1ebfn nh\u1ea5t hi\u1ec7n nay, gi\u00fap qu\u1ea3n l\u00fd d\u1eef li\u1ec7u hi\u1ec7u qu\u1ea3 trong c\u00e1c \u1ee9ng d\u1ee5ng web v\u00e0 doanh nghi\u1ec7p. Vi\u1ec7c t\u1ea1o database l\u00e0 m\u1ed9t b\u01b0\u1edbc c\u01a1 b\u1ea3n, nh\u01b0ng r\u1ea5t quan tr\u1ecdng, \u0111\u1ec3 x\u00e2y d\u1ef1ng v\u00e0 t\u1ed5 ch\u1ee9c d\u1eef li\u1ec7u trong MySQL. D\u00f9 b\u1ea1n l\u00e0 ng\u01b0\u1eddi m\u1edbi h\u1ecdc hay \u0111\u00e3 c\u00f3 kinh nghi\u1ec7m, vi\u1ec7c n\u1eafm v\u1eefng c\u00e1ch t\u1ea1o database trong MySQL v\u00e0 qu\u1ea3n l\u00fd database s\u1ebd gi\u00fap b\u1ea1n d\u1ec5 d\u00e0ng tri\u1ec3n khai c\u00e1c d\u1ef1 \u00e1n m\u1ed9t c\u00e1ch hi\u1ec7u qu\u1ea3.<\/strong><\/em><\/p>\n<p><span style=\"font-weight: 400;\">\u0110\u1ecdc b\u00e0i vi\u1ebft n\u00e0y \u0111\u1ec3 hi\u1ec3u r\u00f5 h\u01a1n v\u1ec1:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">C\u00e1ch t\u1ea1o database v\u1edbi MySQL Command Line<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">C\u00e1ch t\u1ea1o database v\u1edbi MySQL Workbench<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">C\u00e1ch t\u00f9y ch\u1ec9nh Charset v\u00e0 Collation<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">M\u1ed9t s\u1ed1 l\u01b0u \u00fd khi t\u1ea1o database<\/span><\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"MySQL_la_gi\"><\/span><b>MySQL l\u00e0 g\u00ec?<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">MySQL l\u00e0 m\u1ed9t h\u1ec7 qu\u1ea3n tr\u1ecb c\u01a1 s\u1edf d\u1eef li\u1ec7u v\u1edbi m\u00e3 ngu\u1ed3n m\u1edf, \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng r\u1ed9ng r\u00e3i trong c\u00e1c \u1ee9ng d\u1ee5ng web v\u00e0 doanh nghi\u1ec7p \u0111\u1ec3 qu\u1ea3n l\u00fd v\u00e0 t\u1ed5 ch\u1ee9c d\u1eef li\u1ec7u.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">V\u1edbi MySQL, ng\u01b0\u1eddi d\u00f9ng c\u00f3 th\u1ec3 l\u01b0u tr\u1eef, truy v\u1ea5n v\u00e0 thao t\u00e1c d\u1eef li\u1ec7u m\u1ed9t c\u00e1ch hi\u1ec7u qu\u1ea3 v\u00e0 an to\u00e0n. H\u1ec7 th\u1ed1ng n\u00e0y h\u1ed7 tr\u1ee3 nhi\u1ec1u lo\u1ea1i d\u1eef li\u1ec7u kh\u00e1c nhau v\u00e0 cung c\u1ea5p c\u00e1c c\u00f4ng c\u1ee5 m\u1ea1nh m\u1ebd \u0111\u1ec3 qu\u1ea3n l\u00fd c\u00e1c giao d\u1ecbch ph\u1ee9c t\u1ea1p.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">MySQL c\u00f2n n\u1ed5i ti\u1ebfng v\u1edbi t\u1ed1c \u0111\u1ed9 x\u1eed l\u00fd cao v\u00e0 kh\u1ea3 n\u0103ng m\u1edf r\u1ed9ng t\u1ed1t, l\u00e0 l\u1ef1a ch\u1ecdn \u01b0u ti\u00ean cho nhi\u1ec1u doanh nghi\u1ec7p, t\u1eeb c\u00e1c startup nh\u1ecf \u0111\u1ebfn c\u00e1c t\u1eadp \u0111o\u00e0n l\u1edbn.<\/span><\/p>\n<blockquote><p><span style=\"font-weight: 400;\">Ngo\u00e0i ra b\u1ea1n c\u00f3 th\u1ec3 t\u00ecm hi\u1ec3u th\u00eam v\u1ec1 MySQL qua b\u00e0i vi\u1ebft: <a href=\"https:\/\/itviec.com\/blog\/lo-trinh-hoc-mysql-co-ban\/\" target=\"_blank\" rel=\"noopener\"><strong>H\u1ecdc MySQL c\u01a1 b\u1ea3n v\u1edbi l\u1ed9 tr\u00ecnh v\u00e0 t\u00e0i li\u1ec7u t\u1ed5ng quan<\/strong><\/a><\/span><\/p><\/blockquote>\n<h2><span class=\"ez-toc-section\" id=\"Tao_database_trong_MySQL_bang_MySQL_Command_Line\"><\/span><b>T\u1ea1o\u00a0database trong MySQL b\u1eb1ng MySQL Command Line<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Vi\u1ec7c t\u1ea1o c\u01a1 s\u1edf d\u1eef li\u1ec7u (database) trong MySQL qua giao di\u1ec7n d\u00f2ng l\u1ec7nh (Command Line) l\u00e0 m\u1ed9t thao t\u00e1c c\u01a1 b\u1ea3n v\u00e0 nhanh ch\u00f3ng. \u0110\u1ea7u ti\u00ean, b\u1ea1n c\u1ea7n truy c\u1eadp v\u00e0o MySQL Command Line b\u1eb1ng c\u00e1ch m\u1edf terminal (ho\u1eb7c command prompt) v\u00e0 nh\u1eadp l\u1ec7nh:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">mysql -u &lt;username&gt; -p<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Sau khi nh\u1eadp m\u1eadt kh\u1ea9u, b\u1ea1n s\u1ebd \u0111\u01b0\u1ee3c chuy\u1ec3n v\u00e0o giao di\u1ec7n MySQL Command Line. \u0110\u1ec3 t\u1ea1o m\u1ed9t database m\u1edbi, b\u1ea1n c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng l\u1ec7nh:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">CREATE DATABASE [IF NOT EXISTS] &lt;database_name&gt;;<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">S\u1eed d\u1ee5ng <\/span><span style=\"font-weight: 400;\">IF NOT EXISTS<\/span><span style=\"font-weight: 400;\"> gi\u00fap tr\u00e1nh vi\u1ec7c t\u1ea1o tr\u00f9ng l\u1eb7p database n\u1ebfu n\u00f3 \u0111\u00e3 t\u1ed3n t\u1ea1i. V\u00ed d\u1ee5, \u0111\u1ec3 t\u1ea1o m\u1ed9t database c\u00f3 t\u00ean l\u00e0 <\/span><span style=\"font-weight: 400;\">mydb<\/span><span style=\"font-weight: 400;\">, ta d\u00f9ng c\u00fa ph\u00e1p sau:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">CREATE DATABASE IF NOT EXISTS mydb;<\/span><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-77944\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-1-vippro.jpg\" alt=\"t\u1ea1o database trong mysql - itviec blog\" width=\"1124\" height=\"544\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-1-vippro.jpg 1124w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-1-vippro-300x145.jpg 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-1-vippro-700x339.jpg 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-1-vippro-200x97.jpg 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-1-vippro-100x48.jpg 100w\" sizes=\"auto, (max-width: 1124px) 100vw, 1124px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">N\u1ebfu database <\/span><span style=\"font-weight: 400;\">mydb<\/span><span style=\"font-weight: 400;\"> \u0111\u00e3 t\u1ed3n t\u1ea1i, MySQL s\u1ebd kh\u00f4ng t\u1ea1o l\u1ea1i v\u00e0 kh\u00f4ng ph\u00e1t sinh l\u1ed7i, gi\u00fap b\u1ea1n qu\u1ea3n l\u00fd c\u01a1 s\u1edf d\u1eef li\u1ec7u d\u1ec5 d\u00e0ng h\u01a1n.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Ngo\u00e0i ra, \u0111\u1ec3 ki\u1ec3m tra danh s\u00e1ch c\u00e1c database hi\u1ec7n c\u00f3 ta s\u1eed d\u1ee5ng l\u1ec7nh:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">SHOW DATABASES;<\/span><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-77945\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/show-database-vippro.jpg\" alt=\"show database trong mysql - itviec blog\" width=\"814\" height=\"698\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/show-database-vippro.jpg 814w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/show-database-vippro-300x257.jpg 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/show-database-vippro-768x659.jpg 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/show-database-vippro-200x171.jpg 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/show-database-vippro-100x86.jpg 100w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/show-database-vippro-525x450.jpg 525w\" sizes=\"auto, (max-width: 814px) 100vw, 814px\" \/><\/p>\n<blockquote><p><span style=\"font-weight: 400;\"><strong>L\u01b0u \u00fd<\/strong> r\u1eb1ng cu\u1ed1i m\u1ed7i l\u1ec7nh ph\u1ea3i c\u00f3 d\u1ea5u ch\u1ea5m ph\u1ea9y <\/span><b>; <\/b><span style=\"font-weight: 400;\">\u0111\u1ec3 l\u1ec7nh \u0111\u01b0\u1ee3c th\u1ef1c thi \u0111\u00fang c\u00e1ch.<\/span><\/p><\/blockquote>\n<h2><span class=\"ez-toc-section\" id=\"Tao_database_trong_MySQL_bang_MySQL_Workbench\"><\/span><b>T\u1ea1o\u00a0database trong MySQL b\u1eb1ng MySQL Workbench<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">MySQL Workbench l\u00e0 m\u1ed9t c\u00f4ng c\u1ee5 m\u1ea1nh m\u1ebd v\u1edbi giao di\u1ec7n \u0111\u1ed3 h\u1ecda (GUI) gi\u00fap b\u1ea1n d\u1ec5 d\u00e0ng qu\u1ea3n l\u00fd v\u00e0 thao t\u00e1c v\u1edbi c\u01a1 s\u1edf d\u1eef li\u1ec7u MySQL m\u00e0 kh\u00f4ng c\u1ea7n ph\u1ea3i s\u1eed d\u1ee5ng d\u00f2ng l\u1ec7nh. \u0110\u1ec3 t\u1ea1o m\u1ed9t database m\u1edbi b\u1eb1ng MySQL Workbench, b\u1ea1n c\u00f3 th\u1ec3 th\u1ef1c hi\u1ec7n c\u00e1c b\u01b0\u1edbc sau:<\/span><\/p>\n<p><b>B\u01b0\u1edbc 1<\/b><span style=\"font-weight: 400;\">: Kh\u1edfi \u0111\u1ed9ng MySQL Workbench v\u00e0 k\u1ebft n\u1ed1i v\u1edbi m\u00e1y ch\u1ee7 MySQL c\u1ee7a b\u1ea1n b\u1eb1ng c\u00e1ch nh\u1ea5p v\u00e0o k\u1ebft n\u1ed1i \u0111\u00e3 \u0111\u01b0\u1ee3c thi\u1ebft l\u1eadp ho\u1eb7c t\u1ea1o k\u1ebft n\u1ed1i m\u1edbi.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-77948\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-workbench-1-vippro.png\" alt=\"t\u1ea1o database trong mysql v\u1edbi mysql workbench - itviec blog\" width=\"1000\" height=\"593\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-workbench-1-vippro.png 1000w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-workbench-1-vippro-300x178.png 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-workbench-1-vippro-700x415.png 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-workbench-1-vippro-200x119.png 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-workbench-1-vippro-100x59.png 100w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/p>\n<p><b>B\u01b0\u1edbc 2<\/b><span style=\"font-weight: 400;\">: Nh\u1eadp t\u00ean cho connection v\u00e0 user, sau \u0111\u00f3 nh\u1ea5p v\u00e0o Test connection r\u1ed3i nh\u1eadp m\u1eadt kh\u1ea9u.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-77947\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-workbench-2-vippro.png\" alt=\"t\u1ea1o database trong mysql v\u1edbi mysql workbench - itviec blog\" width=\"786\" height=\"493\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-workbench-2-vippro.png 786w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-workbench-2-vippro-300x188.png 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-workbench-2-vippro-700x439.png 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-workbench-2-vippro-200x125.png 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-workbench-2-vippro-100x63.png 100w\" sizes=\"auto, (max-width: 786px) 100vw, 786px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">Sau \u0111\u00f3, b\u1ea1n ch\u1ec9 c\u1ea7n nh\u1ea5p v\u00e0o c\u00e1c th\u00f4ng b\u00e1o hi\u1ec7n l\u00ean \u0111\u1ec3 ho\u00e0n t\u1ea5t v\u00e0 v\u00e0o giao di\u1ec7n ch\u00ednh c\u1ee7a MySQL Workbench nh\u01b0 h\u00ecnh sau:<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-77946\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-workbench-3-vippro.png\" alt=\"t\u1ea1o database trong mysql v\u1edbi mysql workbench - itviec blog\" width=\"766\" height=\"470\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-workbench-3-vippro.png 766w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-workbench-3-vippro-300x184.png 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-workbench-3-vippro-700x430.png 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-workbench-3-vippro-200x123.png 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-workbench-3-vippro-100x61.png 100w\" sizes=\"auto, (max-width: 766px) 100vw, 766px\" \/><\/p>\n<p><b>B\u01b0\u1edbc 3<\/b><span style=\"font-weight: 400;\">: Sau khi k\u1ebft n\u1ed1i th\u00e0nh c\u00f4ng, b\u1ea1n s\u1ebd th\u1ea5y m\u1ed9t danh s\u00e1ch c\u00e1c c\u01a1 s\u1edf d\u1eef li\u1ec7u hi\u1ec7n c\u00f3 \u1edf ph\u1ea7n &#8220;Navigator&#8221; b\u00ean tr\u00e1i. \u0110\u1ec3 t\u1ea1o m\u1ed9t database m\u1edbi, nh\u1ea5p chu\u1ed9t ph\u1ea3i v\u00e0o ph\u1ea7n &#8220;Schemas&#8221; v\u00e0 ch\u1ecdn &#8220;Create Schema&#8221;.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-77951\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-workbench-4-vippro.png\" alt=\"t\u1ea1o database trong mysql v\u1edbi mysql workbench - itviec blog\" width=\"209\" height=\"331\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-workbench-4-vippro.png 209w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-workbench-4-vippro-189x300.png 189w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-workbench-4-vippro-126x200.png 126w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-workbench-4-vippro-63x100.png 63w\" sizes=\"auto, (max-width: 209px) 100vw, 209px\" \/><\/p>\n<p><b>B\u01b0\u1edbc 4<\/b><span style=\"font-weight: 400;\">: Trong c\u1eeda s\u1ed5 &#8220;Create Schema&#8221;, nh\u1eadp t\u00ean cho database c\u1ee7a b\u1ea1n v\u00e0o tr\u01b0\u1eddng &#8220;Name&#8221;. V\u00ed d\u1ee5, b\u1ea1n c\u00f3 th\u1ec3 \u0111\u1eb7t t\u00ean l\u00e0 <\/span><i><span style=\"font-weight: 400;\">employeedb<\/span><\/i><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-77950\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-workbench-5-vippro.png\" alt=\"t\u1ea1o database trong mysql v\u1edbi mysql workbench - itviec blog\" width=\"731\" height=\"436\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-workbench-5-vippro.png 731w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-workbench-5-vippro-300x179.png 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-workbench-5-vippro-700x418.png 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-workbench-5-vippro-200x119.png 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-workbench-5-vippro-100x60.png 100w\" sizes=\"auto, (max-width: 731px) 100vw, 731px\" \/><\/p>\n<p><b>B\u01b0\u1edbc 5<\/b><span style=\"font-weight: 400;\">: Trong c\u1eeda s\u1ed5 &#8220;Apply SQL Script to Database&#8221; m\u1edf ra, nh\u1ea5p v\u00e0o &#8220;Apply&#8221;. Sau \u0111\u00f3, nh\u1ea5p &#8220;Finish&#8221; \u0111\u1ec3 ho\u00e0n t\u1ea5t.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-77949\" src=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-workbench-6-vippro.png\" alt=\"t\u1ea1o database trong mysql v\u1edbi mysql workbench - itviec blog\" width=\"681\" height=\"318\" srcset=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-workbench-6-vippro.png 681w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-workbench-6-vippro-300x140.png 300w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-workbench-6-vippro-640x299.png 640w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-workbench-6-vippro-200x93.png 200w, https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-database-trong-mysql-workbench-6-vippro-100x47.png 100w\" sizes=\"auto, (max-width: 681px) 100vw, 681px\" \/><\/p>\n<p><b>B\u01b0\u1edbc 6<\/b><span style=\"font-weight: 400;\">: Sau khi t\u1ea1o database th\u00e0nh c\u00f4ng, ch\u00fang ta c\u00f3 th\u1ec3 th\u1ea5y database m\u1edbi trong danh s\u00e1ch Schema b\u00ean tr\u00e1i. N\u1ebfu kh\u00f4ng th\u1ea5y, h\u00e3y nh\u1ea5p v\u00e0o bi\u1ec3u t\u01b0\u1ee3ng l\u00e0m m\u1edbi trong danh s\u00e1ch Schema.<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Tuy_chinh_Charset_va_Collation_khi_tao_database_trong_MySQL\"><\/span><b>T\u00f9y ch\u1ec9nh Charset v\u00e0 Collation khi t\u1ea1o database trong MySQL<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Khi t\u1ea1o m\u1ed9t c\u01a1 s\u1edf d\u1eef li\u1ec7u (database) trong MySQL, vi\u1ec7c ch\u1ecdn charset v\u00e0 collation ph\u00f9 h\u1ee3p l\u00e0 r\u1ea5t quan tr\u1ecdng \u0111\u1ec3 \u0111\u1ea3m b\u1ea3o r\u1eb1ng d\u1eef li\u1ec7u \u0111\u01b0\u1ee3c l\u01b0u tr\u1eef v\u00e0 x\u1eed l\u00fd m\u1ed9t c\u00e1ch ch\u00ednh x\u00e1c.<\/span><\/p>\n<p><b>Charset (Character Set)<\/b><span style=\"font-weight: 400;\"> (b\u1ed9 k\u00fd t\u1ef1) l\u00e0 t\u1eadp h\u1ee3p c\u00e1c k\u00fd t\u1ef1 m\u00e0 c\u01a1 s\u1edf d\u1eef li\u1ec7u c\u1ee7a b\u1ea1n c\u00f3 th\u1ec3 l\u01b0u tr\u1eef. M\u1ed7i charset x\u00e1c \u0111\u1ecbnh m\u1ed9t b\u1ed9 k\u00fd t\u1ef1 c\u1ee5 th\u1ec3, v\u00ed d\u1ee5 nh\u01b0 charset <\/span><i><span style=\"font-weight: 400;\">utf8<\/span><\/i><span style=\"font-weight: 400;\"> cho ph\u00e9p b\u1ea1n l\u01b0u tr\u1eef c\u00e1c k\u00fd t\u1ef1 t\u1eeb b\u1ea3ng m\u00e3 Unicode, bao g\u1ed3m c\u00e1c k\u00fd t\u1ef1 t\u1eeb nhi\u1ec1u ng\u00f4n ng\u1eef kh\u00e1c nhau nh\u01b0 ti\u1ebfng Anh, ti\u1ebfng Vi\u1ec7t, ti\u1ebfng Trung,&#8230;.<\/span><\/p>\n<p><b>Collation<\/b><span style=\"font-weight: 400;\"> gi\u00fap x\u00e1c \u0111\u1ecbnh c\u00e1ch c\u00e1c k\u00fd t\u1ef1 trong m\u1ed9t charset \u0111\u01b0\u1ee3c so s\u00e1nh v\u00e0 s\u1eafp x\u1ebfp. N\u00f3 \u1ea3nh h\u01b0\u1edfng \u0111\u1ebfn vi\u1ec7c s\u1eafp x\u1ebfp c\u00e1c chu\u1ed7i k\u00fd t\u1ef1 v\u00e0 c\u00e1ch th\u1ef1c hi\u1ec7n c\u00e1c so s\u00e1nh v\u0103n b\u1ea3n. V\u00ed d\u1ee5, collation <\/span><i><span style=\"font-weight: 400;\">utf8_general_ci<\/span><\/i><span style=\"font-weight: 400;\"> s\u1eed d\u1ee5ng charset <\/span><i><span style=\"font-weight: 400;\">utf8<\/span><\/i><span style=\"font-weight: 400;\"> v\u00e0 th\u1ef1c hi\u1ec7n so s\u00e1nh kh\u00f4ng ph\u00e2n bi\u1ec7t hoa th\u01b0\u1eddng (ci vi\u1ebft t\u1eaft c\u1ee7a case-insensitive).<\/span><\/p>\n<h3><b>C\u00e2u l\u1ec7nh T\u00f9y Ch\u1ec9nh Charset v\u00e0 Collation<\/b><\/h3>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u0110\u1ec3 t\u1ea1o m\u1ed9t database v\u1edbi charset v\u00e0 collation t\u00f9y ch\u1ec9nh, b\u1ea1n c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng c\u00fa ph\u00e1p sau:<\/span><\/li>\n<\/ul>\n<pre><span style=\"font-weight: 400;\">CREATE<\/span><span style=\"font-weight: 400;\"> DATABASE &lt;database_name&gt; <\/span>\r\n<span style=\"font-weight: 400;\">CHARACTER<\/span> <span style=\"font-weight: 400;\">SET<\/span><span style=\"font-weight: 400;\"> &lt;charset_name&gt; <\/span>\r\n<span style=\"font-weight: 400;\">COLLATE<\/span><span style=\"font-weight: 400;\"> &lt;collation_name&gt;;<\/span><\/pre>\n<p>V\u00ed d\u1ee5, \u0111\u1ec3 t\u1ea1o m\u1ed9t database t\u00ean l\u00e0<i> mydb<\/i> v\u1edbi charset l\u00e0 <i>UTF-8<\/i> v\u00e0 collation l\u00e0 <i>utf8mb4_general_ci<\/i>, ta s\u1ebd s\u1eed d\u1ee5ng l\u1ec7nh:<\/p>\n<pre><span style=\"font-weight: 400;\">CREATE<\/span><span style=\"font-weight: 400;\"> DATABASE mydb<\/span>\r\n\r\n<span style=\"font-weight: 400;\">CHARACTER<\/span> <span style=\"font-weight: 400;\">SET<\/span><span style=\"font-weight: 400;\"> utf8mb4<\/span>\r\n\r\n<span style=\"font-weight: 400;\">COLLATE<\/span><span style=\"font-weight: 400;\"> utf8mb4_general_ci;<\/span><\/pre>\n<p>N\u1ebfu \u0111\u00e3 c\u00f3 m\u1ed9t database v\u00e0 mu\u1ed1n thay \u0111\u1ed5i charset ho\u1eb7c collation c\u1ee7a n\u00f3, ta c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng l\u1ec7nh sau:<\/p>\n<pre><span style=\"font-weight: 400;\">ALTER<\/span><span style=\"font-weight: 400;\"> DATABASE &lt;database_name&gt; <\/span>\r\n<span style=\"font-weight: 400;\">CHARACTER<\/span> <span style=\"font-weight: 400;\">SET<\/span><span style=\"font-weight: 400;\"> &lt;charset_name&gt; <\/span>\r\n<span style=\"font-weight: 400;\">COLLATE<\/span><span style=\"font-weight: 400;\"> &lt;collation_name&gt;;<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Ngo\u00e0i ra b\u1ea1n c\u00f3 th\u1ec3 tham kh\u1ea3o th\u00eam danh s\u00e1ch c\u00e1c charset v\u00e0 c\u00e1c collation t\u01b0\u01a1ng \u1ee9ng <\/span><a href=\"https:\/\/dev.mysql.com\/doc\/refman\/8.4\/en\/charset-mysql.html\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">t\u1ea1i \u0111\u00e2y<\/span><\/a><span style=\"font-weight: 400;\">.<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Mot_so_thao_tac_khac_voi_Database\"><\/span><b>M\u1ed9t s\u1ed1 thao t\u00e1c kh\u00e1c v\u1edbi Database<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Sau khi \u0111\u00e3 t\u1ea1o xong m\u1ed9t database, c\u00f3 m\u1ed9t s\u1ed1 thao t\u00e1c c\u01a1 b\u1ea3n m\u00e0 b\u1ea1n c\u00f3 th\u1ec3 c\u1ea7n th\u1ef1c hi\u1ec7n \u0111\u1ec3 qu\u1ea3n l\u00fd v\u00e0 s\u1eed d\u1ee5ng database \u0111\u00f3 trong MySQL:<\/span><\/p>\n<h3><b>Ch\u1ecdn Database \u0111\u1ec3 s\u1eed d\u1ee5ng (USE)<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Tr\u01b0\u1edbc khi th\u1ef1c hi\u1ec7n c\u00e1c thao t\u00e1c nh\u01b0 t\u1ea1o b\u1ea3ng ho\u1eb7c truy v\u1ea5n d\u1eef li\u1ec7u, b\u1ea1n c\u1ea7n ch\u1ecdn database m\u00e0 b\u1ea1n mu\u1ed1n l\u00e0m vi\u1ec7c b\u1eb1ng c\u00e1ch s\u1eed d\u1ee5ng l\u1ec7nh <\/span><span style=\"font-weight: 400;\">USE<\/span><span style=\"font-weight: 400;\">. L\u1ec7nh n\u00e0y s\u1ebd ch\u1ec9 \u0111\u1ecbnh database m\u1eb7c \u0111\u1ecbnh cho t\u1ea5t c\u1ea3 c\u00e1c thao t\u00e1c ti\u1ebfp theo.<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">USE database_name;<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Sau khi th\u1ef1c thi l\u1ec7nh n\u00e0y, m\u1ecdi l\u1ec7nh SQL b\u1ea1n nh\u1eadp sau \u0111\u00f3 s\u1ebd \u0111\u01b0\u1ee3c \u00e1p d\u1ee5ng cho database \u0111\u01b0\u1ee3c g\u1ecdi.<\/span><\/p>\n<h3><b>X\u00f3a Database (DROP)<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">N\u1ebfu b\u1ea1n mu\u1ed1n x\u00f3a m\u1ed9t database kh\u00f4ng c\u00f2n s\u1eed d\u1ee5ng, b\u1ea1n c\u00f3 th\u1ec3 d\u00f9ng l\u1ec7nh <\/span><span style=\"font-weight: 400;\">DROP DATABASE<\/span><span style=\"font-weight: 400;\">.\u00a0<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">DROP DATABASE database_name;<\/span><\/pre>\n<blockquote><p><strong>L\u01b0u \u00fd<\/strong> r\u1eb1ng thao t\u00e1c n\u00e0y s\u1ebd x\u00f3a to\u00e0n b\u1ed9 d\u1eef li\u1ec7u v\u00e0 c\u00e1c b\u1ea3ng trong database v\u00e0 kh\u00f4ng th\u1ec3 ho\u00e0n t\u00e1c<span style=\"font-weight: 400;\">.\u00a0<\/span><\/p><\/blockquote>\n<p><span style=\"font-weight: 400;\">\u0110\u1ec3 tr\u00e1nh g\u1eb7p l\u1ed7i khi x\u00f3a database kh\u00f4ng t\u1ed3n t\u1ea1i, b\u1ea1n c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng c\u00fa ph\u00e1p sau:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">DROP DATABASE IF EXISTS database_name;<\/span><\/pre>\n<h3><b>T\u1ea1o b\u1ea3ng m\u1edbi trong database<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">\u0110\u1ec3 t\u1ea1o b\u1ea3ng m\u1edbi, ta s\u1eed d\u1ee5ng c\u00fa ph\u00e1p sau:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">CREATE TABLE &lt;table_name&gt; (<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0&lt;column1_name&gt; &lt;data_type&gt; [constraints],<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0&lt;column2_name&gt; &lt;data_type&gt; [constraints],<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0...<\/span>\r\n<span style=\"font-weight: 400;\">);<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">V\u00ed d\u1ee5, \u0111\u1ec3 t\u1ea1o m\u1ed9t b\u1ea3ng c\u00f3 t\u00ean <\/span><i><span style=\"font-weight: 400;\">users<\/span><\/i><span style=\"font-weight: 400;\"> v\u1edbi c\u00e1c c\u1ed9t user_id, username v\u00e0 email, ta s\u1eed d\u1ee5ng l\u1ec7nh:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">CREATE TABLE users (<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0user_id INT PRIMARY KEY,<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0username VARCHAR(50) NOT NULL,<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0email VARCHAR(100) NOT NULL<\/span>\r\n<span style=\"font-weight: 400;\">);<\/span><\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Cac_luu_y_quan_trong_khi_tao_database_trong_MySQL\"><\/span><b>C\u00e1c l\u01b0u \u00fd quan tr\u1ecdng khi t\u1ea1o database trong MySQL<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><b>\u0110\u1eb7t t\u00ean b\u1ea3ng v\u00e0 c\u1ed9t<\/b><\/h3>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>D\u00f9ng snake_case thay v\u00ec CamelCase<\/b><span style=\"font-weight: 400;\">: S\u1eed d\u1ee5ng <\/span><i><span style=\"font-weight: 400;\">customer_orders<\/span><\/i><span style=\"font-weight: 400;\"> thay v\u00ec <\/span><i><span style=\"font-weight: 400;\">CustomerOrders<\/span><\/i><span style=\"font-weight: 400;\"> \u0111\u1ec3 tr\u00e1nh nh\u1ea7m l\u1eabn khi \u0111\u1ecdc v\u00e0 gi\u00fap t\u0103ng kh\u1ea3 n\u0103ng truy c\u1eadp, \u0111\u1eb7c bi\u1ec7t l\u00e0 v\u1edbi ng\u01b0\u1eddi d\u00f9ng c\u00f3 v\u1ea5n \u0111\u1ec1 v\u1ec1 th\u1ecb l\u1ef1c ho\u1eb7c kh\u00f4ng ph\u1ea3i ng\u01b0\u1eddi b\u1ea3n ng\u1eef.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>T\u00ean b\u1ea3ng \u1edf d\u1ea1ng s\u1ed1 nhi\u1ec1u<\/b><span style=\"font-weight: 400;\">: \u0110\u1eb7t t\u00ean b\u1ea3ng \u1edf d\u1ea1ng s\u1ed1 nhi\u1ec1u, ch\u1eb3ng h\u1ea1n nh\u01b0 <\/span><i><span style=\"font-weight: 400;\">customers<\/span><\/i><span style=\"font-weight: 400;\"> thay v\u00ec <\/span><i><span style=\"font-weight: 400;\">customer<\/span><\/i><span style=\"font-weight: 400;\">, \u0111\u1ec3 tr\u00e1nh xung \u0111\u1ed9t v\u1edbi c\u00e1c t\u1eeb kh\u00f3a d\u00e0nh ri\u00eang trong SQL v\u00e0 gi\u1ea3m thi\u1ec3u c\u00e1c l\u1ed7i ti\u1ec1m \u1ea9n.<\/span><\/li>\n<\/ul>\n<h3><b>T\u00ean c\u1ed9t \u0111\u1ea7y \u0111\u1ee7 v\u00e0 r\u00f5 r\u00e0ng<\/b><\/h3>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Kh\u00f4ng s\u1eed d\u1ee5ng t\u00ean c\u1ed9t ch\u1ec9 l\u00e0 <\/b><b><i>id<\/i><\/b><span style=\"font-weight: 400;\">: Thay v\u00ec ch\u1ec9 \u0111\u1eb7t t\u00ean c\u1ed9t l\u00e0 <\/span><i><span style=\"font-weight: 400;\">id<\/span><\/i><span style=\"font-weight: 400;\">, h\u00e3y s\u1eed d\u1ee5ng t\u00ean \u0111\u1ea7y \u0111\u1ee7 nh\u01b0 <\/span><i><span style=\"font-weight: 400;\">customer_id, order_id<\/span><\/i><span style=\"font-weight: 400;\"> \u0111\u1ec3 tr\u00e1nh s\u1ef1 nh\u1ea7m l\u1eabn trong c\u00e1c truy v\u1ea5n ph\u1ee9c t\u1ea1p v\u00e0 d\u1ec5 d\u00e0ng x\u00e1c \u0111\u1ecbnh c\u1ed9t d\u1eef li\u1ec7u.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Tr\u00e1nh s\u1eed d\u1ee5ng t\u1eeb m\u00f4 t\u1ea3 chung chung<\/b><span style=\"font-weight: 400;\">: \u0110\u1eb7t t\u00ean c\u1ed9t c\u1ee5 th\u1ec3 theo ch\u1ee9c n\u0103ng, v\u00ed d\u1ee5 nh\u01b0 <\/span><i><span style=\"font-weight: 400;\">temperature_celsius<\/span><\/i><span style=\"font-weight: 400;\"> thay v\u00ec ch\u1ec9 <\/span><i><span style=\"font-weight: 400;\">temperature<\/span><\/i><span style=\"font-weight: 400;\">, \u0111\u1ec3 tr\u00e1nh nh\u1ea7m l\u1eabn v\u00e0 l\u00e0m r\u00f5 \u00fd ngh\u0129a c\u1ee7a c\u1ed9t d\u1eef li\u1ec7u.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>\u0110\u1eb7t t\u00ean c\u1ed9t m\u1ed9t c\u00e1ch chi ti\u1ebft v\u00e0 c\u1ee5 th\u1ec3<\/b><span style=\"font-weight: 400;\">: \u0110i\u1ec1u n\u00e0y gi\u00fap tr\u00e1nh s\u1ef1 nh\u1ea7m l\u1eabn trong qu\u00e1 tr\u00ecnh vi\u1ebft v\u00e0 b\u1ea3o tr\u00ec SQL, \u0111\u1ed3ng th\u1eddi l\u00e0m r\u00f5 m\u1ee5c \u0111\u00edch s\u1eed d\u1ee5ng c\u1ee7a t\u1eebng c\u1ed9t.<\/span><\/li>\n<\/ul>\n<h3><b>\u0110\u1ea3m b\u1ea3o t\u00ednh nh\u1ea5t qu\u00e1n<\/b><\/h3>\n<ul>\n<li><b>T\u00ean c\u1ed9t kho\u00e1 ph\u1ea3i nh\u1ea5t qu\u00e1n<\/b><span style=\"font-weight: 400;\">: Khi s\u1eed d\u1ee5ng c\u00e1c kh\u00f3a ngo\u1ea1i (foreign key), h\u00e3y \u0111\u1ea3m b\u1ea3o r\u1eb1ng t\u00ean c\u1ed9t tr\u00ean c\u1ea3 hai b\u1ea3ng li\u00ean k\u1ebft ph\u1ea3i nh\u1ea5t qu\u00e1n \u0111\u1ec3 tr\u00e1nh s\u1ef1 m\u01a1 h\u1ed3. V\u00ed d\u1ee5, n\u1ebfu m\u1ed9t c\u1ed9t c\u00f3 t\u00ean l\u00e0 <\/span><i><span style=\"font-weight: 400;\">company_id<\/span><\/i><span style=\"font-weight: 400;\"> trong b\u1ea3ng n\u00e0y th\u00ec b\u1ea3ng li\u00ean k\u1ebft c\u0169ng n\u00ean d\u00f9ng <\/span><i><span style=\"font-weight: 400;\">company_id <\/span><\/i><span style=\"font-weight: 400;\">thay v\u00ec <\/span><i><span style=\"font-weight: 400;\">owner<\/span><\/i><span style=\"font-weight: 400;\">.<\/span><\/li>\n<li><b>S\u1eed d\u1ee5ng t\u00ean m\u00f4 t\u1ea3 \u00fd ngh\u0129a n\u1ebfu c\u1ea7n<\/b><span style=\"font-weight: 400;\">: Trong m\u1ed9t s\u1ed1 tr\u01b0\u1eddng h\u1ee3p, n\u1ebfu c\u1ea7n r\u00f5 r\u00e0ng h\u01a1n v\u1ec1 ng\u1eef ngh\u0129a, b\u1ea1n c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng t\u00ean m\u00f4 t\u1ea3 nh\u01b0 <\/span><i><span style=\"font-weight: 400;\">owning_company_id<\/span><\/i><span style=\"font-weight: 400;\"> \u0111\u1ec3 th\u1ec3 hi\u1ec7n r\u00f5 m\u1ee5c \u0111\u00edch c\u1ee7a c\u1ed9t.<\/span><\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Cau_hoi_thuong_gap_ve_tao_database_trong_MySQL\"><\/span><b>C\u00e2u h\u1ecfi th\u01b0\u1eddng g\u1eb7p v\u1ec1 t\u1ea1o database trong MySQL<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><b>MySQL Workbench l\u00e0 g\u00ec?<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">MySQL Workbench l\u00e0 m\u1ed9t c\u00f4ng c\u1ee5 qu\u1ea3n l\u00fd c\u01a1 s\u1edf d\u1eef li\u1ec7u v\u1edbi giao di\u1ec7n \u0111\u1ed3 h\u1ecda (GUI), gi\u00fap ng\u01b0\u1eddi d\u00f9ng t\u1ea1o v\u00e0 qu\u1ea3n l\u00fd c\u01a1 s\u1edf d\u1eef li\u1ec7u d\u1ec5 d\u00e0ng h\u01a1n m\u00e0 kh\u00f4ng c\u1ea7n ph\u1ea3i s\u1eed d\u1ee5ng d\u00f2ng l\u1ec7nh. N\u00f3 cung c\u1ea5p c\u00e1c t\u00ednh n\u0103ng tr\u1ef1c quan \u0111\u1ec3 t\u1ea1o database, t\u1ea1o b\u1ea3ng v\u00e0 qu\u1ea3n l\u00fd d\u1eef li\u1ec7u.<\/span><\/p>\n<h3><b>C\u00f3 th\u1ec3 thay \u0111\u1ed5i t\u00ean c\u1ee7a m\u1ed9t database \u0111\u00e3 t\u1ea1o kh\u00f4ng?<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">MySQL kh\u00f4ng h\u1ed7 tr\u1ee3 tr\u1ef1c ti\u1ebfp vi\u1ec7c \u0111\u1ed5i t\u00ean database. Tuy nhi\u00ean, b\u1ea1n c\u00f3 th\u1ec3 th\u1ef1c hi\u1ec7n vi\u1ec7c \u0111\u1ed5i t\u00ean b\u1eb1ng c\u00e1ch sao ch\u00e9p d\u1eef li\u1ec7u sang m\u1ed9t database m\u1edbi v\u00e0 sau \u0111\u00f3 x\u00f3a database c\u0169.<\/span><\/p>\n<h3><b>L\u00e0m th\u1ebf n\u00e0o \u0111\u1ec3 ki\u1ec3m tra xem m\u1ed9t database c\u00f3 t\u1ed3n t\u1ea1i hay kh\u00f4ng tr\u01b0\u1edbc khi t\u1ea1o m\u1edbi?<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Tr\u01b0\u1edbc khi t\u1ea1o database, b\u1ea1n c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng l\u1ec7nh <\/span><span style=\"font-weight: 400;\">SHOW DATABASES LIKE &#8216;database_name&#8217;;<\/span><span style=\"font-weight: 400;\"> \u0111\u1ec3 ki\u1ec3m tra xem database \u0111\u00e3 t\u1ed3n t\u1ea1i hay ch\u01b0a.<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Tong_ket_cach_tao_database_trong_MySQL\"><\/span><b>T\u1ed5ng k\u1ebft c\u00e1ch t\u1ea1o database trong MySQL<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">T\u1ea1o database trong MySQL l\u00e0 m\u1ed9t thao t\u00e1c c\u01a1 b\u1ea3n nh\u01b0ng \u0111\u00f3ng vai tr\u00f2 quan tr\u1ecdng trong vi\u1ec7c t\u1ed5 ch\u1ee9c d\u1eef li\u1ec7u. Cho d\u00f9 b\u1ea1n s\u1eed d\u1ee5ng d\u00f2ng l\u1ec7nh hay MySQL Workbench, vi\u1ec7c tu\u00e2n th\u1ee7 c\u00e1c quy t\u1eafc \u0111\u1eb7t t\u00ean v\u00e0 qu\u1ea3n l\u00fd c\u01a1 s\u1edf d\u1eef li\u1ec7u s\u1ebd gi\u00fap h\u1ec7 th\u1ed1ng c\u1ee7a b\u1ea1n tr\u1edf n\u00ean d\u1ec5 hi\u1ec3u v\u00e0 d\u1ec5 b\u1ea3o tr\u00ec h\u01a1n.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">ITviec hy v\u1ecdng b\u00e0i vi\u1ebft n\u00e0y \u0111\u00e3 cung c\u1ea5p \u0111\u1ea7y \u0111\u1ee7 th\u00f4ng tin \u0111\u1ec3 b\u1ea1n c\u00f3 th\u1ec3 t\u1ea1o th\u00e0nh c\u00f4ng m\u1ed9t database v\u00e0 l\u01b0u \u00fd m\u1ed9t s\u1ed1 \u0111i\u1ec3m quan tr\u1ecdng trong qu\u00e1 tr\u00ecnh th\u1ef1c hi\u1ec7n.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>MySQL l\u00e0 m\u1ed9t trong nh\u1eefng h\u1ec7 qu\u1ea3n tr\u1ecb c\u01a1 s\u1edf d\u1eef li\u1ec7u ph\u1ed5 bi\u1ebfn nh\u1ea5t hi\u1ec7n nay, gi\u00fap qu\u1ea3n l\u00fd d\u1eef li\u1ec7u hi\u1ec7u qu\u1ea3 trong c\u00e1c \u1ee9ng d\u1ee5ng web v\u00e0 doanh nghi\u1ec7p. Vi\u1ec7c t\u1ea1o database l\u00e0 m\u1ed9t b\u01b0\u1edbc c\u01a1 b\u1ea3n, nh\u01b0ng r\u1ea5t quan tr\u1ecdng, \u0111\u1ec3 x\u00e2y d\u1ef1ng v\u00e0 t\u1ed5 ch\u1ee9c d\u1eef li\u1ec7u trong MySQL. D\u00f9 [&hellip;]<\/p>\n","protected":false},"author":209,"featured_media":77943,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_gspb_post_css":"","footnotes":""},"categories":[109],"tags":[],"class_list":["post-77769","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-chuyen-mon-it"],"blocksy_meta":[],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.8 (Yoast SEO v27.8) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>T\u1ea1o database trong MySQL: H\u01b0\u1edbng d\u1eabn c\u00e1c c\u00e1ch t\u1ea1o CSDL chi ti\u1ebft - ITviec Blog<\/title>\n<meta name=\"description\" content=\"T\u1ea1o database l\u00e0 b\u01b0\u1edbc quan tr\u1ecdng trong t\u1ed5 ch\u1ee9c d\u1eef li\u1ec7u. Hi\u1ec3u c\u00e1ch t\u1ea1o database trong MySQL v\u00e0 c\u00e1ch qu\u1ea3n l\u00fd s\u1ebd gi\u00fap d\u1ef1 \u00e1n hi\u1ec7u qu\u1ea3 h\u01a1n.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/itviec.com\/blog\/cach-tao-database-trong-mysql\/\" \/>\n<meta property=\"og:locale\" content=\"vi_VN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"T\u1ea1o database trong MySQL: H\u01b0\u1edbng d\u1eabn c\u00e1c c\u00e1ch t\u1ea1o CSDL chi ti\u1ebft\" \/>\n<meta property=\"og:description\" content=\"MySQL l\u00e0 m\u1ed9t trong nh\u1eefng h\u1ec7 qu\u1ea3n tr\u1ecb c\u01a1 s\u1edf d\u1eef li\u1ec7u ph\u1ed5 bi\u1ebfn nh\u1ea5t hi\u1ec7n nay, gi\u00fap qu\u1ea3n l\u00fd d\u1eef li\u1ec7u hi\u1ec7u qu\u1ea3 trong c\u00e1c \u1ee9ng d\u1ee5ng web v\u00e0 doanh nghi\u1ec7p. Vi\u1ec7c t\u1ea1o\" \/>\n<meta property=\"og:url\" content=\"https:\/\/itviec.com\/blog\/cach-tao-database-trong-mysql\/\" \/>\n<meta property=\"og:site_name\" content=\"ITviec Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ITviec\" \/>\n<meta property=\"article:published_time\" content=\"2024-08-31T14:47:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-Database-trong-MySQL-vippro.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1500\" \/>\n\t<meta property=\"og:image:height\" content=\"790\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"M\u1ef9 Duy\u00ean\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@ITviec\" \/>\n<meta name=\"twitter:site\" content=\"@ITviec\" \/>\n<meta name=\"twitter:label1\" content=\"\u0110\u01b0\u1ee3c vi\u1ebft b\u1edfi\" \/>\n\t<meta name=\"twitter:data1\" content=\"M\u1ef9 Duy\u00ean\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u01af\u1edbc t\u00ednh th\u1eddi gian \u0111\u1ecdc\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 ph\u00fat\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"T\u1ea1o database trong MySQL: H\u01b0\u1edbng d\u1eabn c\u00e1c c\u00e1ch t\u1ea1o CSDL chi ti\u1ebft - ITviec Blog","description":"T\u1ea1o database l\u00e0 b\u01b0\u1edbc quan tr\u1ecdng trong t\u1ed5 ch\u1ee9c d\u1eef li\u1ec7u. Hi\u1ec3u c\u00e1ch t\u1ea1o database trong MySQL v\u00e0 c\u00e1ch qu\u1ea3n l\u00fd s\u1ebd gi\u00fap d\u1ef1 \u00e1n hi\u1ec7u qu\u1ea3 h\u01a1n.","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:\/\/itviec.com\/blog\/cach-tao-database-trong-mysql\/","og_locale":"vi_VN","og_type":"article","og_title":"T\u1ea1o database trong MySQL: H\u01b0\u1edbng d\u1eabn c\u00e1c c\u00e1ch t\u1ea1o CSDL chi ti\u1ebft","og_description":"MySQL l\u00e0 m\u1ed9t trong nh\u1eefng h\u1ec7 qu\u1ea3n tr\u1ecb c\u01a1 s\u1edf d\u1eef li\u1ec7u ph\u1ed5 bi\u1ebfn nh\u1ea5t hi\u1ec7n nay, gi\u00fap qu\u1ea3n l\u00fd d\u1eef li\u1ec7u hi\u1ec7u qu\u1ea3 trong c\u00e1c \u1ee9ng d\u1ee5ng web v\u00e0 doanh nghi\u1ec7p. Vi\u1ec7c t\u1ea1o","og_url":"https:\/\/itviec.com\/blog\/cach-tao-database-trong-mysql\/","og_site_name":"ITviec Blog","article_publisher":"https:\/\/www.facebook.com\/ITviec","article_published_time":"2024-08-31T14:47:27+00:00","og_image":[{"width":1500,"height":790,"url":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-Database-trong-MySQL-vippro.jpg","type":"image\/jpeg"}],"author":"M\u1ef9 Duy\u00ean","twitter_card":"summary_large_image","twitter_creator":"@ITviec","twitter_site":"@ITviec","twitter_misc":{"\u0110\u01b0\u1ee3c vi\u1ebft b\u1edfi":"M\u1ef9 Duy\u00ean","\u01af\u1edbc t\u00ednh th\u1eddi gian \u0111\u1ecdc":"12 ph\u00fat"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/itviec.com\/blog\/cach-tao-database-trong-mysql\/#article","isPartOf":{"@id":"https:\/\/itviec.com\/blog\/cach-tao-database-trong-mysql\/"},"author":{"name":"M\u1ef9 Duy\u00ean","@id":"https:\/\/itviec.com\/blog\/#\/schema\/person\/73733c0725c7e39e696a896bd1abe2d7"},"headline":"T\u1ea1o database trong MySQL: H\u01b0\u1edbng d\u1eabn c\u00e1c c\u00e1ch t\u1ea1o CSDL chi ti\u1ebft","datePublished":"2024-08-31T14:47:27+00:00","mainEntityOfPage":{"@id":"https:\/\/itviec.com\/blog\/cach-tao-database-trong-mysql\/"},"wordCount":2583,"publisher":{"@id":"https:\/\/itviec.com\/blog\/#organization"},"image":{"@id":"https:\/\/itviec.com\/blog\/cach-tao-database-trong-mysql\/#primaryimage"},"thumbnailUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-Database-trong-MySQL-vippro.jpg","articleSection":["Chuy\u00ean m\u00f4n IT"],"inLanguage":"vi"},{"@type":"WebPage","@id":"https:\/\/itviec.com\/blog\/cach-tao-database-trong-mysql\/","url":"https:\/\/itviec.com\/blog\/cach-tao-database-trong-mysql\/","name":"T\u1ea1o database trong MySQL: H\u01b0\u1edbng d\u1eabn c\u00e1c c\u00e1ch t\u1ea1o CSDL chi ti\u1ebft - ITviec Blog","isPartOf":{"@id":"https:\/\/itviec.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/itviec.com\/blog\/cach-tao-database-trong-mysql\/#primaryimage"},"image":{"@id":"https:\/\/itviec.com\/blog\/cach-tao-database-trong-mysql\/#primaryimage"},"thumbnailUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-Database-trong-MySQL-vippro.jpg","datePublished":"2024-08-31T14:47:27+00:00","description":"T\u1ea1o database l\u00e0 b\u01b0\u1edbc quan tr\u1ecdng trong t\u1ed5 ch\u1ee9c d\u1eef li\u1ec7u. Hi\u1ec3u c\u00e1ch t\u1ea1o database trong MySQL v\u00e0 c\u00e1ch qu\u1ea3n l\u00fd s\u1ebd gi\u00fap d\u1ef1 \u00e1n hi\u1ec7u qu\u1ea3 h\u01a1n.","breadcrumb":{"@id":"https:\/\/itviec.com\/blog\/cach-tao-database-trong-mysql\/#breadcrumb"},"inLanguage":"vi","potentialAction":[{"@type":"ReadAction","target":["https:\/\/itviec.com\/blog\/cach-tao-database-trong-mysql\/"]}]},{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/itviec.com\/blog\/cach-tao-database-trong-mysql\/#primaryimage","url":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-Database-trong-MySQL-vippro.jpg","contentUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/08\/tao-Database-trong-MySQL-vippro.jpg","width":1500,"height":790,"caption":"t\u1ea1o database trong mysql - itviec blog"},{"@type":"BreadcrumbList","@id":"https:\/\/itviec.com\/blog\/cach-tao-database-trong-mysql\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Chuy\u00ean m\u00f4n IT","item":"https:\/\/itviec.com\/blog\/chuyen-mon-it\/"},{"@type":"ListItem","position":2,"name":"T\u1ea1o database trong MySQL: H\u01b0\u1edbng d\u1eabn c\u00e1c c\u00e1ch t\u1ea1o CSDL chi ti\u1ebft"}]},{"@type":"WebSite","@id":"https:\/\/itviec.com\/blog\/#website","url":"https:\/\/itviec.com\/blog\/","name":"ITviec Blog","description":"IT Jobs &amp; People in Vietnam","publisher":{"@id":"https:\/\/itviec.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/itviec.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"vi"},{"@type":"Organization","@id":"https:\/\/itviec.com\/blog\/#organization","name":"ITviec","url":"https:\/\/itviec.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/itviec.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2018\/12\/itviec-black-square-facebook.png","contentUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2018\/12\/itviec-black-square-facebook.png","width":1800,"height":1800,"caption":"ITviec"},"image":{"@id":"https:\/\/itviec.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/ITviec","https:\/\/x.com\/ITviec","https:\/\/www.linkedin.com\/company\/itviec","https:\/\/www.youtube.com\/channel\/UCYthAQ3bcGr57M_ag5gHDvQ"]},{"@type":"Person","@id":"https:\/\/itviec.com\/blog\/#\/schema\/person\/73733c0725c7e39e696a896bd1abe2d7","name":"M\u1ef9 Duy\u00ean","image":{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/03\/Author_Duyen-Tran-120x120.jpg","url":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/03\/Author_Duyen-Tran-120x120.jpg","contentUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/03\/Author_Duyen-Tran-120x120.jpg","caption":"M\u1ef9 Duy\u00ean"},"url":"https:\/\/itviec.com\/blog\/author\/my-duyen\/"}]}},"_links":{"self":[{"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/posts\/77769","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/users\/209"}],"replies":[{"embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/comments?post=77769"}],"version-history":[{"count":0,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/posts\/77769\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/media\/77943"}],"wp:attachment":[{"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/media?parent=77769"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/categories?post=77769"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/tags?post=77769"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}