{"id":1151,"date":"2024-07-31T11:31:20","date_gmt":"2024-07-31T09:31:20","guid":{"rendered":"https:\/\/blog.sutilweb.eu\/?page_id=1151"},"modified":"2024-07-31T11:31:20","modified_gmt":"2024-07-31T09:31:20","slug":"33-motores-de-tablas","status":"publish","type":"page","link":"https:\/\/sutilweb.eu\/index.php\/databases\/sql\/33-motores-de-tablas\/","title":{"rendered":"33. Motores de tablas"},"content":{"rendered":"\n<p>Un <strong>motor de tablas<\/strong> o <strong>motor de almacenamiento<\/strong> es el componente del <strong>sistema gestor de la base de datos<\/strong> que se va a encargar de como almacenar y recuperar, y posteriormente manipular los <strong>datos<\/strong> de la <strong>base de datos<\/strong>. Son los responsables de como se van a organizar los <strong>datos<\/strong> f\u00edsicamente en el disco duro, as\u00ed como de las <strong>reglas<\/strong> y los <strong>protocolos<\/strong> para poder acceder a ellos.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>Cada <strong>motor de base de datos<\/strong> tiene su propia gesti\u00f3n para generar <strong>tablas, \u00edndices, vistas, transacciones, concurrencias&#8230;<\/strong> En <strong>MySQL<\/strong> hay 2 sistemas gestores para sus <strong>tablas,<\/strong> que son <strong>InnoDB<\/strong> y <strong>MyISAM,<\/strong> que son los m\u00e1s importantes. Las tablas de tipo <strong>MyISAM<\/strong> son como una <strong>hoja de c\u00e1lculo en Excel<\/strong>, donde podemos tabular la informaci\u00f3n, pero relacionarla con otro libro u hoja de c\u00e1lculo no lo permite. En anteriores versiones de <strong>MySQL<\/strong> era la creaci\u00f3n de <strong>tabla<\/strong> por defecto, eso ha cambiado, y ahora el esquema por defecto en <strong>MySQL<\/strong> es <strong>InnoDB,<\/strong> el cual es un motor compatible con <strong>transacciones, restricciones,<\/strong> <strong>vinculaci\u00f3n de llaves for\u00e1neas<\/strong>, es decir, procura la integridad de los datos.<\/p>\n\n\n\n<p>Si estamos utilizando una versi\u00f3n superior a la 7 u 8 de <strong>MySQL,<\/strong> las <strong>tablas,<\/strong> por defecto tienen el motor <strong>InnoDB,<\/strong> pero si no lo hiciera as\u00ed, se lo podemos especificar de la siguiente manera.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/* MOTORES DE TABLAS\n\nCREATE TABLE bandas (\nbanda_id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,\nnombre VARCHAR(50)\n) ENGINE = MyISAM | InnoDB (dependiendo del motor que queramos);\n\n\/* Lo ponemos al final de la instrucci\u00f3n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Un motor de tablas o motor de almacenamiento es el componente del sistema gestor de la base de datos que [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1076,"menu_order":32,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"class_list":["post-1151","page","type-page","status-publish","hentry"],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"Sutil Web","author_link":"https:\/\/sutilweb.eu\/index.php\/author\/sutilweb\/"},"uagb_comment_info":0,"uagb_excerpt":"Un motor de tablas o motor de almacenamiento es el componente del sistema gestor de la base de datos que [&hellip;]","_links":{"self":[{"href":"https:\/\/sutilweb.eu\/index.php\/wp-json\/wp\/v2\/pages\/1151","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sutilweb.eu\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/sutilweb.eu\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/sutilweb.eu\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sutilweb.eu\/index.php\/wp-json\/wp\/v2\/comments?post=1151"}],"version-history":[{"count":1,"href":"https:\/\/sutilweb.eu\/index.php\/wp-json\/wp\/v2\/pages\/1151\/revisions"}],"predecessor-version":[{"id":1152,"href":"https:\/\/sutilweb.eu\/index.php\/wp-json\/wp\/v2\/pages\/1151\/revisions\/1152"}],"up":[{"embeddable":true,"href":"https:\/\/sutilweb.eu\/index.php\/wp-json\/wp\/v2\/pages\/1076"}],"wp:attachment":[{"href":"https:\/\/sutilweb.eu\/index.php\/wp-json\/wp\/v2\/media?parent=1151"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}