<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[Active Query Builder Blog]]></title><description><![CDATA[Active Query Builder Blog]]></description><link>https://www.activequerybuilder.com/blog/</link><image><url>https://www.activequerybuilder.com/blog/favicon.png</url><title>Active Query Builder Blog</title><link>https://www.activequerybuilder.com/blog/</link></image><generator>Ghost 4.48</generator><lastBuildDate>Wed, 29 Apr 2026 22:26:23 GMT</lastBuildDate><atom:link href="https://www.activequerybuilder.com/blog/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[A quick sample: how to customize your database schema view visually?]]></title><description><![CDATA[When you want to change your database schema tree, Metadata Container Editor lets you do this without coding to experiment with the tree structure faster. ]]></description><link>https://www.activequerybuilder.com/blog/quick-sample-how-to-customize-your-database-schema-view-in-a-few-clicks/</link><guid isPermaLink="false">61926e99a78f7d6c1bb51810</guid><category><![CDATA[database schema]]></category><category><![CDATA[user-friendy environment]]></category><dc:creator><![CDATA[Sergey Smagin]]></dc:creator><pubDate>Mon, 15 Nov 2021 14:36:32 GMT</pubDate><media:content url="https://www.activequerybuilder.com/blog/content/images/2021/11/inline584366136.png" medium="image"/><content:encoded><![CDATA[<img src="https://www.activequerybuilder.com/blog/content/images/2021/11/inline584366136.png" alt="A quick sample: how to customize your database schema view visually?"><p>Cutting the long story short, suppose you want to change your schema name and display a folder with only its views inside it. </p><p>I will use the Metadata Container Editor tool to cope with this tasks in a few clicks.</p><p>Metadata Container Editor lets create and edit the content you see in the database schema tree without coding. It is included in all versions of Active Query Builder. Its main window looks as follows:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://activequerybuilder.zendesk.com/attachments/token/Fxv5CgKWHas0OgXa3DYBfVD5n/?name=inline584366136.png" class="kg-image" alt="A quick sample: how to customize your database schema view visually?" loading="lazy"><figcaption>Metadata Container Editor Main window</figcaption></figure><p>&#x200B;There are two trees, and one properties pane at the right that displays properties of the focused node of one tree or another.</p><p>The left-hand tree displays the content of MetadataContainer which reflects the physical database schema. We highly don&apos;t recommend renaming or moving objects &#x200B;in it. You can hide some of them or remove unwanted ones. Also, you can specify alternate friendly names for real objects, so the user can quickly catch what data it contains.</p><p>The tree at the center displays the MetadataStructure object. It is used to customize the arrangement of objects within the tree. If not filled, it reflects the physical structure according to the QueryBuilder.MetadataStructureOptions settings (there you can define grouping by types and namespaces, etc.) </p><p>By default, both MetadataContainer and MetadataStructure objects are filled during the metadata loading process automatically, but you can override this by loading them from pre-generated XML files. You may load just the MetadataStructure from XML and leave the MetadataContainer to be filled automatically, or vice versa. </p><p>So, to cope with the given task you can do the following.</p><p>1. Open the Metadata Container Editor, select the &quot;Metadata Container&quot; - &quot;Load from database&quot; menu item, follow the Metadata Load Wizard steps and get your database schema loaded to the right tree.</p><p>2. Add the following nodes to the Metadata Structure:</p><p>- Disable automatic loading of child items for the Root node.</p><figure class="kg-card kg-image-card"><img src="https://activequerybuilder.zendesk.com/attachments/token/wlbD8OHG7gU1DpMTIKAbY2j9v/?name=inline-769574245.png" class="kg-image" alt="A quick sample: how to customize your database schema view visually?" loading="lazy"></figure><p>&#x200B;- Drag your schema from the Metadata Container to the Structure tree and disable loading for it, rename it as you need.</p><figure class="kg-card kg-image-card"><img src="https://activequerybuilder.zendesk.com/attachments/token/2D1BtaQMAtj0yAkJ1fDpSXtXE/?name=inline-165819067.png" class="kg-image" alt="A quick sample: how to customize your database schema view visually?" loading="lazy"></figure><p>&#x200B;- Add a new item and set its caption as needed (I named it &quot;OnlyViews&quot;), </p><figure class="kg-card kg-image-card"><img src="https://activequerybuilder.zendesk.com/attachments/token/VYGOlQ3AmZu4ohoF3Rx8vQAvG/?name=inline1414514494.png" class="kg-image" alt="A quick sample: how to customize your database schema view visually?" loading="lazy"></figure><p>&#x200B;- For this node, create a metadata filter and define it to see only objects of View type.</p><figure class="kg-card kg-image-card"><img src="https://activequerybuilder.zendesk.com/attachments/token/iWM8v3z2HdOYViJQJw4wGe7Jf/?name=inline-918017508.png" class="kg-image" alt="A quick sample: how to customize your database schema view visually?" loading="lazy"></figure><p>&#x200B;When you finished, you can click the &quot;Preview&quot; button and see how your tree will look for the end-user.</p><figure class="kg-card kg-image-card"><img src="https://activequerybuilder.zendesk.com/attachments/token/kJ5p9Gy5KHVS49OFOsBBgGRhG/?name=inline-360457246.png" class="kg-image" alt="A quick sample: how to customize your database schema view visually?" loading="lazy"></figure><p>&#x200B;Of course, you can do the same in code. But this tool lets you experiment with the tree structure faster. You can read this article to learn how to tune the MetadataStructure to suit your needs: <a href="https://support.activequerybuilder.com/hc/en-us/articles/115001055289-Customizing-the-Database-Schema-Tree-structure?source=search&amp;auth_token=eyJhbGciOiJIUzI1NiJ9.eyJhY2NvdW50X2lkIjoxMzE2ODI2LCJ1c2VyX2lkIjoxOTAwODI4OTk5NzM0LCJ0aWNrZXRfaWQiOjczMTYsImNoYW5uZWxfaWQiOjYzLCJ0eXBlIjoiU0VBUkNIIiwiZXhwIjoxNjM5NTYyNTg2fQ.4s8yVtj5X0FvaulzPNmztZcqmULpFQV-wHCpPh591Qw" rel="noreferrer">Customizing the Database Schema Tree structure</a>.</p>]]></content:encoded></item><item><title><![CDATA[Creating a simple SQL query with Active Query Builder]]></title><description><![CDATA[SQL is a powerful weapon to cope with this task, but you will need plenty of time to master it if you don’t have a solid SQL background. Is there a way to get an instant result? ]]></description><link>https://www.activequerybuilder.com/blog/creating-a-simple-sql-query-with-active-query-builder/</link><guid isPermaLink="false">615aeb19c7b56e085255cd2f</guid><category><![CDATA[use cases]]></category><dc:creator><![CDATA[Sergey Smagin]]></dc:creator><pubDate>Sat, 09 Oct 2021 08:15:06 GMT</pubDate><content:encoded><![CDATA[<h3 id="introduction">Introduction </h3><p>Have you ever been confused about how to get insights from a database fast?</p><p>SQL is a powerful weapon to cope with this task, but you will need plenty of time to master it if you don&#x2019;t have a solid SQL background. Is there a way to get an instant result? </p><p>Scientists proved long ago that visual information is absorbed by the human brain more efficiently than any other type of data representation. That&#x2019;s why you should consider a graphic query builder, especially if data analysts are busy and you need to get a report as soon as possible. As a side effect, you&#x2019;ll get to grips with SQL quicker.</p><p>Making first steps in SQL learning, keep your eye out for mistakes, such as missed commas, brackets and quotes, misspelled commands, etc. They can ruin your query, and all you get in return is puzzling error messages from the server. So you might not even be able to figure out where the mistake is.</p><p>A visual query builder handles the task of building query text so that non-technical users can focus on the data they want to pull out of the database. Even advanced users like analysts and developers can benefit from a graphical query builder, decreasing the time spent building a query.</p><p>This article will show you the process of creating a simple SELECT query to get the information you need. </p><p>Let&#x2019;s take John. He is interested in getting sales analytics for the East Coast for the last three months. He works in a large company, in which a team of analysts performs this kind of task. However, the working time of any analyst in the team is quite expensive. What&#x2019;s more, the team promises to process his task only in a week.</p><p>John knows SQL a bit. He has a desktop app, which he can use to send queries to the database. The key issue is that he only uses it to run pre-built queries provided by one of his colleagues with a technical background. John can read and understand these queries, but it&#x2019;s next to impossible for him to change one. Every time he tries to apply some changes to a query, the server returns an error. </p><p>Of course, John can spend a while on this task and finally understand SQL better, but the problem is, he must provide his suggestions on procurement for the next quarter tomorrow, so he needs those analytics today. So John decides to try Active Query Builder, which his friend, a developer, suggested yesterday.</p><h3 id="sql-query-creation-workflow">SQL query creation workflow</h3><p>John is happy to try the new solution, as his job may be in the balance. His friend decides to help him and explains what John can do by employing the solution.</p><p>On the left side of the window, John sees a list of all the objects. There he can pick out the tables and views containing the required information (Database Schema View). Next, he sees an area to drop the selected objects and mark the needed fields (Design Pane). Having done that, John can specify his conditions to choose only the records he needs and set up sorting and grouping in the grid below (Query Columns List).</p><p>In brief, writing an SQL query in <a href="https://www.activequerybuilder.com/">Active Query Builder</a> comprises three key steps:</p><ol><li>Select data sources, which can be tables or views.</li><li>Select the data you need for your report; choose existing columns, or create expressions for new ones.</li><li>Choose the format of data representation by setting up sorting, grouping, filtering, etc. After that, you will get the data you need.</li></ol><p>John is full of enthusiasm and ready to start. Now, let&#x2019;s review the process in more detail.</p><p><strong><strong>Test database</strong></strong></p><p>First, let&#x2019;s look at the database structure with which John will be working. Let&#x2019;s use the Northwind database to show how easily John can create SQL queries in Active Query Builder. The Northwind database is a sample database developed by Microsoft which has been used for tutorials on various database products for decades. It contains the sales data for a fictitious company called &#x201C;Northwind Traders,&#x201D; which imports and exports specialty foods worldwide.We will use the Customers, Orders, Products, Suppliers, and Employees tables out of this database.</p><ul><li>Customers: Customers who buy products from Northwind</li><li>Orders: Sales order transactions taking place between the customers &amp; the company.</li><li>Products: Product informationSuppliers: Suppliers and vendors of Northwind</li><li>Employees: Details about Northwind employees</li></ul><p><strong><strong>Step 1: Data source selection</strong></strong></p><p>Let&#x2019;s imagine that John needs to generate a report that will show the results of selling some products in a specific location. Here, he&#x2019;ll have to deal with the Products table. He can drag and drop it onto the visual editor on the right side or just double-click on it.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.activequerybuilder.com/blog/content/images/2021/10/step1.png" class="kg-image" alt loading="lazy"><figcaption>Adding a new table to the query</figcaption></figure><p>At the bottom of the screen, he sees the SQL text that matches his selection. These editors are interlinked, and Active Query Builder simultaneously reflects all changes made in another editor. Thus, John can edit a query text in the traditional manner and observe the query structure.</p><p>In Visual Query Builder, he can see the list of fields and their data types. Some fields that point to values in other tables have a little link icon next to their name. They are called foreign keys. Primary keys, like ProductID here, are marked with a key sign.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.activequerybuilder.com/blog/content/images/2021/10/foreign-key-links.png" class="kg-image" alt loading="lazy"><figcaption>Browsing the tables related to this one.</figcaption></figure><p>In most cases, the information of interest is spread across multiple objects, so John has to combine it in the query to get the required results. John needs three objects: Products, which stores all the items that have been sold, Orders, and Order Details.</p><p>When he adds several objects to the designer pane, he needs to link them to each other. Otherwise, he will end up having a massive set of data that includes all rows from all items multiplied by all rows from all orders. However, his goal is to see only the items corresponding to specific orders.</p><p>There are a few ways to join two objects in Active Query Builder. The first method is to use the link buttons next to key fields. John sees that the Orders table is linked with the Employees and Customers tables, and next to OrderID is the Order Details table he needs. </p><p>John clicks on the link button and sees a child table. The link type is one-to-many because Order Details is joined with the primary key of the Orders table.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.activequerybuilder.com/blog/content/images/2021/10/step2.png" class="kg-image" alt loading="lazy"><figcaption>Adding the second table joined with the first one with a foreign key.</figcaption></figure><p>After that, he needs to join the Products and Order Details tables. John joins these objects with the ProductID key field. He can join them with the link button, or he can drag the ProductID field from the Products table and drop it to the field in the destination table with the same name.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.activequerybuilder.com/blog/content/images/2021/10/step3-preview.png" class="kg-image" alt loading="lazy"><figcaption>Tree tables in a query joined with each other with a Query Results preview.</figcaption></figure><p>John looks at the query text below. It now contains a From expression that includes three tables interlinked within the Inner Join clause. Next, he switches to the Data tab to see the data preview updated in real-time. For now, it includes all the fields of all the tables.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.activequerybuilder.com/blog/content/images/2021/10/sql-text.png" class="kg-image" alt loading="lazy"><figcaption>SQL query text.</figcaption></figure><p><strong><strong>Step 2: Picking the data for your report</strong></strong></p><p>Next, John can select the columns to create a report. He marks the checkboxes next to the fields he needs. He chooses the product name, price, and the items left in stock from the first table. Then he marks the region where these items were shipped from the Orders table.</p><p>In the visual editor, he can see the list of columns in the query. John can also switch back to Data, and he will see more selective data that is easier to review.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.activequerybuilder.com/blog/content/images/2021/10/step-4.png" class="kg-image" alt loading="lazy"><figcaption>Selected columns - Query Results preview.</figcaption></figure><p><strong><strong>Step 3: Choosing the format of data representation</strong></strong></p><p>The last step is to filter particular records and choose the order in which to display them. First, John filters out Shipping regions to East Coast locations only. Then, next to Orders.ShipRegion, in the Criteria column, he types equal, WA, and the Data preview now shows only the items shipped to the required area. The criteria value was auto-quoted according to SQL rules, so John doesn&#x2019;t have to worry about that.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.activequerybuilder.com/blog/content/images/2021/10/step-5.png" class="kg-image" alt loading="lazy"><figcaption>Fittering data by ship region.</figcaption></figure><p>There&#x2019;s no point in having a column with identical data in all the rows, so he makes it invisible by clicking the visibility checkbox in the ShipRegion row. The filter will remain active, but the data will look cleaner. </p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.activequerybuilder.com/blog/content/images/2021/10/step-6.png" class="kg-image" alt loading="lazy"><figcaption>Hiding columns from the resultset.</figcaption></figure><p>Then he sorts the data by the Products column, selecting the ascending sort type in the ProductName row. </p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.activequerybuilder.com/blog/content/images/2021/10/step-7.png" class="kg-image" alt loading="lazy"><figcaption>Sorting data by product name.</figcaption></figure><p>That&#x2019;s great, but still not perfect because there are a few duplicates, as there were multiple shipments of the same goods. To get rid of them, John goes to the Properties in the upper right corner and checks the &#x201C;Select only unique records&#x201D; checkbox.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.activequerybuilder.com/blog/content/images/2021/10/step-8.png" class="kg-image" alt loading="lazy"><figcaption>Selecting unique records only.</figcaption></figure><p>That&#x2019;s it. John sees a clean, sorted, filtered list of products without duplicates, and he can always switch back to the SQL tab to see the query. </p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.activequerybuilder.com/blog/content/images/2021/10/final-text.png" class="kg-image" alt loading="lazy"><figcaption>The final SQL query text.</figcaption></figure><h3 id="conclusion">Conclusion</h3><p>In this article, we presented an SQL query building process in the form of a story about John. Now let&#x2019;s summarize what you can get using Active Query Builder. &#xA0;Active Query Builder helps you to get the data you need quickly and makes the process easy. You get a visual representation of the query structure, which can be helpful, especially with a complex query. In addition, the tool helps prevent SQL errors, so you won&#x2019;t need to waste your time looking for missing commas or any other possible errors.</p><p>As for John, the hero of our story, it stunned him how quickly he got the information despite his lack of SQL knowledge. He&#x2019;s glad to have such a tool at hand. Still, he&#x2019;s frustrated with his colleague, who didn&#x2019;t tell him about the tool the day before. John was behind schedule with his report, and there was a significant chance he wouldn&#x2019;t manage to present his suggestions on time. However, with Active Query Builder at his disposal, he made valuable proposals and prepared a perfect slide deck. &#xA0; &#xA0;</p>]]></content:encoded></item><item><title><![CDATA[SQL for Beginners]]></title><description><![CDATA[With Active Query Builder newcomers get a visual drag-and-drop query editor, SQL learning auto-assistant, and query syntax and logic checker]]></description><link>https://www.activequerybuilder.com/blog/sql-for-beginners/</link><guid isPermaLink="false">5d1f4347671fa00852234a58</guid><dc:creator><![CDATA[Sergey Smagin]]></dc:creator><pubDate>Wed, 25 Dec 2019 11:10:24 GMT</pubDate><media:content url="https://www.activequerybuilder.com/blog/content/images/2021/07/sql-for-beginners.png" medium="image"/><content:encoded><![CDATA[<img src="https://www.activequerybuilder.com/blog/content/images/2021/07/sql-for-beginners.png" alt="SQL for Beginners"><p>Entry-level SQL users sometimes have a hard time learning the language or hesitate to apply their knowledge in the real world when working with production databases. These are just two of the many possible reasons that hold beginners back from accessing the data they need. Active Query Builder helps SQL learners and newcomers resolve all kinds of issues when creating SQL requests.</p><p>What SQL newcomers will get with Active Query Builder:</p><ul><li>Visual drag-and-drop query editor</li><li>SQL learning capabilities and auto-assistant</li><li>Query syntax and logic checker</li></ul><h2 id="easy-solution-for-all-entry-level-sql-users">Easy solution for all entry-level SQL users</h2><p>There are many typical minor problems and questions that beginners usually have. If you&#x2019;re one of them, here are the answers.</p><h3 id="do-you-need-help-with-sql-queries">Do you need help with SQL queries?</h3><p>People who know SQL a bit but don&#x2019;t have much experience need to build confidence. Active Query Builder allows them to use a handy drag-and-drop visual query editor, which is probably the most beloved feature. It lets users create real queries as easily as putting together a child&#x2019;s Lego project.</p><p><strong>Write your first request in less than 2 minutes.</strong> You&#x2019;ll be surprised by the speed at which you can construct queries from simple building blocks and see results right away.</p><p><strong>The query syntax and logic</strong> are always under control. Get rid of missing commas and unmatched fields when doing SELECT and GROUP BY.</p><p><strong>No more waiting in line for help.</strong> You no longer need help with every query because you can do most of the tasks yourself. In addition, IT staff can do their routine with little or no in-house consulting.</p><h3 id="did-you-learn-sql-a-while-ago-and-need-to-refresh-your-knowledge">Did you learn SQL a while ago and need to refresh your knowledge?</h3><p>It might be painful to go back to where you left off, especially after years have passed by. But, on the other hand, you might need to ask a few people for advice, and it can be tempting to procrastinate a bit before you come up with a query text.</p><p><strong>Even if you don&#x2019;t remember how, you can still do it.</strong> No need to read the documentation if you can&#x2019;t remember some SQL keywords. They&#x2019;ll be at your fingertips while constructing a query.</p><p><strong>One query, two views.</strong> Constructing a query, you can switch between two editors: the visual one at the top and SQL Query Text at the bottom. Any change in either mode will automatically appear in the other.</p><p></p><p><strong>Auto-suggestions</strong> will help you write query text and prevent you from getting stuck.</p><p>Try out Active Query Builder now. This tool can be equally valuable to both professionals and newcomers.</p>]]></content:encoded></item><item><title><![CDATA[SQL for Advanced Users]]></title><description><![CDATA[Necessary tools for SQL professionals: fully-fledged text editor, subqueries editing, an option to tame everty subqueriy, and repository for your queries ]]></description><link>https://www.activequerybuilder.com/blog/sql-for-advanced-users/</link><guid isPermaLink="false">5d1f41e2671fa00852234a56</guid><dc:creator><![CDATA[Sergey Smagin]]></dc:creator><pubDate>Wed, 25 Dec 2019 11:10:14 GMT</pubDate><content:encoded><![CDATA[<p>A single SQL query sometimes may take multiple pages and include many subqueries. Such a complex query can be quite overwhelming if it&#x2019;s not broken up into smaller, easily digestible pieces. Active Query Builder helps advanced SQL database users work with SQL queries, and offers a set of advanced structural and visualization tools:</p><ul><li>Write queries in a modern SQL text editor with everything a professional can expect.</li><li>Preview the subquery result data simply by clicking a tab and looking at what&#x2019;s going to the main query funnel.</li><li>Store query templates in a built-in repository and reuse them as views in other queries.</li></ul><h2 id="necessary-tools-for-sql-professionals">Necessary tools for SQL professionals</h2><p>Let&#x2019;s review some of the tools you&#x2019;ll want to use every day.</p><h3 id="fully-fledged-text-editor">Fully-fledged text editor</h3><p>A good SQL query text editor is something users expect up front:</p><ul><li>Auto-suggestions in a dropdown list will help you write query text quicker and prevent you from getting stuck. Select objects and fields in your database schema, SQL functions, and keywords as you type.</li><li>Subquery and expression boundary indication to immediately see the context.</li><li>Straightforward formatting to embrace the query structure.</li></ul><h3 id="edit-subqueries">Edit subqueries</h3><p>It&#x2019;s hard to tell where a subquery begins and ends in the body of a larger query. Proper formatting and boundary highlighting is a great help, but when a subquery takes more than one page of scrolling, it stops serving you.</p><p>There is a solution though: extract the subquery and work with it like you would with a standalone query. Active Query Builder makes the transition from parent query to subquery smooth and automatic. You&#x2019;ll see and be able to edit its text and visual diagram in a separate tab. Also, you can preview what data this subquery returns.</p><h3 id="tame-your-subqueries">Tame your subqueries</h3><p>You can see the subquery structure on the upper part of the screen while you&#x2019;re editing the query text down below. You can dive into every subquery by clicking on it, and it&#x2019;ll be opened in a separate tab. Check what data it returns, modify if needed, and get back to the parent query.</p><h3 id="repository-for-your-queries"><br>Repository for your queries</h3><p>During day-to-day work, you deal with typical tasks, so you probably have a bunch of patterns or subquery snippets to quickly address them. If you simply copy-paste them into your final queries, it makes them heavier and may lead to the issue where a subquery modification will require changing it everywhere. Sometimes it&#x2019;s neither convenient nor technically wise to store these queries in a database as views, so it&#x2019;s a good alternative to have a quickly accessible repository at hand. In database terms, we can call it a client-side view.</p><p>With Active Query Builder, you can save your subquery snippets to the Reusable Queries repository and refer to them from final queries whenever you need. Every change you make to a query will change all the query instances across all the other queries where it was used.</p><h2 id="try-it-out-now">Try it out now</h2><p>This tool is equally useful for both professionals and newcomers. Advanced users will benefit from query text structuring and extended tools for storing and editing subqueries, while those who don&#x2019;t know SQL very well will appreciate the visual drag-and-drop editor. Try out a fully functional Active Query Builder trial today!</p>]]></content:encoded></item><item><title><![CDATA[Understanding a Complex Database Structure]]></title><description><![CDATA[Knowing where to look for the necessary data in a scarily large database schema is vital when you write SQL queries.]]></description><link>https://www.activequerybuilder.com/blog/understanding-a-complex-database-structure/</link><guid isPermaLink="false">5c47066d13ea32083d5f0097</guid><category><![CDATA[database schema]]></category><category><![CDATA[user-friendy environment]]></category><dc:creator><![CDATA[Sergey Smagin]]></dc:creator><pubDate>Tue, 22 Jan 2019 12:10:45 GMT</pubDate><media:content url="https://www.activequerybuilder.com/blog/content/images/2019/01/Drupal8_UPsitesWeb_Schema_10-19-2013.png" medium="image"/><content:encoded><![CDATA[<img src="https://www.activequerybuilder.com/blog/content/images/2019/01/Drupal8_UPsitesWeb_Schema_10-19-2013.png" alt="Understanding a Complex Database Structure"><p>Knowing where to look for the necessary data in a scarily large database schema is vital when you write SQL queries.</p><p>Sometimes, even database designers have a hard time guessing which object contains the required data. Documentation and even professional advice isn&#x2019;t always such a great help for intimately understanding a database schema and navigating it like your own backyard.</p><p>Corporate databases usually contain thousands of tables, and a simple search by name may not work. Another trap is searching in the wrong place by selecting the wrong object as the data source when typing a query.</p><p>In this article, we&#x2019;ll talk about the most common problems that crop up in large relational databases, and how to optimize data searching mechanisms. Solving these problems will benefit data analysts and operators who need to get data, as well as developers who control DB infrastructure.</p><h2 id="make-it-simple-">Make it simple!</h2><h3 id="self-explanatory-name-aliases">Self-explanatory name aliases</h3><p>When creating a database, an engineer may give tables and fields nondescript names, making it difficult to navigate in the future as the DB continues to grow. Unfortunately, this issue can&#x2019;t be resolved by simply changing the names, because that will cause addressing problems in linked services. Another time this type of issue comes up is when website CMSs create databases automatically and assign &#x2018;machine&#x2019; names. To recap, here we have two main problems:</p><ol><li>Indistinct names given by humans (e.g., AGC_SPAN2WAY_COL).</li><li>Automatic machine names (e.g., TBL-001, TBL-002).</li></ol><p>Either way is human-unreadable, and it doesn&#x2019;t serve you well when you need to find relevant data quickly.</p><p>The best solution here going forward is to assign clear and descriptive names when creating a new database, but what if you&#x2019;re stuck working with an existing database that supports a large system and is impossible to change?</p><p>Active Query Builder allows you to assign aliases to any table or field name. Your queries will be self descriptive and easy to understand. Aliases can include text in any language.</p><h3 id="display-only-what-matters">Display only what matters</h3><p>There&#x2019;s no point in showing an entire database structure with thousands of tables. As you work, you can selectively display only the tables you need to see. This way, the database will become more transparent from the user&#x2019;s perspective, featuring a tree of only the most relevant data for current business processes.</p><p>If the number of objects you need is large enough, you can group objects in folders in accordance with areas of business use and subject. You can put a few main groups in the root folder, and divide the rest into subfolders (similar to a file manager).</p><p>It also makes sense to create different views according to roles or user groups (for example, the accounting department sees one structure, business analysts see another).</p><h3 id="group-adjacent-entities-into-virtual-objects">Group adjacent entities into virtual objects</h3><p>Creating virtual fields and objects really helps give you a clearer database schema view, making it easier to manipulate a smaller number of objects.</p><p><strong>Virtual fields minimize the number of reference tables needed for creating a query.</strong></p><p>A database usually stores information about a single entity in multiple tables, which makes data searches much more complicated. For example, let&#x2019;s say each product has a specific category ID, which is a numeric value. To match a numeric ID and category name, you need to refer to another table. Only when you open the table that matches category IDs and their names can you find out that, e.g., #304512 is the sports shoes category, and then continue the search.</p><p>With the help of Active Query Builder, you can add a virtual field to the product table that doesn&#x2019;t appear in the real database, but helps to navigate linked data. In the case mentioned above, the category names will appear in this additional virtual field (next to the category ID column), which will minimize addressing to corresponding databases throughout the data search.</p><p><strong>Virtual objects collect all the necessary information about a single entity.</strong></p><p>You can combine explicit information about a single entity within a virtual object. It&apos;s like a pivot table where you can choose what data to show, group, sort, combine, etc.</p><p>For those who are aware of how views work in SQL, this topic won&apos;t be hard to understand. It&apos;s literally the same thing, but applied on the client side only, without modifications to the real database.</p><h2 id="how-does-it-work-with-sql">How does it work with SQL?</h2><p>How is all of the aforementioned related to querying an actual database? Active Query Builder handles the entire process and also allows users to work with aliases, virtual objects, and more. The end user might not even guess that the names s/he is using are overlays of what exists in the actual database. Active Query Builder automatically turns readable name aliases and phantom schema elements into original names and SQL expressions when completing queries.</p><h3 id="usage-scenarios">Usage scenarios</h3><p>Let&#x2019;s look at a few common usage scenarios related to working with a corporate database. Different user types can configure a database view for the end user to work with the database and resolve their day-to-day tasks.</p><p><strong>Lone warrior (a programmer)</strong></p><p>The main task of a programmer is to support and improve the company&#x2019;s system and release an application or a service that works with the database.</p><p>An approach where a programmer is also responsible for handling the database is usually applicable to small projects and organizations. The developer knows the database structure and can provide access to the required fields and tables for specific groups of users. This process requires some time, but it pays off when the user roles are pre-determined, and the company doesn&#x2019;t have a dedicated employee for the task. In that case, it&#x2019;s easier for the programmer to configure how the database is represented to end users within the company.</p><p>After it&#x2019;s done, the developer can work on improving the system, which is a more strategically important task than helping colleagues with SQL queries.</p><p>The drawback of this approach is that any changes in the database schema will require releasing a new program version. Again, with the help of Active Query Builder, you can make the database way more transparent with name aliases, virtual tables and objects without altering the production database.</p><p><strong>Enterprise style (a supervisor)</strong></p><p>Note: To avoid confusion with DB admins, let&#x2019;s say that an employee who configures database views for end users is a supervisor.</p><p>In larger organizations with a complex data structure, a programmer should exclusively work on improving the entire system and its apps. A database app supervisor will maintain the database and handle the ins and outs for regular users (other employees). Active Query Builder has a dedicated UI module for that workflow.</p><p>The DB app supervisor can customize the database view for different groups of users in accordance with what they do within the organization. For example, accountants will get one DB view, and marketing specialists will get another. Both views will lack any extra stuff that distracts them from solving actual tasks.</p><p>The database admin can add virtual fields and objects, delete them, and create name aliases that show what data is stored there. If the adapted name is not enough, one can add field descriptions with more comments.</p><p><strong>Self-service (an end user)</strong></p><p>The programmer doesn&#x2019;t always know the entire database structure along with every user&apos;s role. Even if that&#x2019;s the case, users can retrieve the necessary data with minimal experience. If a user periodically works with the SQL database in the organization, typical queries can be saved for future queries in the repository. After that, those query templates can be used in other queries as virtual objects. The approach of using a query within a query requires little more than average experience, but it&#x2019;s really helpful if users have the freedom to work with multiple databases like supervisors.</p><h2 id="conclusion">Conclusion</h2><p>If your RDBMS has a complex schema, building queries doesn&#x2019;t necessarily entail the cumbersome, painful process that&#x2019;s involved when using regular database query tools. You can create a comfortable ecosystem for employees using a specialized tool like Active Query Builder. End users can feel comfortable working with the data without SQL barriers, and programmers can avoid the hassle of modifying the real database.</p>]]></content:encoded></item><item><title><![CDATA[Do you need a BI tool to make ad-hoc reports?]]></title><description><![CDATA[Is it possible to make users of your database information system (ERP or CRM) self-sufficient in serving their needs for data without the use of complicated and expensive BI tools?]]></description><link>https://www.activequerybuilder.com/blog/2018-09-17-do-you-need-a-bi-tool/</link><guid isPermaLink="false">5b9f91ead5a7b639e8522d9b</guid><category><![CDATA[use cases]]></category><category><![CDATA[business applications]]></category><category><![CDATA[Active Query Builder]]></category><dc:creator><![CDATA[Sergey Smagin]]></dc:creator><pubDate>Mon, 17 Sep 2018 12:21:18 GMT</pubDate><media:content url="https://www.activequerybuilder.com/blog/content/images/2018/10/tshirt.jpg" medium="image"/><content:encoded><![CDATA[<img src="https://www.activequerybuilder.com/blog/content/images/2018/10/tshirt.jpg" alt="Do you need a BI tool to make ad-hoc reports?"><p>Is it possible to make users of your database information system (ERP or CRM) self-sufficient in serving their needs for data without the use of complicated and expensive BI tools?</p><p>This article is about straightening out the process of getting data within an organization for all employees with different skills and knowledge.</p><p>While programmers and database admins can freely write SQL requests and export data from a database, this task will make the hair stand up on the back of a business user&#x2019;s neck. Still, they need to have access anyway, so the data must flow!</p><p>Any PC user can work with spreadsheets, but accessing SQL databases is way too hard for an inexperienced user. In this environment, IT-savvy people get more and more strenuous workloads retrieving data, but is there a solution which can be integrated into your internal system that&#x2019;s as easy to use as a regular spreadsheet editor?</p><h2 id="live-example">Live Example</h2><p>Let&apos;s review a case with a sales operations manager in a grocery store network who needs to monitor the remaining number of products in warehouses across the state to minimize leftovers. It is an essential economy and supply chain task that reduces surplus (which leads to a crisis when left uncontrolled). This task, when perfectly executed, maximizes profit and customer satisfaction.</p><p>An ordinary sales operations manager doesn&apos;t have enough skills to write SQL requests, but needs to access data every day. For this purpose, s/he asks an SQL-proficient colleague to get the data from the database. A single work-hour from an SQL expert costs anywhere from $25 (SQL data analyst) to $55 (SQL developer), but even worse is that a developer has to switch from other strategically important tasks to the low-qualified (from a master&#x2019;s degree developer point of view) job of accessing data.</p><p>The worst-case scenario is if a developer cannot afford to be distracted, and a sales operations manager becomes responsible for leftovers and spoiled products, which will lead to internal tension in the company. Why not remove this potentially dangerous extra communication chain?</p><p>Otherwise, you can hire a full-time programmer, who will specifically perform these types of tasks, but why do you need a guy who manually transfers product from one conveyor belt to another? It&#x2019;s better to &#x201C;hire&#x201D; a robot to do that.</p><h2 id="how-can-an-sql-query-builder-solve-this-problem">How can an SQL Query Builder solve this problem?</h2><p>An SQL database operator needs to be qualified enough to access an SQL database. However, with a DB access tool, it becomes available for everyone, so it can serve as an alternative for a business intelligence tool. Resolution of this essential problem will minimize delegation chains for accessing data and will create incentives for employees to work more efficiently by accessing data on their own.</p><p>This solves not just one problem, but many subsequent problems as well, which adds up to process optimization and business growth.</p><p>With the help of an SQL data access module, data analysts and other users who were struggling before will start getting data directly for their day-to-day activities. This will save you more resources for strategic development rather than routine (yet important) tasks for accessing SQL.</p><h2 id="sql-simplified">SQL simplified</h2><p>How can a non-technician learn SQL and become familiar with a database schema without taking extensive courses? A visual interface for building queries solves only a part of the puzzle. End users will also need to see where the required data resides in the database, and how each database table is related to the others. Just provide users with a clear view of the schema, and let them explore it and try out standard access operations. It&#x2019;s the quickest way to learn how to operate a database.</p><p>Active Query Builder lets the DB admin prepare an easy-to-understand presentation of the database schema for users. Plus, a live update of the data result they&#x2019;re searching for is a great help. A perfect analogy for that is autocomplete suggestions in smartphones and Google searches that simplify day-to-day life. </p><p>Building your own DB access module with the help of Active Query Builder will optimize business processes in your organization once and for all. Even if your business arises rapidly, the access module will continue to serve all employees well.</p><h2 id="does-your-business-need-a-db-access-module">Does your business need a DB access module?</h2><p>Let&#x2019;s walk through the checklist to figure out if it&#x2019;s appropriate for your situation. There are a few technical prerequisites for you to consider as well before implementing a DB access tool.</p><h3 id="mid-to-large-business">Mid-to-large business</h3><p>Usually, this solution is acquired by mid-to-large companies with more than 30 people on staff. Smaller companies, especially IT companies, as a rule, don&apos;t have very complex databases with CRM and a lot of operators and can handle them on their own.</p><h3 id="it-must-be-an-sql-database">It must be an SQL database</h3><p>SQL databases have proven to be the most commonly used databases. There are many database management systems: MSSQL, MySQL, PostgreSQL, Oracle, etc. Any of them will work fine for organizing universal DB access.</p><h3 id="proprietary-erp-or-crm-systems">Proprietary ERP or CRM systems</h3><p>A large number of companies use their own in-house systems to organize internal data, for example, a self-written CRM to organize a customer database.</p><p>Note: Commercial CRM systems, like SalesForce, won&#x2019;t work because they work with databases in their own hidden way.</p><h3 id="are-there-cases-when-you-don-t-need-it">Are there cases when you don&#x2019;t need it?</h3><p>Aside from proprietary systems that manage databases in a way that you can&#x2019;t interfere with, there are some other reasons you might not need to implement a DB access tool. Here are a few cases where you&#x2019;d be better off without it:</p><ul><li>If you work with regular Excel datasheets, not databases</li><li>If you don&#x2019;t need ad-hoc reporting</li><li>If you already have all necessary reports possible ;)</li></ul><h2 id="how-to-set-up-a-data-access-module">How to set up a data access module</h2><p>Setting up the module will take minimal effort and produce maximum results. No heavy scripting is needed if your database is clear enough to understand by users. Advanced configuration process doesn&#x2019;t usually take longer than a few hours or a couple of days, depending on the complexity of your database and your perfectionism.</p><p>If your case is not a trivial one, or if you have particular questions on how to set up a module for your organization, please contact us, we&#x2019;ll be happy to help.</p><h2 id="summary">Summary</h2><p>Living in the modern era, we have to use technology that&#x2019;s easy to use but hard to understand from top to bottom. It may seem that many things have been simplified during the last 10 years, like user interfaces and programming tools, but the amount of business data fills out day by day. More parameters are being tracked, and more automation is being implemented.</p>]]></content:encoded></item><item><title><![CDATA[How to organize data flow in B2B solutions?]]></title><description><![CDATA[When you start any B2B business, you probably need partner’s data. The manual approach is like asking the CTO to show you where to get the data. Then repeat the process with every client.]]></description><link>https://www.activequerybuilder.com/blog/2018-09-13-organize-data-flow-b2b/</link><guid isPermaLink="false">5b8523f68afd192ef5d1eed8</guid><category><![CDATA[use cases]]></category><category><![CDATA[B2B]]></category><category><![CDATA[ETL]]></category><category><![CDATA[Active Query Builder]]></category><category><![CDATA[External database access]]></category><category><![CDATA[business applications]]></category><dc:creator><![CDATA[Sergey Smagin]]></dc:creator><pubDate>Thu, 13 Sep 2018 10:29:00 GMT</pubDate><media:content url="https://www.activequerybuilder.com/blog/content/images/2018/09/Access-External-SQL-database-2-2.png" medium="image"/><content:encoded><![CDATA[<img src="https://www.activequerybuilder.com/blog/content/images/2018/09/Access-External-SQL-database-2-2.png" alt="How to organize data flow in B2B solutions?"><p>When you start any B2B business, you need to access partner&#x2019;s remote data. Each company has its own database and you need to set up data import individually. The manual approach is like marching into the company headquarters and asking the CTO to show you where to get the data. Then repeat the process with every client. Sounds insane, right?</p><p>Scaling up your business isn&apos;t possible with this unbalanced workflow, and you need a universal way of accessing data across multiple databases.</p><p>In this article, we&#x2019;ll learn how to do it, referencing a live example of a solution that connects a network of web stores that accept payments with a network of delivery companies.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.activequerybuilder.com/blog/content/images/2021/09/Access-External-SQL-database-2-1.png" class="kg-image" alt="How to organize data flow in B2B solutions?" loading="lazy"><figcaption>Getting data from partner&apos;s databases to maintain providing your services.</figcaption></figure><p>Each store delegates parcel services to a number of delivery companies. Delivery agents need to access an internet store&#x2019;s database to get the data needed for mailing, but they shouldn&#x2019;t have full access to customers&#x2019; credit card information, etc.</p><h3 id="access-a-third-party-database-like-your-own-backyard">Access a third-party database like your own backyard</h3><p>A manual data access approach is feasible with up to ten clients. When your business grows and you connect with hundreds of companies, more and more people with different skills get involved and they need to access data across multiple databases. To satisfy everyone&apos;s needs, developing a convenient database backoffice will turn into a nightmare without proper tools.</p><p>Partner&#x2019;s database is shrouded in fog for an employee from another organization, so you need to build a data access module that&#x2019;ll help to read the DB schema. Let&#x2019;s see what a data access module task is.</p><p>A database consists of many linked tables that contain all sorts of data. Sometimes, the required data is stored within XML or JSON fields. SQL is the key to translating a very complex structure into a readable table format. However, it&#x2019;s merely a data access language, not a ready-to-use solution.</p><p><strong>Data access module tasks:</strong></p><ul><li>Reveal a database structure</li><li>Let all types of users write SQL queries (even beginners)</li><li>Instantly show result data as you type a query</li><li>Map data to the structure</li><li>Convert data to convenient file formats</li></ul><p>The module should provide safe and controlled access to an external database through the easy to use and understandable interface. A little assistance from the partner company might be needed, but it&#x2019;s nothing compared to making regular requests to provide papers and separate chunks of data.</p><h2 id="business-example-sending-packages">Business example: Sending packages</h2><p>Let&apos;s take a look at a specific example with a web store that sells various items, and several delivery companies that deliver the orders to customers&#x2019; addresses.</p><p>Let&#x2019;s say that you own a B2B solution that connects to the web store and passes this data to a number of delivery companies. Both parties &#x2014; the web store and the delivery company &#x2014; benefit from this partnership. They don&#x2019;t bother about the peculiarities of the SQL database but simply do their part of the job: grow their business. Both parties should also take care of confidential information, such as end users&apos; personal data by providing limited access. This data must be safe according to the user policy and non-disclosure agreements.</p><p>When a user buys something from the web store, the order details should be sent to the delivery company ASAP, so the web store must grant direct, yet controlled access to its database.</p><p>The partner&#x2019;s internet store has an SQL database of order IDs, a list of items in each order, customer names, delivery addresses, etc. Of course, all this data is represented in different tables that are linked with each other. One store may place multiple orders, and each order may include multiple items, so the information can&#x2019;t be represented in a simple spreadsheet.</p><p>Imagine how long it would take for their DB admin to contact the web store, obtain the database schema, create the necessary SQL requests to set up a correct ETL (extract-transform-load) configuration for getting the necessary data and sending parcels. It&#x2019;s ridiculous! No business can grow with such an inefficient solution.</p><p>Accessing the database implies getting only the required data (via SQL SELECT). A third party can&#x2019;t write to the external web store&#x2019;s database or read sensitive information (e.g., users&apos; credit card details).</p><p>With this approach, you&#x2019;re delegating the data configuration task to one of the parties, who knows what data should be provided. This party is also responsible for data protection and you free yourself from possible legal issues.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.activequerybuilder.com/blog/content/images/2021/09/ode_qb.png" class="kg-image" alt="How to organize data flow in B2B solutions?" loading="lazy"><figcaption>Constructing a dataset out of the partner&apos;s database schema via SQL.</figcaption></figure><p>In the end, the user needs to do is match the data columns of this query to the fields in the destination table. This process is also called mapping. With simple drag&#x2019;n&#x2019;drop, the end user moves the data columns to the fields in the table that retrieves the data.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.activequerybuilder.com/blog/content/images/2021/09/ode_map.png" class="kg-image" alt="How to organize data flow in B2B solutions?" loading="lazy"><figcaption>Mapping fields of the returned datset to the required input data strcucture.</figcaption></figure><p>Voila! Now we have a ready-to-use query, with columns matching the columns of the recipient/receiving table. The only thing left to do is to import!</p><h2 id="summary">Summary</h2><p>Data access is crucial for business processes between multiple companies. When you run a business, you don&#x2019;t want to spend a lot of time digging around for data on a regular basis. Make Active Query Builder one of the core components of your solution for letting businesses interact and thrive together.</p><p>The component comes with a full set of tools needed for accessing databases, customizing the environment, executing SQL queries and performing other data-related tasks.</p><p>Check out the demo at GitHub and see for yourself how any PC user can be qualified enough to work with data tucked away in a maze of SQL databases.</p>]]></content:encoded></item><item><title><![CDATA[Faster visual SQL query building in the upcoming major version!]]></title><description><![CDATA[Find out how things will change in Active Query Builder for .NET 4.0.]]></description><link>https://www.activequerybuilder.com/blog/2018-04-28-much-faster-visual-sql-query-building-in-the-new-major-version-40/</link><guid isPermaLink="false">5b9f8c11d5a7b639e8522d95</guid><category><![CDATA[development]]></category><category><![CDATA[Visual query building UI]]></category><category><![CDATA[programmatic SQL modification]]></category><category><![CDATA[Active Query Builder]]></category><dc:creator><![CDATA[Sergey Smagin]]></dc:creator><pubDate>Sat, 28 Apr 2018 11:12:00 GMT</pubDate><media:content url="https://www.activequerybuilder.com/blog/content/images/2018/09/define-cond-from-design-2.png" medium="image"/><content:encoded><![CDATA[<img src="https://www.activequerybuilder.com/blog/content/images/2018/09/define-cond-from-design-2.png" alt="Faster visual SQL query building in the upcoming major version!"><p>Today we announce the main improvements in the new major version that will help users and developers be more productive than before. The upcoming release of Active Query Builder for .NET will be available until the end of this year.</p><h2 id="core-improvements">Core improvements</h2><p>The main core change is the new serializable query object model. It will store every single SELECT statement the way you see it in the query text: lists for the SELECT, GROUP BY, and ORDER BY clauses and tree-like structures for the WHERE and HAVING clauses. This model will significantly ease the programmatic SQL query analysis and modification.</p><p>Besides, we have made the new fluent API to build SQL queries the way close to the SQL language.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.activequerybuilder.com/blog/content/images/2018/09/fluent_api-1.png" class="kg-image" alt="Faster visual SQL query building in the upcoming major version!" loading="lazy"><figcaption>Fluent API to define SQL queries independently from database server.</figcaption></figure><p><strong>Three main advantages of the new API:</strong></p><ul><li>It is type safe and uses the pre-generated objects from your database schema, so you get compilation errors when table or field is missing or misused.</li><li>You get SQL text for any database server supported by Active Query Builder from the single query definition.</li><li>It is easy to read and easy to write queries with it using the IDE auto-completion: lists of SQL functions, database objects and their fields are always at hand.</li></ul><h2 id="visual-improvements">Visual improvements</h2><p>The tree-like interface to edit conditions in the WHERE and HAVING clauses will be available in all versions.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.activequerybuilder.com/blog/content/images/2018/09/criteria-builder.png" class="kg-image" alt="Faster visual SQL query building in the upcoming major version!" loading="lazy"><figcaption>The tree-like user interface to build SQL conditions.</figcaption></figure><p>You can let users define conditions in the old way, so users can gradually move on to using the new interface, as soon as they realise its advantages.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.activequerybuilder.com/blog/content/images/2018/09/compact-grid.png" class="kg-image" alt="Faster visual SQL query building in the upcoming major version!" loading="lazy"><figcaption>Compact SQL query columns list.</figcaption></figure><p>Only four columns in the Query Columns Grid will be necessary to build a query: SQL expression, Column name, Sorting and Grouping/Aggregate.</p><h2 id="further-improvements">Further improvements</h2><p>For the rest of the year, we aim to provide a more compact and clear view of SQL queries and database schema for end-users.</p><h3 id="objects-on-the-design-pane-match-real-world-objects">Objects on the design pane match real-world objects</h3><p>Complex real-world entities are represented in a relational database by several tables. Assembling them in a single object on the design pane will give a more clear view of the database schema.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.activequerybuilder.com/blog/content/images/2018/09/nested-objects.png" class="kg-image" alt="Faster visual SQL query building in the upcoming major version!" loading="lazy"><figcaption>Nested tables in SQL design pane.</figcaption></figure><h3 id="hiding-intermediate-objects">Hiding intermediate objects</h3><p>Hiding objects which are only used to define many-to-many relationships from the Design Pane will simplify the query diagram.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.activequerybuilder.com/blog/content/images/2018/09/many-to-many.png" class="kg-image" alt="Faster visual SQL query building in the upcoming major version!" loading="lazy"><figcaption>Hiding intermediate objects from the query in many-to-many relationships.</figcaption></figure><h3 id="trivial-actions-must-be-trivial">Trivial actions must be trivial</h3><p>Users will be able to define conditions, grouping and sorting right from the Design pane.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://www.activequerybuilder.com/blog/content/images/2018/09/define-cond-from-design-1.png" class="kg-image" alt="Faster visual SQL query building in the upcoming major version!" loading="lazy"><figcaption>Performing actions with query columns right in the design pane</figcaption></figure><p>We hope these improvements will meet your expectations for a convenient query building interface. Please feel free to submit your feedback.</p>]]></content:encoded></item><item><title><![CDATA[Domain Specific Language: define SQL queries via fluent API]]></title><description><![CDATA[New API makes your queries database server-independent and checked against the current database schema on the compilation stage.]]></description><link>https://www.activequerybuilder.com/blog/2018-03-14-domain-specific-language-define-sql-queries-via-fluent-api/</link><guid isPermaLink="false">5b9cf5d7d5a7b639e8522d8d</guid><category><![CDATA[programmatic SQL modification]]></category><category><![CDATA[development]]></category><category><![CDATA[database schema]]></category><category><![CDATA[Active Query Builder]]></category><dc:creator><![CDATA[Sergey Smagin]]></dc:creator><pubDate>Wed, 14 Mar 2018 12:05:00 GMT</pubDate><media:content url="https://www.activequerybuilder.com/blog/content/images/2018/09/fluent_api.png" medium="image"/><content:encoded><![CDATA[<img src="https://www.activequerybuilder.com/blog/content/images/2018/09/fluent_api.png" alt="Domain Specific Language: define SQL queries via fluent API"><p>We are working on the possibility to define SQL queries in a domain-specific language. The API will allow for type-safe SQL construction, database object referencing through the generated database schema classes like the following:</p><pre><code>sql = DSL.query
    .Select(
        Orders.OrderId.As(&quot;id&quot;)
      , SqlExpression.Count(Orders.OrderId)
    )
    .From(Orders)
        .InnerJoin(Customers)
            .On(Orders.OrderId == Customers.CustomerId)
    .Where(Orders.OrderId.Greater(10))
        .And(&quot;1 &lt; 2&quot;)
    .Having(Orders.OrderId.Count().Greater(5))
    .OrderBy(Orders.OrderId)
    .GetSQL;</code></pre><p>So, when the database schema is changed, the programmer can re-generate the code of your database schema classes and get compilation errors in case invalid objects or fields are used in queries defined via DSL API.</p><p>Consider a situation when programmers have to define lots of SQL queries for reports, analytics and similar tasks saved as string resources. Changing the schema may lead to a case when some queries become invalid, and the only way to check for this is to run that report. If they are defined via such DSL API, the programmer will be notified about the problem at compile time.</p><p>Would you be interested in using such API in your projects?</p><p>We&apos;ll be grateful for your feedback.</p>]]></content:encoded></item><item><title><![CDATA[Demo projects are available on GitHub now]]></title><description><![CDATA[All demo projects on GitHub refer to Active Query Builder NuGet packages, so they do not require installation of Active Query Builder to run. ]]></description><link>https://www.activequerybuilder.com/blog/2018-02-22-net-demo-projects-on-github/</link><guid isPermaLink="false">5b9cf450d5a7b639e8522d81</guid><category><![CDATA[evaluation]]></category><category><![CDATA[demo projects]]></category><category><![CDATA[WinForms]]></category><category><![CDATA[WPF]]></category><category><![CDATA[ASP.NET]]></category><category><![CDATA[development]]></category><category><![CDATA[Active Query Builder]]></category><dc:creator><![CDATA[Sergey Smagin]]></dc:creator><pubDate>Thu, 22 Feb 2018 11:59:00 GMT</pubDate><content:encoded><![CDATA[<p>We are glad to announce the immediate availability of demo projects for Active Query Builder .NET - WinForms, WPF and ASP.NET Editions in C# and Visual Basic .NET languages on GitHub!</p><p>All demo projects refer to appropriate <a href="https://www.nuget.org/profiles/activedbsoft">NuGet packages</a>, so they do not require installation of Active Query Builder to run. Just clone a repository on your hard drive, open a solution and build it. The needed Nuget packages will be updated automatically if this allowed in your Visual Studio. You can also do this manually in the IDE.</p><p>The following repositories are available now:</p><p><strong>WinForms Edition:</strong></p><ul><li>C#: <a href="https://github.com/ActiveDbSoft/active-query-builder-3-net-winforms-samples-csharp">active-query-builder-3-net-winforms-samples-csharp</a></li><li>VB.NET: <a href="https://github.com/ActiveDbSoft/active-query-builder-3-net-winforms-samples-vb">active-query-builder-3-net-winforms-samples-vb</a></li></ul><p><strong>WPF Edition:</strong></p><ul><li>C#: <a href="https://github.com/ActiveDbSoft/active-query-builder-3-net-wpf-samples-csharp">active-query-builder-3-net-wpf-samples-csharp</a></li><li>VB.NET: <a href="https://github.com/ActiveDbSoft/active-query-builder-3-net-wpf-samples-vb">active-query-builder-3-net-wpf-samples-vb</a></li></ul><p><strong>ASP.NET Edition:</strong></p><ul><li>C#: <a href="https://github.com/ActiveDbSoft/active-query-builder-3-asp-net-samples-csharp">active-query-builder-3-asp-net-samples-csharp</a></li><li>VB.NET: <a href="https://github.com/ActiveDbSoft/active-query-builder-3-asp-net-samples-vb">active-query-builder-3-asp-net-samples-vb</a></li></ul><p>We hope that this will ease the evaluation of Active Query Builder for .NET and help to improve the demo projects. Feel free to submit your feedback.</p>]]></content:encoded></item><item><title><![CDATA[Using Redis instead of the session-based storage]]></title><description><![CDATA[Active Query Builder is no longer tied to th ASP.NET session mechanism anymore but can store its state in any repository specified by the programmer. This allows for easy load-balancing while using in web farms.]]></description><link>https://www.activequerybuilder.com/blog/2018-02-21-using-redis-state-storage-provider/</link><guid isPermaLink="false">5b9cf08cd5a7b639e8522d7b</guid><category><![CDATA[ASP.NET]]></category><category><![CDATA[development]]></category><category><![CDATA[Active Query Builder]]></category><dc:creator><![CDATA[Sergey Smagin]]></dc:creator><pubDate>Wed, 21 Feb 2018 11:43:00 GMT</pubDate><content:encoded><![CDATA[<p>The previous version was strictly tied to the ASP.NET session mechanism, so it was difficult to use it in web farms with automatic load balancing between servers. The client was able to work only with the server on which its session was started since it contained an instance of the QueryBuilder object for this user. Now, this restriction is in the past.</p><p>The default behaviour of saving the component state within the ASP.NET session remains the same as it&apos;s fast and convenient for simple apps, but now you can change it easily. Have a look how an instance of the QueryBuilder and QueryTransformer object is obtained in the demo projects. The QueryBuilderStore factory uses the SessionStore object under the hood:</p><pre><code>public ActionResult Index()
{
    // Get an instance of the QueryBuilder object
    var qb = QueryBuilderStore.Get();

    if (qb == null) {
        qb = new QueryBuilder();
        
        // initialize new instance here
        InitQueryBuilder(qb);

        QueryBuilderStore.Put(qb)
    }
}</code></pre><p>What you can do now in the <em>Corporate version</em> of Active Query Builder ASP.NET Edition is to replace the storage provider with your implementation of <strong>IQueryBuilderStorageProvider</strong> interface:</p><pre><code>public interface IQueryBuilderStorageProvider
{
    QueryBuilder Get(string id);
    void Put(QueryBuilder qb);
    void Delete(string id);
}</code></pre><p>Then you can replace the default <strong>SessionQueryBuilderProvider</strong> with your own during the application startup:</p><pre><code>public class MvcRazor : HttpApplication
{
    protected void Application_Start()
    {
            /*...*/
            QueryBuilderStore.Provider = new QueryBuilderRedisStoreProvider();
    }
}</code></pre><p>and use the component the same way as you did that before.</p><p>Note: The state of the QueryBuilder object can be serialised and de-serialised using just one <strong>LayoutSQL</strong> property since the version 3.1. All you have to do is to redefine the <strong>Get</strong>, <strong>Put </strong>and <strong>Delete </strong>methods and make one additional step: after de-serializing an instance of the QueryBuilder object, you may need to assign a database connection or pass the pre-loaded content of MetadataContainer to it.</p><p>The following implementation lets store the component&apos;s state in <a href="https://redis.io/">Redis</a>:</p><pre><code>    using StackExchange.Redis;

    public class QueryBuilderRedisStoreProvider : IQueryBuilderProvider
    {
        private readonly IDatabase _db;

        public RedisQueryBuilderProvider()
        {
            var redis = ConnectionMultiplexer.Connect();
            _db = redis.GetDatabase();
        }

        public QueryBuilder Get(string id)
        {
            var layout = _db.StringGet(id);

            var qb = new QueryBuilder(id);

            if (layout.HasValue)
                qb.LayoutSQL = layout;

            return qb;
        }

        public void Put(QueryBuilder qb)
        {
            _db.StringSetAsync(qb.Tag, qb.LayoutSQL);
        }

        public void Delete(string id)
        {
            _db.StringSetAsync(id, &quot;&quot;);
        }
    }</code></pre><p>The new CustomStorage demo project illustrates this functionality by saving the component&apos;s state in a SQLite database.</p>]]></content:encoded></item><item><title><![CDATA[How can we help users build queries more easily?]]></title><description><![CDATA[Can we do anything to help users build SQL queries faster? One of the most important things is to show that data to them, so users can see if the returned data meet their expectations. ]]></description><link>https://www.activequerybuilder.com/blog/2018-01-29-how-can-we-help-users-build-queries-easier/</link><guid isPermaLink="false">5b9cef6cd5a7b639e8522d74</guid><category><![CDATA[Visual query building UI]]></category><category><![CDATA[Active Query Builder]]></category><category><![CDATA[user-friendy environment]]></category><category><![CDATA[Getting Started]]></category><category><![CDATA[development]]></category><dc:creator><![CDATA[Sergey Smagin]]></dc:creator><pubDate>Mon, 29 Jan 2018 11:36:00 GMT</pubDate><content:encoded><![CDATA[<p>What are the most common tasks the users take to get data they need?</p><p>I think that the vast majority of time users spend to build the right conditions to limit the data to the extent they need. Next, grouping and sorting the data.</p><p>Can we do anything to help users build these parts faster? I am sure we can. And the first thing we can do is to show that data to them, so users can see if the data meet their expectations. That&apos;s why we&apos;ve recently put the sub-query data preview grid to all the &quot;Full-featured&quot; demo projects for Active Query Builder for .NET and on <a href="http://aspquerybuilder.net/">the live demo web page</a>. This way users can check the data and correct the query if they see wrong results.</p><p>And the next obvious thing we should do is to let users define conditions, order and grouping in the query right from the sub-query preview grid. For example, they should be able to add the condition for a field by right-clicking on the specific data value: &quot;where [field] &lt;operation&gt; &apos;that value&apos;&quot;.</p><p>It looks like one of the things that might have been implemented long time ago. That&apos;s right, but the next minor version is the right point at which we can add this feature today.</p><p>Do you think we can help users build better queries in some other way? We&apos;ll be damn grateful for your feedback!</p>]]></content:encoded></item><item><title><![CDATA[Our plans for the next major version]]></title><description><![CDATA[Our primary goal is to give the user an opportunity to think about the data he needs to get with the query.]]></description><link>https://www.activequerybuilder.com/blog/2018-01-16-our-plans-for-the-current-year/</link><guid isPermaLink="false">5b9cebe7d5a7b639e8522d6e</guid><category><![CDATA[development]]></category><category><![CDATA[Active Query Builder]]></category><category><![CDATA[Visual query building UI]]></category><category><![CDATA[user-friendy environment]]></category><dc:creator><![CDATA[Sergey Smagin]]></dc:creator><pubDate>Tue, 16 Jan 2018 11:24:00 GMT</pubDate><content:encoded><![CDATA[<p>Dozens of lesser improvements from one minor version to another make the general direction of the component development unclear. On the other side, migrating to new major version requires making changes to the project source code and forms. This burden makes movement to new major versions slow. That&apos;s why many users still use old versions of Active Query Builder. <a href="https://www.activequerybuilder.com/blog/2018-01-12-faster-smarter-sql-query-builder/">In our blog</a>, we tried to summarize the changes that were made in the component compared to the previous major version.</p><p>We understand the weaknesses of our product, and we want to make it better, just like thirteen years ago, when we started work on Active Query Builder.</p><p>Our primary goal is not just to replace the text editor with a graphical interface (although it deserves our close attention) but <strong><strong>to give the user an opportunity to think about the data he needs to get with the query</strong></strong>, not about the nuances of the SQL language.</p><p>So, we have huge plans for the current year.</p><ul><li>First, we want to get rid of the current Query Columns Grid and replace it with the new control which will combine the tree-like criteria builder, the query results data grid and the sub-query result preview.</li><li>Next, we will let undo any change made by the end-user in the user interface.</li><li>Also, we are preparing some API and core improvements which will simplify the design of SQL queries for developers.</li></ul><p>Stay with us for this year, and you&apos;ll be able to surprise your end-users and let them be more productive than before!</p>]]></content:encoded></item><item><title><![CDATA[Query Inconsistency Alerts]]></title><description><![CDATA[The system to notify users about logical errors admitted in the query let users be more competent to write better, standardized queries.]]></description><link>https://www.activequerybuilder.com/blog/2018-01-15-query-inconsistency-alerts/</link><guid isPermaLink="false">5b9cead0d5a7b639e8522d69</guid><category><![CDATA[user-friendy environment]]></category><category><![CDATA[Active Query Builder]]></category><category><![CDATA[Visual query building UI]]></category><dc:creator><![CDATA[Sergey Smagin]]></dc:creator><pubDate>Mon, 15 Jan 2018 11:19:00 GMT</pubDate><content:encoded><![CDATA[<p>At the end of last year, we asked you to tell us about the benefits Active Query Builder gives you. Among the obvious advantages that a visual builder must provide, we found one important, which has not been paid attention to until now.</p><p>One of the important advantages is the standardization of user queries. You wrote that Active Query Builder let users be more competent to write better, standardized queries, and that sounds promising. We&apos;ve realized that in this aspect we can give much more than Active Query Builder can do now, and moved in this direction.</p><p>So, in the new version of Active Query Builder for WinForms and WPF we implemented the <strong><strong>Query Inconsistency Alerts</strong></strong> feature.</p><p>This is the system to notify users about logical errors admitted in the query. In the current version, this system works in a test mode, notifying only one problem: same-named columns in a subquery. However, I am sure you can name a lot of other situations that lead to errors, performance drops, or getting a result different from what the user expects. We will be grateful if you tell us about such situations you face in your work. We will examine each and give users advice how to avoid them. This will reduce the number of requests to your support.</p>]]></content:encoded></item><item><title><![CDATA[Faster, smarter SQL query builder]]></title><description><![CDATA[What advantages does the user get on upgrading Active Query Builder to the third version?]]></description><link>https://www.activequerybuilder.com/blog/2018-01-12-faster-smarter-sql-query-builder/</link><guid isPermaLink="false">5b9ce855d5a7b639e8522d64</guid><category><![CDATA[Visual query building UI]]></category><category><![CDATA[Active Query Builder]]></category><category><![CDATA[user-friendy environment]]></category><dc:creator><![CDATA[Sergey Smagin]]></dc:creator><pubDate>Fri, 12 Jan 2018 11:09:00 GMT</pubDate><media:content url="https://www.activequerybuilder.com/blog/content/images/2018/09/aqbnet-34.png" medium="image"/><content:encoded><![CDATA[<img src="https://www.activequerybuilder.com/blog/content/images/2018/09/aqbnet-34.png" alt="Faster, smarter SQL query builder"><p>Sometimes we get a question from our customers: what do we get on upgrading Active Query Builder to the third version?</p><p>Honestly saying, almost nothing. But your end-users will get a lot! :)</p><p>Most of the core and API improvements have been delayed to the next major version. The component&apos;s user interface has been significantly changed to improve the user experience.</p><p>In this article, we tried to sum up more than four years of the component development.</p><h3 id="means-to-customize-the-user-interface">Means to customize the user interface</h3><ul><li>The visual interface now consists of separate controls. You can combine them the way you like.</li><li>Dockable panels help to keep essential controls at your fingertips without clogging the UI.</li></ul><h3 id="usability">Usability</h3><ul><li>Buttons next to fields involved in foreign key relationships let <strong><strong>add linked objects in a single click</strong></strong>.</li><li>The new properties bar allows <strong><strong>setting the query, link and datasource properties in a handy way</strong></strong>.</li><li>The new Sub-query Navigation Bar lets work with UNION sub-queries and Common Table Expression (sub-queries in the WITH clause) conveniently.</li><li>Search and filtration in fields of datasources on the Design pane helps quickly find the needed field.</li><li>Reusable queries panel allows for organising user queries and using them in other queries just like ordinary database views.</li></ul><h3 id="care">Care</h3><ul><li>New tips help users eliminate common issues in their queries.</li><li>Smart notifications about erroneous SQL expressions the user typed let quickly switch to the place where error origins and correct the mistake.</li></ul><h3 id="speed">Speed</h3><ul><li>Speeded-up database schema tree loads thousands of objects almost instantly.</li><li>Optimized metadata loading process.</li></ul><p>If you have any thoughts about what we can do better in Active Query Builder, please share them in the comments to this article.</p>]]></content:encoded></item></channel></rss>