{"id":25783,"date":"2021-08-17T14:42:49","date_gmt":"2021-08-17T07:42:49","guid":{"rendered":"https:\/\/tom.ji42.com\/?p=25783"},"modified":"2021-08-17T14:42:49","modified_gmt":"2021-08-17T07:42:49","slug":"creating-mysql-updatable-views","status":"publish","type":"post","link":"https:\/\/tom.tomwork.net\/?p=25783","title":{"rendered":"Creating MySQL Updatable Views"},"content":{"rendered":"<p><strong>Summary<\/strong>: in this tutorial, we will show you how to\u00a0<strong>create an updatable view<\/strong>\u00a0and update data in the underlying table through the view<strong>.<\/strong><\/p>\n<h2>Introduction to MySQL updatable views<\/h2>\n<p>In MySQL, views are not only\u00a0query-able but also\u00a0updatable. It means that you can use the\u00a0<a href=\"https:\/\/www.mysqltutorial.org\/mysql-insert-statement.aspx\">INSERT<\/a>\u00a0or\u00a0<a href=\"https:\/\/www.mysqltutorial.org\/mysql-update-data.aspx\">UPDATE<\/a>\u00a0statement to insert or\u00a0update rows of the base\u00a0table through the updatable view. In addition, you can use\u00a0<a href=\"https:\/\/www.mysqltutorial.org\/mysql-delete-statement.aspx\">DELETE<\/a>\u00a0statement to remove rows of the underlying table through the view.<\/p>\n<p>However, to create an updatable\u00a0<a title=\"Introduction to Database View\" href=\"https:\/\/www.mysqltutorial.org\/introduction-sql-views.aspx\">view<\/a>, the\u00a0<a title=\"MySQL Select\" href=\"https:\/\/www.mysqltutorial.org\/mysql-select-statement-query-data.aspx\">SELECT statement<\/a>\u00a0that defines the view\u00a0must not contain any of the following elements:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.mysqltutorial.org\/mysql-aggregate-functions.aspx\">Aggregate functions<\/a>\u00a0such as\u00a0<a href=\"https:\/\/www.mysqltutorial.org\/mysql-min\/\">MIN<\/a>,\u00a0<a href=\"https:\/\/www.mysqltutorial.org\/mysql-max-function\/\">MAX<\/a>,\u00a0<a href=\"https:\/\/www.mysqltutorial.org\/mysql-sum\/\">SUM<\/a>,\u00a0<a href=\"https:\/\/www.mysqltutorial.org\/mysql-avg\/\">AVG<\/a>, and\u00a0<a href=\"https:\/\/www.mysqltutorial.org\/mysql-count\/\">COUNT<\/a>.<\/li>\n<li><a href=\"https:\/\/www.mysqltutorial.org\/mysql-distinct.aspx\">DISTINCT<\/a><\/li>\n<li><a href=\"https:\/\/www.mysqltutorial.org\/mysql-group-by.aspx\">GROUP BY<\/a>\u00a0clause.<\/li>\n<li><a href=\"https:\/\/www.mysqltutorial.org\/mysql-having.aspx\">HAVING<\/a>\u00a0clause.<\/li>\n<li><a href=\"https:\/\/www.mysqltutorial.org\/sql-union-mysql.aspx\">UNION<\/a>\u00a0or UNION ALL clause.<\/li>\n<li><a href=\"https:\/\/www.mysqltutorial.org\/mysql-left-join.aspx\">Left join<\/a>\u00a0or outer join.<\/li>\n<li><a href=\"https:\/\/www.mysqltutorial.org\/mysql-subquery\/\">Subquery\u00a0<\/a>in the\u00a0<a href=\"https:\/\/www.mysqltutorial.org\/mysql-select-statement-query-data.aspx\">SELECT<\/a>\u00a0clause or\u00a0in the\u00a0<a href=\"https:\/\/www.mysqltutorial.org\/mysql-where\/\">WHERE<\/a>\u00a0clause that refers\u00a0to the table\u00a0appeared\u00a0in the FROM clause.<\/li>\n<li>Reference to non-updatable view in the FROM clause.<\/li>\n<li>Reference only to literal values.<\/li>\n<li>Multiple references to any column of the base\u00a0table.<\/li>\n<\/ul>\n<p><!--more--><\/p>\n<p>If you create a view\u00a0<a href=\"https:\/\/www.mysqltutorial.org\/create-sql-views-mysql.aspx\">with the\u00a0TEMPTABLE algorithm<\/a>, you cannot update the view.<\/p>\n<p class=\"tip\">Note that it is sometimes possible to create updatable views based on multiple tables using an\u00a0<a href=\"https:\/\/www.mysqltutorial.org\/mysql-inner-join.aspx\">inner join<\/a>.<\/p>\n<h2>MySQL updatable view example<\/h2>\n<p>Let\u2019s create an updatable view.<\/p>\n<p>First, we create a view named\u00a0<code>officeInfo<\/code>\u00a0\u00a0based on\u00a0the\u00a0<code>offices<\/code>\u00a0\u00a0table in the\u00a0<a href=\"https:\/\/www.mysqltutorial.org\/mysql-sample-database.aspx\">sample database<\/a>. The view refers to three columns of the\u00a0<code>offices<\/code>\u00a0\u00a0table:<code>officeCode<\/code>\u00a0<code>phone,\u00a0<\/code>\u00a0and\u00a0<code>city<\/code>.<\/p>\n<div><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">CREATE<\/span> <span class=\"hljs-keyword\">VIEW<\/span> officeInfo<br \/>\n <span class=\"hljs-keyword\">AS<\/span><br \/>\n   <span class=\"hljs-keyword\">SELECT<\/span> officeCode, phone, city<br \/>\n   <span class=\"hljs-keyword\">FROM<\/span> offices;<\/code><\/div>\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><small id=\"shcb-language-1\" class=\"shcb-language\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><i class=\"icon-copy btn-copy-code\"><\/i><\/pre>\n<p>Next, we can query data from the\u00a0<code>officeInfo<\/code>\u00a0view using the following statement:<em><br \/>\n<\/em><\/p>\n<div><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">SELECT<\/span><br \/>\n    *<br \/>\n<span class=\"hljs-keyword\">FROM<\/span><br \/>\n    officeInfo;<\/code><\/div>\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><small id=\"shcb-language-2\" class=\"shcb-language\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><i class=\"icon-copy btn-copy-code\"><\/i><\/pre>\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-3764 lazyloaded\" src=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2009\/12\/mysql-updateable-view-example.png\" alt=\"mysql updateable view example\" width=\"289\" height=\"180\" data-src=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2009\/12\/mysql-updateable-view-example.png\" \/><\/figure>\n<p>Then, we can change the phone number of the office with\u00a0<code>officeCode<\/code>\u00a0\u00a04\u00a0through the\u00a0<code>officeInfo<\/code>\u00a0view using the following\u00a0<a title=\"MySQL UPDATE\" href=\"https:\/\/www.mysqltutorial.org\/mysql-update-data.aspx\">UPDATE\u00a0<\/a>statement.<\/p>\n<div><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">UPDATE<\/span> officeInfo<br \/>\n<span class=\"hljs-keyword\">SET<\/span><br \/>\n    phone = <span class=\"hljs-string\">'+33 14 723 5555'<\/span><br \/>\n<span class=\"hljs-keyword\">WHERE<\/span><br \/>\n    officeCode = <span class=\"hljs-number\">4<\/span>;<\/code><\/div>\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><small id=\"shcb-language-3\" class=\"shcb-language\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><i class=\"icon-copy btn-copy-code\"><\/i><\/pre>\n<p>Finally, to verify\u00a0the change, we can query\u00a0the data from the\u00a0<code>officeInfo<\/code>\u00a0\u00a0view by\u00a0executing the following query:<\/p>\n<div><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">SELECT<\/span><br \/>\n    *<br \/>\n<span class=\"hljs-keyword\">FROM<\/span><br \/>\n    officeInfo<br \/>\n<span class=\"hljs-keyword\">WHERE<\/span><br \/>\n    officeCode = <span class=\"hljs-number\">4<\/span>;<\/code><\/div>\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><small id=\"shcb-language-4\" class=\"shcb-language\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><i class=\"icon-copy btn-copy-code\"><\/i><\/pre>\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-3765 ls-is-cached lazyloaded\" src=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2009\/12\/mysql-updateable-view-example-with-officeInfo-View.png\" alt=\"mysql updateable view example with officeInfo View\" width=\"248\" height=\"49\" data-src=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2009\/12\/mysql-updateable-view-example-with-officeInfo-View.png\" \/><\/figure>\n<h2>Checking\u00a0updatable view information<\/h2>\n<p>You can check if a view in a database in updatable by querying the is_updatable column from the views table in the\u00a0<code>information_schema<\/code>\u00a0database.<\/p>\n<p>The following query gets all views from the\u00a0<a href=\"https:\/\/www.mysqltutorial.org\/mysql-sample-database.aspx\">classicmodels database<\/a>\u00a0and shows which views are updatable.<\/p>\n<div><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">SELECT<\/span><br \/>\n    table_name,<br \/>\n    is_updatable<br \/>\n<span class=\"hljs-keyword\">FROM<\/span><br \/>\n    information_schema.views<br \/>\n<span class=\"hljs-keyword\">WHERE<\/span><br \/>\n    table_schema = <span class=\"hljs-string\">'classicmodels'<\/span>;<\/code><\/div>\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><small id=\"shcb-language-5\" class=\"shcb-language\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><i class=\"icon-copy btn-copy-code\"><\/i><\/pre>\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-3769 ls-is-cached lazyloaded\" src=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2009\/12\/updatable-views-information_schema.png\" alt=\"updatable views information_schema\" width=\"200\" height=\"111\" data-src=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2009\/12\/updatable-views-information_schema.png\" \/><\/figure>\n<h2>Removing rows through the view<\/h2>\n<p>First, we\u00a0<a href=\"https:\/\/www.mysqltutorial.org\/mysql-create-table\/\">create a table<\/a>\u00a0named items,\u00a0<a href=\"https:\/\/www.mysqltutorial.org\/mysql-insert-statement.aspx\">insert<\/a>\u00a0some rows into the items table, and\u00a0<a href=\"https:\/\/www.mysqltutorial.org\/create-sql-views-mysql.aspx\">create a view<\/a>\u00a0that contains items whose prices are greater than 700.<\/p>\n<div><code class=\"hljs language-sql\"><span class=\"hljs-comment\">-- create a new table named items<\/span><br \/>\n<span class=\"hljs-keyword\">CREATE<\/span> <span class=\"hljs-keyword\">TABLE<\/span> items (<br \/>\n    <span class=\"hljs-keyword\">id<\/span> <span class=\"hljs-built_in\">INT<\/span> AUTO_INCREMENT PRIMARY <span class=\"hljs-keyword\">KEY<\/span>,<br \/>\n    <span class=\"hljs-keyword\">name<\/span> <span class=\"hljs-built_in\">VARCHAR<\/span>(<span class=\"hljs-number\">100<\/span>) <span class=\"hljs-keyword\">NOT<\/span> <span class=\"hljs-literal\">NULL<\/span>,<br \/>\n    price <span class=\"hljs-built_in\">DECIMAL<\/span>(<span class=\"hljs-number\">11<\/span> , <span class=\"hljs-number\">2<\/span> ) <span class=\"hljs-keyword\">NOT<\/span> <span class=\"hljs-literal\">NULL<\/span><br \/>\n);<\/p>\n<p><span class=\"hljs-comment\">-- insert data into the items table<\/span><br \/>\n<span class=\"hljs-keyword\">INSERT<\/span> <span class=\"hljs-keyword\">INTO<\/span> items(<span class=\"hljs-keyword\">name<\/span>,price)<br \/>\n<span class=\"hljs-keyword\">VALUES<\/span>(<span class=\"hljs-string\">'Laptop'<\/span>,<span class=\"hljs-number\">700.56<\/span>),(<span class=\"hljs-string\">'Desktop'<\/span>,<span class=\"hljs-number\">699.99<\/span>),(<span class=\"hljs-string\">'iPad'<\/span>,<span class=\"hljs-number\">700.50<\/span>) ;<\/p>\n<p><span class=\"hljs-comment\">-- create a view based on items table<\/span><br \/>\n<span class=\"hljs-keyword\">CREATE<\/span> <span class=\"hljs-keyword\">VIEW<\/span> LuxuryItems <span class=\"hljs-keyword\">AS<\/span><br \/>\n    <span class=\"hljs-keyword\">SELECT<\/span><br \/>\n        *<br \/>\n    <span class=\"hljs-keyword\">FROM<\/span><br \/>\n        items<br \/>\n    <span class=\"hljs-keyword\">WHERE<\/span><br \/>\n        price &gt; <span class=\"hljs-number\">700<\/span>;<br \/>\n<span class=\"hljs-comment\">-- query data from the LuxuryItems view<\/span><br \/>\n<span class=\"hljs-keyword\">SELECT<\/span><br \/>\n    *<br \/>\n<span class=\"hljs-keyword\">FROM<\/span><br \/>\n    LuxuryItems;<\/code><\/div>\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><small id=\"shcb-language-6\" class=\"shcb-language\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><i class=\"icon-copy btn-copy-code\"><\/i><\/pre>\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-4141 ls-is-cached lazyloaded\" src=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2009\/12\/luxuryitems-view.jpg\" alt=\"luxuryitems view\" width=\"168\" height=\"66\" data-src=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2009\/12\/luxuryitems-view.jpg\" \/><\/figure>\n<p>Second, we use the\u00a0<code>DELETE<\/code>\u00a0statement to remove a row with id value 3.<\/p>\n<div><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">DELETE<\/span> <span class=\"hljs-keyword\">FROM<\/span> LuxuryItems<br \/>\n<span class=\"hljs-keyword\">WHERE<\/span><br \/>\n    <span class=\"hljs-keyword\">id<\/span> = <span class=\"hljs-number\">3<\/span>;<\/code><\/div>\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-7\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><small id=\"shcb-language-7\" class=\"shcb-language\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><i class=\"icon-copy btn-copy-code\"><\/i><\/pre>\n<p>MySQL returns a message saying that 1 row(s) affected.<\/p>\n<p>Third, let\u2019s check the data through the view again.<\/p>\n<div><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">SELECT<\/span><br \/>\n    *<br \/>\n<span class=\"hljs-keyword\">FROM<\/span><br \/>\n    LuxuryItems;<\/code><\/div>\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-8\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><small id=\"shcb-language-8\" class=\"shcb-language\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><i class=\"icon-copy btn-copy-code\"><\/i><\/pre>\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-4142 lazyloaded\" src=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2009\/12\/MySQL-DELETE-through-View.jpg\" alt=\"MySQL DELETE through View\" width=\"171\" height=\"45\" data-src=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2009\/12\/MySQL-DELETE-through-View.jpg\" \/><\/figure>\n<p>Fourth, we can also query the data from the base table\u00a0<code>items<\/code>\u00a0to verify if the\u00a0<code>DELETE<\/code>\u00a0statement actually deleted the row.<\/p>\n<div><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">SELECT<\/span><br \/>\n    *<br \/>\n<span class=\"hljs-keyword\">FROM<\/span><br \/>\n    items;<\/code><\/div>\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-9\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><small id=\"shcb-language-9\" class=\"shcb-language\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><i class=\"icon-copy btn-copy-code\"><\/i><\/pre>\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-4143 lazyloaded\" src=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2009\/12\/Items-table.jpg\" alt=\"Items table\" width=\"173\" height=\"64\" data-src=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2009\/12\/Items-table.jpg\" \/><\/figure>\n<p>As you see, the row with id 3 was removed from the base table.<\/p>\n<p>In this tutorial, we have shown you how to create an updatable view and update data in the underlying table through the view.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: in this tutorial, we will show you how to\u00a0create an updatable view\u00a0and update data in the underlying table through the view. Introduction to MySQL updatable views In MySQL, views are not only\u00a0query-able but also\u00a0updatable. It means that you can use the\u00a0INSERT\u00a0or\u00a0UPDATE\u00a0statement to insert or\u00a0update rows of the base\u00a0table through the updatable view. In addition, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[13],"tags":[],"class_list":["post-25783","post","type-post","status-publish","format-standard","hentry","category-13"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6cOVM-6HR","_links":{"self":[{"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=\/wp\/v2\/posts\/25783","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=25783"}],"version-history":[{"count":1,"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=\/wp\/v2\/posts\/25783\/revisions"}],"predecessor-version":[{"id":25784,"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=\/wp\/v2\/posts\/25783\/revisions\/25784"}],"wp:attachment":[{"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=25783"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=25783"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=25783"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}