{"id":313,"date":"2016-08-07T04:02:42","date_gmt":"2016-08-07T01:02:42","guid":{"rendered":"https:\/\/community.virtono.com\/?p=313"},"modified":"2023-06-21T09:52:03","modified_gmt":"2023-06-21T06:52:03","slug":"constraints-in-sql-and-how-to-specify-them","status":"publish","type":"post","link":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/constraints-in-sql-and-how-to-specify-them\/","title":{"rendered":"Constraints in SQL and How to Specify Them"},"content":{"rendered":"<p style=\"text-align: center;\">This article is a fraction of a Number of Articles on MySQL, to access them click <a href=\"https:\/\/virtono.com\/community\/knowledgebase\/articles-on-mysql\/\" target=\"_blank\" rel=\"noopener\">here<\/a>.<\/p>\n<p>This article describes the basic constraints that can be specified in SQL as part of table creation. These include key and referential integrity constraints, restrictions on attribute domains and NULLs, and constraints on individual tuples within a relation.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"316\" data-permalink=\"https:\/\/www.virtono.com\/community\/tutorial-how-to\/constraints-in-sql-and-how-to-specify-them\/attachment\/mysql\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/mysql.jpg?fit=600%2C438&amp;ssl=1\" data-orig-size=\"600,438\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"mysql\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/mysql.jpg?fit=600%2C438&amp;ssl=1\" class=\" wp-image-316 aligncenter\" src=\"https:\/\/i0.wp.com\/community.virtono.com\/wp-content\/uploads\/2016\/08\/mysql-300x219.jpg?resize=407%2C297&#038;ssl=1\" alt=\"mysql\" width=\"407\" height=\"297\" srcset=\"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/mysql.jpg?resize=300%2C219&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/mysql.jpg?w=600&amp;ssl=1 600w\" sizes=\"auto, (max-width: 407px) 100vw, 407px\" \/><\/p>\n<p><strong>Specifying Attribute Constraints and Attribute Defaults<\/strong><\/p>\n<p>Because SQL allows NULLs as attribute values, a <em>constraint <\/em>NOT NULL may be specified if NULL is not permitted for a particular attribute. This is always implicitly specified for the attributes that are part of the <em>primary key <\/em>of each relation, but it can be specified for any other attributes whose values are required not to be NULL.<\/p>\n<p>It is also possible to define a <em>default value <\/em>for an attribute by appending the clause<\/p>\n<p><strong>DEFAULT <\/strong>&lt;value&gt; to an attribute definition. The default value is included in any new tuple if an explicit value is not provided for that attribute. Figure 2 illustrates an example of specifying a default manager for a new department and a default department for a new employee. If no default clause is specified, the default <em>default<\/em> <em>value <\/em>is NULL for attributes <em>that do not have <\/em>the NOT NULL constraint.<\/p>\n<p>Another type of constraint can restrict attribute or domain values using the <strong>CHECK <\/strong>clause following an attribute or domain definition.6 For example, suppose that department numbers are restricted to integer numbers between 1 and 20; then, we can change the attribute declaration of Dnumber in the DEPARTMENT table (see<\/p>\n<p>Figure 1) to the following:<\/p>\n<p>Dnumber INT <strong>NOT NULL CHECK <\/strong>(Dnumber &gt; 0 <strong>AND <\/strong>Dnumber &lt; 21);<\/p>\n<p><strong>CREATE TABLE <\/strong>EMPLOYEE<\/p>\n<p>( . . . ,<\/p>\n<p>Dno INT <strong>NOT NULL DEFAULT <\/strong>1,<\/p>\n<p><strong>CONSTRAINT <\/strong>EMPPK<\/p>\n<p><strong>PRIMARY KEY <\/strong>(Ssn),<\/p>\n<p><strong>CONSTRAINT <\/strong>EMPSUPERFK<\/p>\n<p><strong>FOREIGN KEY <\/strong>(Super_ssn) <strong>REFERENCES <\/strong>EMPLOYEE(Ssn)<\/p>\n<p><strong>ON DELETE <\/strong>SET NULL <strong>ON UPDATE <\/strong>CASCADE,<\/p>\n<p><strong>CONSTRAINT <\/strong>EMPDEPTFK<\/p>\n<p><strong>FOREIGN KEY<\/strong>(Dno) <strong>REFERENCES <\/strong>DEPARTMENT(Dnumber)<\/p>\n<p><strong>ON DELETE <\/strong>SET DEFAULT <strong>ON UPDATE <\/strong>CASCADE);<\/p>\n<p><strong>CREATE TABLE <\/strong>DEPARTMENT<\/p>\n<p>( . . . ,<\/p>\n<p>Mgr_ssn CHAR(9) <strong>NOT NULL DEFAULT <\/strong>\u2018888665555\u2019,<\/p>\n<p>. . . ,<\/p>\n<p><strong>CONSTRAINT <\/strong>DEPTPK<\/p>\n<p><strong>PRIMARY KEY<\/strong>(Dnumber),<\/p>\n<p><strong>CONSTRAINT <\/strong>DEPTSK<\/p>\n<p><strong>UNIQUE <\/strong>(Dname),<\/p>\n<p><strong>CONSTRAINT <\/strong>DEPTMGRFK<\/p>\n<p><strong>FOREIGN KEY <\/strong>(Mgr_ssn) <strong>REFERENCES <\/strong>EMPLOYEE(Ssn)<\/p>\n<p><strong>ON DELETE <\/strong>SET DEFAULT <strong>ON UPDATE <\/strong>CASCADE);<\/p>\n<p><strong>CREATE TABLE <\/strong>DEPT_LOCATIONS<\/p>\n<p>( . . . ,<\/p>\n<p><strong>PRIMARY KEY <\/strong>(Dnumber, Dlocation),<\/p>\n<p><strong>FOREIGN KEY <\/strong>(Dnumber) <strong>REFERENCES <\/strong>DEPARTMENT(Dnumber)<\/p>\n<p><strong>ON DELETE <\/strong>CASCADE <strong>ON UPDATE <\/strong>CASCADE);<\/p>\n<p><strong>Figure 2<\/strong><\/p>\n<p>Example illustrating how default attribute values and referential integrity triggered actions are specified in SQL.<\/p>\n<p>The CHECK clause can also be used in conjunction with the CREATE DOMAIN statement.<\/p>\n<p>For example, we can write the following statement:<\/p>\n<p><strong>CREATE DOMAIN <\/strong>D_NUM <strong>AS <\/strong>INTEGER<\/p>\n<p><strong>CHECK <\/strong>(D_NUM &gt; 0 <strong>AND <\/strong>D_NUM &lt; 21);<\/p>\n<p>We can then use the created domain D_NUM as the attribute type for all attributes that refer to department numbers in Figure 1, such as Dnumber of DEPARTMENT, Dnum of PROJECT, Dno of EMPLOYEE, and so on.<\/p>\n<p><strong>Specifying Key and Referential Integrity Constraints<\/strong><\/p>\n<p>Because keys and referential integrity constraints are very important, there are special clauses within the CREATE TABLE statement to specify them. Some examples to illustrate the specification of keys and referential integrity are shown in Figure 1.7<\/p>\n<p>The <strong>PRIMARY KEY <\/strong>clause specifies one or more attributes that make up the primary key of a relation. If a primary key has a <em>single <\/em>attribute, the clause can follow the attribute directly. For example, the primary key of DEPARTMENT can be specified as follows (instead of the way it is specified in Figure 1):<\/p>\n<p>Dnumber INT <strong>PRIMARY KEY<\/strong>;<\/p>\n<p>The <strong>UNIQUE <\/strong>clause specifies alternate (secondary) keys, as illustrated in the<\/p>\n<p>DEPARTMENT and PROJECT table declarations in Figure 1. The <strong>UNIQUE <\/strong>clause can also be specified directly for a secondary key if the secondary key is a single attribute, as in the following example:<\/p>\n<p>Dname VARCHAR(15) <strong>UNIQUE<\/strong>;<\/p>\n<p>Referential integrity is specified via the <strong>FOREIGN KEY <\/strong>clause, as shown in Figure<\/p>\n<ol>\n<li>A referential integrity constraint can be violated when tuples are inserted or deleted, or when a foreign key or primary key attribute value is modified. The default action that SQL takes for an integrity violation is to <strong>reject <\/strong>the update operation that will cause a violation, which is known as the RESTRICT option. However, the schema designer can specify an alternative action to be taken by attaching a <strong>referential triggered action <\/strong>clause to any foreign key constraint. The options include SET NULL, CASCADE, and SET DEFAULT. An option must be qualified with either ON DELETE or ON UPDATE. We illustrate this with the examples shown in Figure 2. Here, the database designer chooses ON<\/li>\n<\/ol>\n<p>DELETE SET NULL and ON UPDATE CASCADE for the foreign key Super_ssn of<\/p>\n<p>EMPLOYEE. This means that if the tuple for a <em>supervising employee <\/em>is <em>deleted<\/em>, the value of Super_ssn is automatically set to NULL for all employee tuples that were referencing the deleted employee tuple. On the other hand, if the Ssn value for a supervising employee is <em>updated <\/em>(say, because it was entered incorrectly), the new value is <em>cascaded <\/em>to Super_ssn for all employee tuples referencing the updated employee<\/p>\n<p>tuple.8<\/p>\n<p>In general, the action taken by the DBMS for SET NULL or SET DEFAULT is the same for both ON DELETE and ON UPDATE: The value of the affected referencing attributes is changed to NULL for SET NULL and to the specified default value of the referencing attribute for SET DEFAULT. The action for CASCADE ON DELETE is to delete all the referencing tuples, whereas the action for CASCADE ON UPDATE is to change the value of the referencing foreign key attribute(s) to the updated (new) primary key value for all the referencing tuples. It is the responsibility of the database designer to choose the appropriate action and to specify it in the database schema.<\/p>\n<p>As a general rule, the CASCADE option is suitable for \u201crelationship\u201d relations , such as WORKS_ON; for relations that represent multivalued attributes, such as DEPT_LOCATIONS; and for relations that represent weak entity types, such as DEPENDENT.<\/p>\n<p><strong>Giving Names to Constraints<\/strong><\/p>\n<p>Figure 2 also illustrates how a constraint may be given a <strong>constraint name<\/strong>, following the keyword <strong>CONSTRAINT<\/strong>. The names of all constraints within a particular schema must be unique. A constraint name is used to identify a particular con- straint in case the constraint must be dropped later and replaced with another constraint.<\/p>\n<p><strong>Specifying Constraints on Tuples Using CHECK<\/strong><\/p>\n<p>In addition to key and referential integrity constraints, which are specified by special keywords, other <em>table constraints <\/em>can be specified through additional CHECK clauses at the end of a CREATE TABLE statement. These can be called <strong>tuple-based<\/strong> constraints because they apply to each tuple <em>individually <\/em>and are checked whenever a tuple is inserted or modified. For example, suppose that the DEPARTMENT table in<\/p>\n<p>Figure 1 had an additional attribute Dept_create_date, which stores the date when the department was created. Then we could add the following CHECK clause at the end of the CREATE TABLE statement for the DEPARTMENT table to make sure that a manager\u2019s start date is later than the department creation date.<\/p>\n<p><strong>CHECK <\/strong>(Dept_create_date &lt;= Mgr_start_date);<\/p>\n<p>The CHECK clause can also be used to specify more general constraints using the CREATE ASSERTION statement of SQL.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article is a fraction of a Number of Articles on MySQL, to access them click here. This article describes the basic constraints that can be specified in SQL as part of table creation. These include key and referential integrity constraints, restrictions on attribute domains and NULLs, and constraints on<\/p>\n","protected":false},"author":3,"featured_media":314,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_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},"jetpack_post_was_ever_published":false},"categories":[3,5],"tags":[],"class_list":["post-313","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorial-how-to","category-knowledgebase"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/MySQL-Foreign-Key-EXAMPLE-2.png?fit=905%2C430&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7ISfL-53","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":287,"url":"https:\/\/www.virtono.com\/community\/knowledgebase\/mysql-top-10-design-tips\/","url_meta":{"origin":313,"position":0},"title":"MySQL: Top 10 Design Tips","author":"Daniel Draga","date":"August 7, 2016","format":false,"excerpt":"This article is a fraction of a Number of Articles on MySQL, to access them click here. \u00a0\u00a0\u00a0\u00a0\u00a0 1.Understand Your Technology Tools MySQL is great platform to manage your database, and to be able to understand every aspect is not that easy, but the one thing that we can do\u2026","rel":"","context":"In &quot;Knowledgebase&quot;","block_context":{"text":"Knowledgebase","link":"https:\/\/www.virtono.com\/community\/category\/knowledgebase\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/MySQL_Replication1-2.png?fit=965%2C687&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/MySQL_Replication1-2.png?fit=965%2C687&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/MySQL_Replication1-2.png?fit=965%2C687&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/MySQL_Replication1-2.png?fit=965%2C687&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":338,"url":"https:\/\/www.virtono.com\/community\/knowledgebase\/articles-on-mysql\/","url_meta":{"origin":313,"position":1},"title":"Articles on MySQL","author":"Daniel Draga","date":"August 7, 2016","format":false,"excerpt":"MySQL:\u00a0 Introduction and How it Works MySQL Installation MySQL replication The Top MySQL 10 Design Tips MySQL Performance Tuning: The stages of Tuning MySQL Indexing How to create an index How MySQL and PHP Work Together How to handle MySQL errors Constraints in SQL and How to Specify Them","rel":"","context":"In &quot;Knowledgebase&quot;","block_context":{"text":"Knowledgebase","link":"https:\/\/www.virtono.com\/community\/category\/knowledgebase\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/MySQL-Foreign-Key-EXAMPLE-2-1.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/MySQL-Foreign-Key-EXAMPLE-2-1.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/MySQL-Foreign-Key-EXAMPLE-2-1.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/MySQL-Foreign-Key-EXAMPLE-2-1.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/MySQL-Foreign-Key-EXAMPLE-2-1.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":297,"url":"https:\/\/www.virtono.com\/community\/knowledgebase\/mysql-indexing\/","url_meta":{"origin":313,"position":2},"title":"MySQL Indexing","author":"Daniel Draga","date":"August 7, 2016","format":false,"excerpt":"This article is a fraction of a Number of Articles on MySQL, to access them click here. MySQL Indexing \u00a0 MySQL documentation says: The best way to improve the performance of SELECT operations is to create indexes on one or more of the columns that are tested in the query.\u2026","rel":"","context":"In &quot;Knowledgebase&quot;","block_context":{"text":"Knowledgebase","link":"https:\/\/www.virtono.com\/community\/category\/knowledgebase\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/MySQL_Replication1-3.png?fit=715%2C262&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/MySQL_Replication1-3.png?fit=715%2C262&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/MySQL_Replication1-3.png?fit=715%2C262&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/MySQL_Replication1-3.png?fit=715%2C262&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":305,"url":"https:\/\/www.virtono.com\/community\/knowledgebase\/how-mysql-and-php-work-together\/","url_meta":{"origin":313,"position":3},"title":"How MySQL and PHP Work Together","author":"Daniel Draga","date":"August 7, 2016","format":false,"excerpt":"This article is a fraction of a Number of Articles on MySQL, to access them click here. You interact with the database by passing messages to the MySQL server. The messages are composed in the SQL language, a standard computer language understood by most database management systems. PHP doesn\u2019t understand\u2026","rel":"","context":"In &quot;Knowledgebase&quot;","block_context":{"text":"Knowledgebase","link":"https:\/\/www.virtono.com\/community\/category\/knowledgebase\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/php___mysql_wallpaper_by_milesandryprower-d9o6yat.png?fit=1024%2C576&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/php___mysql_wallpaper_by_milesandryprower-d9o6yat.png?fit=1024%2C576&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/php___mysql_wallpaper_by_milesandryprower-d9o6yat.png?fit=1024%2C576&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/php___mysql_wallpaper_by_milesandryprower-d9o6yat.png?fit=1024%2C576&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":302,"url":"https:\/\/www.virtono.com\/community\/tutorial-how-to\/how-to-create-an-index\/","url_meta":{"origin":313,"position":4},"title":"How to create an Index","author":"Daniel Draga","date":"August 7, 2016","format":false,"excerpt":"This article is a fraction of a Number of Articles on MySQL, to access them click here. SQL CREATE INDEX Syntax Creates an index on a table. Duplicate values are allowed: CREATE INDEX index_name ON table_name (column_name) SQL CREATE UNIQUE INDEX Syntax Creates a unique index on a table. Duplicate\u2026","rel":"","context":"In &quot;Tutorials&quot;","block_context":{"text":"Tutorials","link":"https:\/\/www.virtono.com\/community\/category\/tutorial-how-to\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/MySQL_Replication1-4.png?fit=731%2C266&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/MySQL_Replication1-4.png?fit=731%2C266&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/MySQL_Replication1-4.png?fit=731%2C266&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/08\/MySQL_Replication1-4.png?fit=731%2C266&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":732,"url":"https:\/\/www.virtono.com\/community\/knowledgebase\/hardening-the-defense-of-database-server\/","url_meta":{"origin":313,"position":5},"title":"Hardening the Defense of Database Server","author":"Daniel Draga","date":"November 1, 2016","format":false,"excerpt":"Importance of Database Security: Databases often store sensitive data Incorrect data or loss of data could negatively affect business operations Databases can be used as bases to attack other systems from. \u00a0 Principles of Finding Holes Don't believe the documentation Implement your own client Debug the system to understand how\u2026","rel":"","context":"In &quot;Knowledgebase&quot;","block_context":{"text":"Knowledgebase","link":"https:\/\/www.virtono.com\/community\/category\/knowledgebase\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/11\/network-security1.jpg?fit=1200%2C556&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/11\/network-security1.jpg?fit=1200%2C556&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/11\/network-security1.jpg?fit=1200%2C556&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/11\/network-security1.jpg?fit=1200%2C556&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.virtono.com\/community\/wp-content\/uploads\/2016\/11\/network-security1.jpg?fit=1200%2C556&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/313","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/comments?post=313"}],"version-history":[{"count":6,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/313\/revisions"}],"predecessor-version":[{"id":3555,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/posts\/313\/revisions\/3555"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/media\/314"}],"wp:attachment":[{"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/media?parent=313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/categories?post=313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.virtono.com\/community\/wp-json\/wp\/v2\/tags?post=313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}