{"id":7921,"date":"2022-12-21T08:55:44","date_gmt":"2022-12-21T07:55:44","guid":{"rendered":"https:\/\/smartdatamodels.org\/?p=7921"},"modified":"2022-12-21T08:55:44","modified_gmt":"2022-12-21T07:55:44","slug":"sql-export-available-for-postgresql","status":"publish","type":"post","link":"https:\/\/smartdatamodels.org\/index.php\/sql-export-available-for-postgresql\/","title":{"rendered":"SQL export available for Postgresql"},"content":{"rendered":"<p>There is a new file &#8216;<em>schema.sql<\/em>&#8216; in all the directories of the data models. It is a SQL script for <a href=\"https:\/\/www.postgresql.org\/\">PostgreSQL<\/a>.<\/p>\n<p>The script creates the structure of a relational table containing the attributes defined in the data model. It also creates the data types for those attributes with an enumeration of values.<\/p>\n<p>For those attributes being arrays or objects, it creates a JSON attribute (allowed in PostgreSQL).<\/p>\n<p>If you need additional features in this export please report them to <a href=\"mailto:info@smartdatamodels.org\">info@smartdatamodels.org.<\/a><\/p>\n<p>See <a href=\"https:\/\/github.com\/smart-data-models\/dataModel.Weather\/blob\/master\/WeatherForecast\/schema.sql\">an example<\/a>.<\/p>\n<p><a title=\"Daniel Lundin, PostgreSQL License &lt;https:\/\/www.postgresql.org\/about\/licence\/&gt;, via Wikimedia Commons\" href=\"https:\/\/commons.wikimedia.org\/wiki\/File:Postgresql_elephant.svg\"><img decoding=\"async\" src=\"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/2\/29\/Postgresql_elephant.svg\/512px-Postgresql_elephant.svg.png\" alt=\"Postgresql elephant\" width=\"512\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>There is a new file &#8216;schema.sql&#8216; in all the directories of the data models. It is a SQL script for PostgreSQL. The script creates the structure of a relational table containing the attributes defined in the data model. It also creates the data types for those attributes with an enumeration&#8230; <a class=\"continue-reading-link\" href=\"https:\/\/smartdatamodels.org\/index.php\/sql-export-available-for-postgresql\/\">More&#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"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":[105,107,109,113,115,119,117,88,143,111,125,182,201],"tags":[],"class_list":["post-7921","post","type-post","status-publish","format-standard","hentry","category-cross-sector","category-smart-cities","category-smart-energy-domain","category-smart-environment","category-smart-manufacturing","category-smart-robotics","category-smart-water","category-smart-sensoring","category-smartaeronautics","category-smart-agrifood","category-smartdestinations","category-smarthealth","category-smartlogistics"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":10091,"url":"https:\/\/smartdatamodels.org\/index.php\/new-service-export-you-data-models-to-sql-schema\/","url_meta":{"origin":7921,"position":0},"title":"New service: Export you data models to SQL schema","author":"maestro","date":"30\/10\/2023","format":false,"excerpt":"We provide a service to Generate a PostgreSQL schema SQL script from the model.yaml representation of a Smart Data Model. You can access this service under this link following Tools > SQL service. You need to provide as input the standard GitHub link to the model.yaml file or the raw\u2026","rel":"","context":"In &quot;Smart Cities domain&quot;","block_context":{"text":"Smart Cities domain","link":"https:\/\/smartdatamodels.org\/index.php\/category\/smart-cities\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/smartdatamodels.org\/wp-content\/uploads\/2023\/10\/Screen-Shot-2023-10-30-at-17.14.41-300x201.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":10263,"url":"https:\/\/smartdatamodels.org\/index.php\/metadata-of-the-catalogue-available\/","url_meta":{"origin":7921,"position":1},"title":"Metadata of the catalogue available","author":"maestro","date":"01\/02\/2024","format":false,"excerpt":"Now in the tools menu (currently the last option) you have a complete list of the most relevant links to the assets of the data models compile in the Smart Data Models initiative. You can check in the main menu -> Tools\u00a0 -> Metadata of the data models The information\u2026","rel":"","context":"In &quot;Cross Sector&quot;","block_context":{"text":"Cross Sector","link":"https:\/\/smartdatamodels.org\/index.php\/category\/cross-sector\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":10291,"url":"https:\/\/smartdatamodels.org\/index.php\/new-version-of-pysmartdatamodels-package-0-6-4-with-adaptations-to-data-spaces\/","url_meta":{"origin":7921,"position":2},"title":"New version of pysmartdatamodels package 0.6.4 with adaptations to Data Spaces","author":"maestro","date":"26\/02\/2024","format":false,"excerpt":"There is a new version of the python package pysmartdatamodels to use it you have just to type pip install pysmartdatamodels in your system Besides the update in the list of data models it includes two new functions - look_for_data_model that allows approximate searches for a data model based on\u2026","rel":"","context":"In &quot;Cross Sector&quot;","block_context":{"text":"Cross Sector","link":"https:\/\/smartdatamodels.org\/index.php\/category\/cross-sector\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/smartdatamodels.org\/wp-content\/uploads\/2024\/02\/pysmartdatamodels_0.6.4.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":488,"url":"https:\/\/smartdatamodels.org\/index.php\/improved-the-attributes-and-enumeration-data-base\/","url_meta":{"origin":7921,"position":3},"title":"Improved the attributes and enumeration data base","author":"maestro","date":"25\/06\/2020","format":false,"excerpt":"Now it is based on a responsive interface with these options: Sort any column Search on any value across the different columns 50-pages pagination check it out","rel":"","context":"In &quot;Cross Sector&quot;","block_context":{"text":"Cross Sector","link":"https:\/\/smartdatamodels.org\/index.php\/category\/cross-sector\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":10131,"url":"https:\/\/smartdatamodels.org\/index.php\/new-pysmartdatamodels-package-0-6-3-release\/","url_meta":{"origin":7921,"position":4},"title":"New pysmartdatamodels package 0.6.3 Release","author":"maestro","date":"02\/11\/2023","format":false,"excerpt":"We are thrilled to announce the latest update to pysmartdatamodels Python package, version 0.6.3, featuring a new function: generate_sql_schema()This addition enabling seamless generation of SQL schemas with just a few lines of code! Introducing\u00a0 generate_sql_schemqa() Function: With the new function, generate_sql_schemqa()\u00a0 pysmartdatamodels simplifies the process of creating SQL schemas for\u2026","rel":"","context":"In &quot;Smart Cities domain&quot;","block_context":{"text":"Smart Cities domain","link":"https:\/\/smartdatamodels.org\/index.php\/category\/smart-cities\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":480,"url":"https:\/\/smartdatamodels.org\/index.php\/updated-the-attributes-search-data-base\/","url_meta":{"origin":7921,"position":5},"title":"Updated the attributes search data base","author":"maestro","date":"25\/06\/2020","format":false,"excerpt":"In order to create a new data model is always interesting what others have done in order copy and to maintain interoperability. That's why we have available a database with all attributes and enumerations across all data models. Now it's updated daily and the number of occurrences is also available.","rel":"","context":"In &quot;Cross Sector&quot;","block_context":{"text":"Cross Sector","link":"https:\/\/smartdatamodels.org\/index.php\/category\/cross-sector\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/data-models.fiware.org\/wp-content\/uploads\/2020\/06\/bbdd_attributes-1024x333.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/data-models.fiware.org\/wp-content\/uploads\/2020\/06\/bbdd_attributes-1024x333.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/data-models.fiware.org\/wp-content\/uploads\/2020\/06\/bbdd_attributes-1024x333.png?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/data-models.fiware.org\/wp-content\/uploads\/2020\/06\/bbdd_attributes-1024x333.png?resize=700%2C400 2x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/posts\/7921","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/comments?post=7921"}],"version-history":[{"count":1,"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/posts\/7921\/revisions"}],"predecessor-version":[{"id":7923,"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/posts\/7921\/revisions\/7923"}],"wp:attachment":[{"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/media?parent=7921"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/categories?post=7921"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/tags?post=7921"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}