The Database Bar is a Dockable Window which allows you to do parametric searches of your component database to find the correct component to insert into your designs.
This option is only available as part of the Pulsonix Database Connection.
Shortcuts
Default Keys: None
Default Keys: View
Command: Database
Locating this option
Available from: View menu > Dockable Windows > Database option
Using the Database Bar
If not already displayed, display the Database Bar by using the Component From Database option from the Insert menu, or Database Bar from the View, Dockable Windows menu.
This Database Bar allows you to search for parts using the information in your database, and acts as the main ‘connection’ point between the database and your Pulsonix system.
The tabs along the bottom of the bar allow concurrent multiple searches to performed and quick and easy switching between alternative sets of search results.
Searching
The upper part of the Database Bar contains the controls you use to specify your search criteria. Along the top are controls that you can use to save and reload your most commonly used searches. Below this are the actual search controls, for choosing the table to look in, and the fields and values you want to search for.
Open : open a previously saved Database Connection Search (.DCS) file.
Save As : save the current set of search criteria as a DCS file. This includes multiple tabs if you are using them and all column configurations modified in the results.
Reset : clear all existing search criteria and search tabs and begin again with a single empty search.
The name of the most recently opened or saved DCS file is shown by Settings and will be reloaded when the application is closed and restarted. If you no longer wish this DCS file to be loaded use the Reset option.
Auto Save : is used to indicate that the current settings should always to be automatically saved to the DCS file (whose name is shown in Settings). If checked, whenever you restart the application, the Database Bar searches and tabs will re-appear just as you left them the last time you used them without having to explicitly use the save or open options. However, if you do not wish to overwrite saved DCS files you should not use the Auto Save option.
Synchronise : use the component currently selected in the design to ‘prime’ the Database Bar with the search that corresponds to the attributes on the component. This allows you to find your way back to the database record for that component, and can be used for example to ‘widen’ the search if you are looking for a similar component. See note about Part Name Field for effective use of this option.
Look In : this dropdown list displays and allows you to select the name of the database table or query that you wish to search. For a table or query to be available in this list it must be defined as visible in the Database Setup dialog.
Search : perform the search using the current criteria. If no search criteria are set up, this is the same as ‘show me everything in this table’.
Search Fields : the upper grid shows the search criteria, the fields and values you want to search on. Use the checkbox in the left most column to tell the program whether to use or ignore the criteria shown on that line of the grid, and the Add and Del buttons to add and delete rows from the grid.
Field : the name of the field to search on.
Operator : the logical operator to use (equals, not equals, contains, and so on).
Value : the value to look for in this field.
Value2 : if operator is “between”, enter the second value here to look for records where field is between Value and Value2.
Add : add a row to the search grid.
Del : delete a row from the search grid.
Clear : clear all rows from the search grid.
Results
The results of the search, that is all the records that match the search criteria you have entered, are shown in the second larger grid. The columns shown for each record are those marked as ‘Show’ in the Database Setup dialog. Each row in the results corresponds to a single record in the database. Depending on your search criteria and the contents of your database, you may see many rows in the results grid, or perhaps none at all if no record matches your criteria.
Clicking in a particular row selects it as the current record, indicated by the arrow in the left most column and the row being highlighted. Where possible, the preview windows will display the Schematic and PCB components for the Pulsonix part that corresponds to the selected record.
Navigating the Results Records
The Record Information Bar, located at the bottom left corner of the results grid, displays the current record number, together with buttons for navigating to the first, the previous, the next and the last record in the grid, which can be used as an alternative to the scroll bar. The current record number can be edited to move directly to a chosen record. Click on the record number, enter a new number, then press the Return key to effect the move.
If, when a search is performed, there are many matching items, to restrict the amount of database access, only a limited number of matching records will be loaded. If more records are available, the message area to the left of the Search button will show the number found as greater than the current known ‘high water mark’, e.g. “Found >500 items”. A quick way of finding the total number of matching records is to click the Last button which will display in the total number of records found.
General mouse wheel scroll and zoom functionality can also be used for scrolling in the Database Bar grids.
Sorting the Results
By default, the resulting records are shown in an order dictated by the database table being queried. If you wish to sort the results by using a particular column you may do so by double-clicking on the appropriate column heading. When the mouse cursor is moved over a column header it changes to a down pointing arrow indicating the grid may be sorted by the column.
Double-clicking a second time on the same column heading will change the sort order from ascending to descending.
Using the Current Record
Add : add the selected component to your design. Click on the row in the results grid for the component you want to add, and the Add button will become available. Once you have clicked Add, move your cursor into the design area and the new component will be ‘attached’ to your cursor in the same way as using the Insert Component option to add directly from the Pulsonix library. It is also possible to add the current component by double-clicking in the results grid or by dragging it directly out of the Database Bar preview window into the design window.
Add to Bin : again, select the required component, then click this button to add one instance of that component to the Component Bin.
Update : if the component currently selected in the design is interchangeable with the selected row in the results, this button allows you to update or ‘refresh’ the attributes on the component with the current values from the database record. A component will be interchangeable if its Pulsonix library part matches the value of the Part Name Field in the selected row.
Setup : this button opens the Database Setup dialog.
Fit Cols : this will resize the columns in the results grid to fit their contents.
Using Hyperlink Fields
Fields in the results grid designated as hyperlinks will be shown underlined and coloured blue. To view the external document simply double-click on the document reference. Alternatively, right click on the field and choose Execute Hyperlink from the popup context menu.
Configuring the Results Columns
Repositioning Columns
By default, the columns in the results grid will be shown in the order the fields are defined in the database. If you wish, you may rearrange the columns to suit your own needs. First select the column you wish to reposition by clicking on its header. The entire column will highlight to show it is selected. Then press and hold down the left mouse button to drag the column to the new desired location. The mouse cursor will change to indicate the column is being dragged and a vertical red line will appear between the grid columns to indicate the position the column will take when dropped. Release the mouse button when the column is at the required position.
Resizing Columns
Columns widths may be automatically sized by using the Fit Cols button mentioned earlier. It is also possible to manually resize the columns by dragging the column header dividers to the desired width. The mouse cursor will change to the resize cursor when over a column header divider to indicate it may be resized.
Adjusting the Height of Headings
It is also possible to change the height of the column headers by dragging the horizontal divider between the row of headers and the first record. This can be useful if you wish to squeeze the column widths but still see the full column headings.
Saving your Column Changes
All column position and size changes are automatically stored for each table used and will be reused the next time you search the table again. All column changes are also stored in a DCS file when it is saved and this can be used to shared the same column configurations between different users. (Note that this is a separate file to the DCC file which is used to store the Database Connection Configuration information defining which database tables and fields are visible to the Database Bar.). Note that if a DCS file has been opened, new searches will use the grid settings it contains in precedence to changes made in other existing search tabs using the same table name.
If at any time you wish to return the grid to its default column layout, right click on the grid and from the popup context menu that is displayed, select the Reset Grid option.
Using a Column Template
Sometimes a database may contain different tables in which the majority of fields are very similar and the requirement is to present these tables in a common format. To facilitate this and avoid the need to individually modify the layout for each table, it is possible to define a ‘Template’ that will define the column layout for all tables being searched. To achieve this, create a New Search tab in the normal way, select and search a table to shown the columns in the results grid where they can be arranged in the required template configuration. Then, change the name of the tab to _Template.
While the template tab is present its column layout will be applied to all search results where at least one of the column headers match. Fields to be shown that are not included in the template will be displayed to the right of those that are. For the template layout to be applied to existing search results the search must be refreshed by clicking the Search button. If the template tab is subsequently deleted, the results grids will once again revert to storing their own individual column layouts.
A template tab may stored in a DCS file like any other tab and will be apply to all search results when the file is loaded.
Previews
When a row in the results grid is selected that corresponds to a part that exists in your Pulsonix libraries, the two preview windows will display where possible the Schematic and PCB components as a further aid to choosing the right component.
It is possible to pan and zoom in the preview windows by using the mouse wheel, but to do so, it is first necessary to set focus to the Database Bar by clicking on its title bar.
Next Symbol
This button cycles through the alternative schematic symbols available for the selected part. It will be disabled is there is only one defined.
Next Rep
This button is only displayed if the selected part is defined with multiple representations and cycles through the alternatives available for that part.
Next Footprint
This button cycles through the alternative PCB footprints available for the selected part. It will be disabled is there is only one defined.
Multiple Search Tabs
The Database Bar will initially display a single tab at the bottom with the same name as the currently selected database table (in addition to the New Search tab). If you only ever want to perform a single database search at any given time you do not need to use these tabs. If however, you wish to perform a second or subsequent search while retaining your previous one, the search tabs will allow you to do so.
Creating an additional new search
This is done by simply clicking on the New Search tab. A new search is initialised with the same criteria as the previously selected search but with an empty results grid. The previous search remains unchanged and can be reselected by clicking on its tab. The criteria for the new tab may be modified, including selecting a different database table if required, and a search performed to populate the new results grid.
Naming a Search Tab
By clicking on a search tab it is possible to edit its name to one of your own choosing. Once the new tab name has been entered, press the Return key to complete the change. By default, a new tab will be given the same name as the currently selected database table or, as each tab has a unique name, an incremental variation of the table name. If a different database table is selected and the tab name incorporates the table name, it will change to match the newly selected table name.
Moving a Search Tab
The order of the search tabs may be modified by pressing and holding down the left mouse button over one of the tabs and dragging it to a new position.
Deleting a Search Tab
The currently selected tab may be deleted by clicking the x button in the set of buttons at the left hand end of the tabs.
Scrolling the Search Tabs
The remainder of the buttons at the left hand end of the tabs are used for scrolling the search tabs when there are more than can be displayed in the current window size.
Splitter Controls
Splitter controls are available in the Database bar to adjust the sizes of the search, results and preview sections. Splitters are the small double arrows that are displayed when you move the mouse between panes within a dialog. These are similar to the splitters you see when using programs such as Excel and when you need to increase or decrease the size of cells or columns.
When docked on the left or right the sections will be arranged vertically, and when docked on the top or bottom the sections will be arranged horizontally to make the best use of available space. These sizes are stored in the registry on program close allowing section sizes to be remembered between sessions.
Splitters are available on the side of the Preview window and above the Results window. When the dialog is resized sufficiently at the right edge, the Preview window will drop to the bottom of the dialog. From here, splitters allow the Results and Preview windows to be resized.
The Database Bar in ‘Change Part’ mode
As well as being using for adding components to your design, the Database Bar is also utilised to search the database for suitable parts by the Change Part and Replace Part options. In this case, the Database Bar is automatically displayed as a ‘popup’ modal dialog, allowing you to search the database for suitable replacement parts at that point. A separate Change Part tab is created so existing searches in the Database Bar are unaffected.
The Add and Add to Bin buttons are replaced with Change and Cancel buttons allowing you, once you have identified an suitable alternative database record, to confirm your selection or alternatively cancel the database search and return to the previous Change/Replace Part dialog.
Related Topics
Libraries - Parts | Database Connection Setup | Database Check