{"id":272555,"date":"2022-08-08T11:23:27","date_gmt":"2022-08-08T10:23:27","guid":{"rendered":"https:\/\/blog.jetbrains.com\/?post_type=datagrip&#038;p=272555"},"modified":"2024-03-04T12:45:27","modified_gmt":"2024-03-04T11:45:27","slug":"not-all-databases-schemas-are-displayed-by-default-why","status":"publish","type":"datagrip","link":"https:\/\/blog.jetbrains.com\/en\/datagrip\/2022\/08\/08\/not-all-databases-schemas-are-displayed-by-default-why","title":{"rendered":"Not All Databases\/Schemas Are Displayed by Default. Why?"},"content":{"rendered":"\n<p>There is one thing which makes DataGrip different from many other database tools: DataGrip doesn&#8217;t show all schemas and databases by default in the database explorer. In this post we&#8217;ll briefly describe why it&#8217;s designed like this and what you can do if this doesn\u2019t suit your workflow.<\/p>\n\n\n\n<p>The most important thing about DataGrip is that the essence of its work concerns <strong>database introspection<\/strong>. Introspection is the process where DataGrip loads the metadata for all the database objects and then uses this metadata for coding assistance and navigation.<\/p>\n\n\n\n<p><strong>Why is DataGrip designed in such a unique way?<\/strong><br><br>As mentioned above, DataGrip\u2019s core features are reliable and fast because it has the metadata for all the schemas.<br><br><strong>Completion<\/strong>: Our users love<em> <\/em>how quickly the auto-completion pop-up gives them variants. This is possible because DataGrip has the schema model and can iterate through it very quickly.&nbsp;<\/p>\n\n\n\n<p><strong>Code analysis: <\/strong>DataGrip understands your queries and highlights all actual and potential problems. This is possible due to SQL syntax parsing and the help of the schema metadata, as the tool already knows the types of used objects, their nullability, etc. <strong>&nbsp;&nbsp;<\/strong><br><br><strong>Navigation<\/strong>: DataGrip indexes all of the source codes loaded into a single model. This makes it possible to detect, for example, the usages of tables in views and stored procedures. You can also easily search for occurrences of text in all of the database&#8217;s source codes.<br><br><strong>Search<\/strong>: The <em>Search Everywhere (Double Shift)<\/em> functionality helps you find database objects in seconds regardless of how many data sources and schemas you have. It doesn\u2019t connect to the database to get the objects based on your search string. Instead it uses the internal index.&nbsp; &nbsp;<\/p>\n\n\n\n<p>By default, all schemas shown in the database explorer are introspected. So, you need to choose which schemas should be displayed and introspected. You can do this in the <em>Schemas<\/em> tab of the data source properties:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-editorskit-shadow\"><img decoding=\"async\" loading=\"lazy\" width=\"1520\" height=\"1338\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2022\/08\/Why_1.png\" alt=\"\" class=\"wp-image-272567\"\/><\/figure>\n\n\n\n<p>Or via the tiny button near the data source name in the database explorer:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-editorskit-shadow\"><img decoding=\"async\" loading=\"lazy\" width=\"1520\" height=\"731\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2022\/08\/Why_2.png\" alt=\"\" class=\"wp-image-272578\"\/><\/figure>\n\n\n\n<p>In general, it\u2019s logical that you want to see and introspect only the schemas you are working with. Behind the aspect of introspection, it\u2019s convenient to see only what you need. Many databases have tons of schemas, but only a few of them may be needed at any one time. Those who work with these databases find this feature very useful :)<\/p>\n\n\n\n<p>The most valuable thing is that we don&#8217;t introspect the schemas you don&#8217;t need. This saves you time and disk space. Again, we don&#8217;t know how big your schemas are and how many databases you have \u2013 we prefer not to make any assumptions.<br><br>Anyway, if you do want all of your database schemas to be introspected, just tick the corresponding checkbox:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-editorskit-shadow\"><img decoding=\"async\" loading=\"lazy\" width=\"1520\" height=\"502\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2022\/08\/Why_3.png\" alt=\"\" class=\"wp-image-272589\"\/><\/figure>\n\n\n\n<p>In cases where the data source has schemas inside databases, the checkbox <em>All Schemas<\/em> should be manually ticked as well.<\/p>\n\n\n\n<p>If you always want to see all databases and schemas, we have another handy setting: <em>Show all namespaces. <\/em>If this option is turned on, all databases and schemas will be displayed in the database explorer, <strong>but not introspected<\/strong>. Should you wish to introspect one of them, select it and click the <em>Refresh<\/em> button.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-editorskit-shadow\"><img decoding=\"async\" loading=\"lazy\" width=\"1522\" height=\"712\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2022\/08\/image.gif\" alt=\"\" class=\"wp-image-272556\"\/><\/figure>\n\n\n\n<p>We hope this post clarifies the situation and provides you with the necessary workarounds.<\/p>\n\n\n\n<p>The DataGrip team<\/p>\n","protected":false},"author":395,"featured_media":272600,"comment_status":"closed","ping_status":"closed","template":"","categories":[2347],"tags":[7078],"cross-post-tag":[],"acf":[],"_links":{"self":[{"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/datagrip\/272555"}],"collection":[{"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/datagrip"}],"about":[{"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/types\/datagrip"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/users\/395"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/comments?post=272555"}],"version-history":[{"count":2,"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/datagrip\/272555\/revisions"}],"predecessor-version":[{"id":451762,"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/datagrip\/272555\/revisions\/451762"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/media\/272600"}],"wp:attachment":[{"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/media?parent=272555"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/categories?post=272555"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/tags?post=272555"},{"taxonomy":"cross-post-tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/en\/wp-json\/wp\/v2\/cross-post-tag?post=272555"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}