{"id":15741,"date":"2014-10-13T23:48:38","date_gmt":"2014-10-13T18:18:38","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=15741"},"modified":"2016-12-19T15:33:43","modified_gmt":"2016-12-19T10:03:43","slug":"nodejs-with-mysql","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/nodejs-with-mysql\/","title":{"rendered":"NodeJs with MySql using Sequelize"},"content":{"rendered":"<p>This time I am going to explain a very basic <a title=\"CRUD\" href=\"http:\/\/en.wikipedia.org\/wiki\/Create,_read,_update_and_delete\" target=\"_blank\">CRUD<\/a> operation on <a title=\"MySql\" href=\"http:\/\/www.mysql.com\/\" target=\"_blank\">MySql<\/a> database via <a title=\"Nodejs development\" href=\"http:\/\/www.tothenew.com\/mean-node-js-development-consulting\">NodeJs<\/a> using Sequelize. Here Sequelize become&#8217;s a bridge between NodeJs and MySql database, it is a <a title=\"Object Relational Mapping\" href=\"http:\/\/en.wikipedia.org\/wiki\/Object-relational_mapping\" target=\"_blank\">Object Relational Mapping Library<\/a>\u00a0written on <a title=\"Javascript Engineering\" href=\"http:\/\/www.tothenew.com\/front-end-angularjs-development\">javascript<\/a>.<\/p>\n<p>Let us quickly learn the things with the help of Examples and we will use Item Table to perform all CRUD operation:-<\/p>\n<p><em>&#8212; Install Dependence first<\/em><\/p>\n<p>[js]<\/p>\n<p>npm install mysql<\/p>\n<p>npm install sequelize<\/p>\n<p>[\/js]<\/p>\n<p>&#8212; <em>Setting up the connection with mysql<\/em><\/p>\n<p>[js]<\/p>\n<p>\/\/Including dependency<br \/>\nvar Sequelize = require(&amp;quot;sequelize&amp;quot;);<\/p>\n<p>\/\/Setting up the config<br \/>\nvar sequelize = new Sequelize(&#8216;your-database-name&#8217;, &#8216;db-username&#8217;, &#8216;db-password&#8217;, {<br \/>\n    host: &amp;quot;localhost&amp;quot;,<br \/>\n    port: 3306,<br \/>\n    dialect: &#8216;mysql&#8217;<br \/>\n});<\/p>\n<p>[\/js]<\/p>\n<p>&#8212;\u00a0Check connection status<\/p>\n<p>[js]<\/p>\n<p>\/\/Checking connection status<br \/>\nsequelize.authenticate().complete(function (err) {<br \/>\n if (err) {<br \/>\n    console.log(&#8216;There is connection in ERROR&#8217;);<br \/>\n } else {<br \/>\n    console.log(&#8216;Connection has been established successfully&#8217;);<br \/>\n }<br \/>\n});<\/p>\n<p>[\/js]<\/p>\n<p><em><strong>Example-1\u00a0<\/strong><\/em><strong>Create<\/strong> Table: <strong>Item<\/strong> using Node.Js<\/p>\n<p>[js]<\/p>\n<p>\/\/Create Item Table Structure<br \/>\nvar Item = sequelize.define(&#8216;Item&#8217;, {<br \/>\n    id: Sequelize.STRING,<br \/>\n    name:Sequelize.STRING,<br \/>\n    description: Sequelize.STRING,<br \/>\n    qty: Sequelize.INTEGER<br \/>\n});<\/p>\n<p>\/\/Applying Item Table to database<br \/>\nsequelize.sync({force:true}).complete(function (err) {<br \/>\n if(err){<br \/>\n    console.log(&#8216;An error occur while creating table&#8217;);<br \/>\n }else{<br \/>\n    console.log(&#8216;Item table created successfully&#8217;);<br \/>\n }<br \/>\n});<\/p>\n<p>[\/js]<\/p>\n<p><em><strong>Example-2 Inserting<\/strong> data into\u00a0<\/em>Table: <strong>Item<\/strong> using Node.Js<\/p>\n<p>[js]<\/p>\n<p>\/\/There is two way of inserting data into database<br \/>\n\/\/One way: Forming object from modal<br \/>\nvar item1 = Item.build({<br \/>\n    id: 1,<br \/>\n    name:&#8217;Laptop&#8217;,<br \/>\n    description: &#8216;Acer 2340TL&#8217;,<br \/>\n    qty: 23<br \/>\n});<br \/>\n\/\/Inserting Data into database<br \/>\nitem1.save().complete(function (err) {<br \/>\n if (err) {<br \/>\n    console.log(&#8216;Error in Inserting Record&#8217;);<br \/>\n } else {<br \/>\n    console.log(&#8216;Data successfully inserted&#8217;);<br \/>\n }<br \/>\n});<\/p>\n<p>\/\/Other way: Immediate insertion of data into database<br \/>\nsequelize.sync().success(function () {<br \/>\n  Item.create({<br \/>\n     id: 2,<br \/>\n     name:&#8217;Cell Phone&#8217;,<br \/>\n     description: &#8216;Sony&#8217;,<br \/>\n     qty: 20<br \/>\n  }).success(function (data) {<br \/>\n  console.log(data.values)<br \/>\n })<br \/>\n});<\/p>\n<p>[\/js]<\/p>\n<p><em><strong>Example-3 Reading<\/strong>\u00a0data from\u00a0<\/em>Table: <strong>Item<\/strong> using Node.Js<\/p>\n<p>[js]<\/p>\n<p>\/\/Reading All Data<br \/>\nItem.find({}).complete(function (err,data) {<br \/>\n    console.log(data);<br \/>\n});<br \/>\n\/\/With where condition<br \/>\n    Item.find({where:{name:&#8217;Laptop&#8217;}}).complete(function (err, data) {<br \/>\n   console.log(data);<br \/>\n});<\/p>\n<p>[\/js]<\/p>\n<p><em><strong>Example-4 Updating<\/strong>\u00a0data from\u00a0<\/em>Table: <strong>Item<\/strong> using Node.Js<\/p>\n<p>[js]<\/p>\n<p>\/\/Updating Laptop to Computer<br \/>\nItem.find({where:{name:&#8217;Laptop&#8217;}}).complete(function (err, data) {<br \/>\n  if(err){<br \/>\n    console.log(err);<br \/>\n  }<br \/>\n  if(data){<br \/>\n    data.updateAttributes({<br \/>\n    name:&#8217;Computer&#8217;<br \/>\n  }).success(function (data1) {<br \/>\n    console.log(data1);<br \/>\n  })<br \/>\n }<br \/>\n});<\/p>\n<p>[\/js]<\/p>\n<p><em><strong>Example-5 Delete<\/strong>\u00a0data from\u00a0<\/em>Table: <strong>Item<\/strong> using Node.Js<\/p>\n<p>[js]<\/p>\n<p>\/\/Delete All Computer Records<br \/>\nItem.find({where: {name: &#8216;Computer&#8217;}}).complete(function (err, data) {<br \/>\n   if (err) {<br \/>\n      console.log(err);<br \/>\n   } else {<br \/>\n      data.destroy({}).success(function (err, data) {<br \/>\n   if(err){<br \/>\n      console.log(err);<br \/>\n   }else{<br \/>\n      console.log(data);<br \/>\n   }<br \/>\n  })<br \/>\n }<br \/>\n console.log(data);<br \/>\n});<\/p>\n<p>[\/js]<\/p>\n<ul>\n<li>You can find the above code on GITHUB\u00a0<a title=\"Source Code\" href=\"https:\/\/github.com\/kashishgupta1990\/SequelizeCRUDOperation\" target=\"_blank\">click me<\/a> to view\/download code and don&#8217;t forget to update config according to your MySQL database.<\/li>\n<li>There are many other ways to achieve similar CRUD operation. You can refer Sequelize\u00a0docs to explore more.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This time I am going to explain a very basic CRUD operation on MySql database via NodeJs using Sequelize. Here Sequelize become&#8217;s a bridge between NodeJs and MySql database, it is a Object Relational Mapping Library\u00a0written on javascript. Let us quickly learn the things with the help of Examples and we will use Item Table [&hellip;]<\/p>\n","protected":false},"author":135,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":33,"footnotes":""},"categories":[1185],"tags":[1534,76,1533,1532],"class_list":["post-15741","post","type-post","status-publish","format-standard","hentry","category-node-js-2","tag-crud-operation","tag-mysql","tag-mysql-using-nodejs","tag-sequelize"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"This time I am going to explain a very basic CRUD operation on MySql database via NodeJs using Sequelize. Here Sequelize become&#039;s a bridge between NodeJs and MySql database, it is a Object Relational Mapping Library written on javascript. Let us quickly learn the things with the help of Examples and we will use Item Table\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Kashish Gupta\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.tothenew.com\/blog\/nodejs-with-mysql\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"NodeJs with MySql using Sequelize | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"This time I am going to explain a very basic CRUD operation on MySql database via NodeJs using Sequelize. Here Sequelize become&#039;s a bridge between NodeJs and MySql database, it is a Object Relational Mapping Library written on javascript. Let us quickly learn the things with the help of Examples and we will use Item Table\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.tothenew.com\/blog\/nodejs-with-mysql\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"NodeJs with MySql using Sequelize | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"This time I am going to explain a very basic CRUD operation on MySql database via NodeJs using Sequelize. Here Sequelize become&#039;s a bridge between NodeJs and MySql database, it is a Object Relational Mapping Library written on javascript. Let us quickly learn the things with the help of Examples and we will use Item Table\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/nodejs-with-mysql\\\/#article\",\"name\":\"NodeJs with MySql using Sequelize | TO THE NEW Blog\",\"headline\":\"NodeJs with MySql using Sequelize\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/kashish-gupta\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"datePublished\":\"2014-10-13T23:48:38+05:30\",\"dateModified\":\"2016-12-19T15:33:43+05:30\",\"inLanguage\":\"en-US\",\"commentCount\":8,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/nodejs-with-mysql\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/nodejs-with-mysql\\\/#webpage\"},\"articleSection\":\"Node.js, crud operation, MySql, mysql using nodejs, Sequelize\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/nodejs-with-mysql\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/node-js-2\\\/#listItem\",\"name\":\"Node.js\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/node-js-2\\\/#listItem\",\"position\":2,\"name\":\"Node.js\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/node-js-2\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/nodejs-with-mysql\\\/#listItem\",\"name\":\"NodeJs with MySql using Sequelize\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/nodejs-with-mysql\\\/#listItem\",\"position\":3,\"name\":\"NodeJs with MySql using Sequelize\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/node-js-2\\\/#listItem\",\"name\":\"Node.js\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/kashish-gupta\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/kashish-gupta\\\/\",\"name\":\"Kashish Gupta\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/nodejs-with-mysql\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3b5b9ad12619181a96b3a28264dd466a6d0a60db67688a3b123e4e6afb4767af?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Kashish Gupta\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/nodejs-with-mysql\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/nodejs-with-mysql\\\/\",\"name\":\"NodeJs with MySql using Sequelize | TO THE NEW Blog\",\"description\":\"This time I am going to explain a very basic CRUD operation on MySql database via NodeJs using Sequelize. Here Sequelize become's a bridge between NodeJs and MySql database, it is a Object Relational Mapping Library written on javascript. Let us quickly learn the things with the help of Examples and we will use Item Table\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/nodejs-with-mysql\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/kashish-gupta\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/kashish-gupta\\\/#author\"},\"datePublished\":\"2014-10-13T23:48:38+05:30\",\"dateModified\":\"2016-12-19T15:33:43+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"NodeJs with MySql using Sequelize | TO THE NEW Blog","description":"This time I am going to explain a very basic CRUD operation on MySql database via NodeJs using Sequelize. Here Sequelize become's a bridge between NodeJs and MySql database, it is a Object Relational Mapping Library written on javascript. Let us quickly learn the things with the help of Examples and we will use Item Table","canonical_url":"https:\/\/www.tothenew.com\/blog\/nodejs-with-mysql\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.tothenew.com\/blog\/nodejs-with-mysql\/#article","name":"NodeJs with MySql using Sequelize | TO THE NEW Blog","headline":"NodeJs with MySql using Sequelize","author":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/kashish-gupta\/#author"},"publisher":{"@id":"https:\/\/www.tothenew.com\/blog\/#organization"},"datePublished":"2014-10-13T23:48:38+05:30","dateModified":"2016-12-19T15:33:43+05:30","inLanguage":"en-US","commentCount":8,"mainEntityOfPage":{"@id":"https:\/\/www.tothenew.com\/blog\/nodejs-with-mysql\/#webpage"},"isPartOf":{"@id":"https:\/\/www.tothenew.com\/blog\/nodejs-with-mysql\/#webpage"},"articleSection":"Node.js, crud operation, MySql, mysql using nodejs, Sequelize"},{"@type":"BreadcrumbList","@id":"https:\/\/www.tothenew.com\/blog\/nodejs-with-mysql\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.tothenew.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/node-js-2\/#listItem","name":"Node.js"}},{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/node-js-2\/#listItem","position":2,"name":"Node.js","item":"https:\/\/www.tothenew.com\/blog\/category\/node-js-2\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/nodejs-with-mysql\/#listItem","name":"NodeJs with MySql using Sequelize"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/nodejs-with-mysql\/#listItem","position":3,"name":"NodeJs with MySql using Sequelize","previousItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/node-js-2\/#listItem","name":"Node.js"}}]},{"@type":"Organization","@id":"https:\/\/www.tothenew.com\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/www.tothenew.com\/blog\/"},{"@type":"Person","@id":"https:\/\/www.tothenew.com\/blog\/author\/kashish-gupta\/#author","url":"https:\/\/www.tothenew.com\/blog\/author\/kashish-gupta\/","name":"Kashish Gupta","image":{"@type":"ImageObject","@id":"https:\/\/www.tothenew.com\/blog\/nodejs-with-mysql\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/3b5b9ad12619181a96b3a28264dd466a6d0a60db67688a3b123e4e6afb4767af?s=96&d=mm&r=g","width":96,"height":96,"caption":"Kashish Gupta"}},{"@type":"WebPage","@id":"https:\/\/www.tothenew.com\/blog\/nodejs-with-mysql\/#webpage","url":"https:\/\/www.tothenew.com\/blog\/nodejs-with-mysql\/","name":"NodeJs with MySql using Sequelize | TO THE NEW Blog","description":"This time I am going to explain a very basic CRUD operation on MySql database via NodeJs using Sequelize. Here Sequelize become's a bridge between NodeJs and MySql database, it is a Object Relational Mapping Library written on javascript. Let us quickly learn the things with the help of Examples and we will use Item Table","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.tothenew.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.tothenew.com\/blog\/nodejs-with-mysql\/#breadcrumblist"},"author":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/kashish-gupta\/#author"},"creator":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/kashish-gupta\/#author"},"datePublished":"2014-10-13T23:48:38+05:30","dateModified":"2016-12-19T15:33:43+05:30"},{"@type":"WebSite","@id":"https:\/\/www.tothenew.com\/blog\/#website","url":"https:\/\/www.tothenew.com\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.tothenew.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"NodeJs with MySql using Sequelize | TO THE NEW Blog","og:description":"This time I am going to explain a very basic CRUD operation on MySql database via NodeJs using Sequelize. Here Sequelize become's a bridge between NodeJs and MySql database, it is a Object Relational Mapping Library written on javascript. Let us quickly learn the things with the help of Examples and we will use Item Table","og:url":"https:\/\/www.tothenew.com\/blog\/nodejs-with-mysql\/","og:image":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"NodeJs with MySql using Sequelize | TO THE NEW Blog","twitter:description":"This time I am going to explain a very basic CRUD operation on MySql database via NodeJs using Sequelize. Here Sequelize become's a bridge between NodeJs and MySql database, it is a Object Relational Mapping Library written on javascript. Let us quickly learn the things with the help of Examples and we will use Item Table","twitter:image":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"15741","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":"","og_description":"","og_object_type":"blog","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":"","og_article_tags":"","twitter_use_og":false,"twitter_card":"summary","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2021-04-29 12:11:54","updated":"2024-02-29 08:24:22","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.tothenew.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.tothenew.com\/blog\/category\/node-js-2\/\" title=\"Node.js\">Node.js<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tNodeJs with MySql using Sequelize\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.tothenew.com\/blog"},{"label":"Node.js","link":"https:\/\/www.tothenew.com\/blog\/category\/node-js-2\/"},{"label":"NodeJs with MySql using Sequelize","link":"https:\/\/www.tothenew.com\/blog\/nodejs-with-mysql\/"}],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/15741","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/135"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=15741"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/15741\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=15741"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=15741"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=15741"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}