- How to add identifiers to association types ?
To add identifiers to association types via the [New/Group] menu :
Solution : You must select the attributes and/or roles of the association types which shall participate to the identifier, then click on the [New/Group] menu and select the “Identifier” function in the group’s property box (or simply click on the “Identifier” button on the standard toolbar). If this menu (or button) is grayed out, the selected objects cannot form an identifier group of the association types.
- How to create hybrid identifiers ?
There are commands to create an hybrid identifier (containing attributes and roles).
Solution : In the LIBRARY schema (ABOUT dialog box, button [Demo project]), to create the hybrid identifier of COPY (of.BOOK, Copy-No), first select role [0-N] played by entity-type BOOK in relationship-type of and attribute Copy-No of COPY. After that, click on ID button in the standard toolbar to create the hybrid identifier.
- How to create a nonstandard attribute for the generation of database creation scripts ?
For example, if you want to create TEXT attributes (that is to say attributes that will have the TEXT type in a relational database), you can do it like this :
Solution : To remedy to this type of problem, we set up a mechanism allowing generators ([File/Generate] menu) to take into account the physical types specific to a language (in our case, type TEXT). This mechanism consists in the updating of the user property “physType” (“User prop.” tab from the property box). The value set in this property will be taken into account for the generation (only if it exists, otherwise you take Rever DB-Main’s own type). This feature is available since version 9.1.1 of Rever DB-Main.
- How to create a user defined domain (and subdomains) ?
If you try to add a user defined domain to a project : how can it be decomposed while containing subdomains ?
Solution : When you create your primary domain using the dialog box ([Product / User domain …] menu, [New] or [Modify] buttons), you have two buttons [First dom.] and [Next dom.]. The [Next dom.] button creates a user domain of the same level. On the other hand, the [First dom.] button creates a subdomain of the current domain. You can thus create decomposable user domains.
- How to ask the user to enter data during execution of a Java plugin in Rever DB-Main ?
The DBMConsole class allows to capture the output stream, but not to enter data. Here’s how to remedy this :
Solution : You can use the following code to display a dialog box to enter data. The use of this box is simple. You give it the title, the question asked, the type of icon that you want to see appear and it returns the answer in a string.
Example : String response = JOptionPane.showInputDialog(null,
"What is your name?",
"Enter your name",
- How to give a multiple cardinality [N,N] to an association type ?
This possibility does not exist in the choice of the “cardinality” line from the property box. Indeed, Rever DB-Main does not accept N-N cardinality for a role as it considers that it is impossible to verify this constraint in a database. This would mean that each instance of a table playing a N-N role should have mandatory countless links with another table.
Solution : To create an association many-to-many [N-N], just give the 0-N cardinality to both roles.
- How to rename two or more relations with the same name ?
For example, if you want to rename a relationship type using the same name : province has district – district has village. But you can’t write ‘has’ the second time :
Solution : In Rever DB-Main, the relationship types (like entity types) must have a unique name in a schema. But you can use the pipe (‘|’) at the end of the names to ensure the unicity. You can rename relations ‘has|1’ between ‘province’ and ‘district’ and ‘has|2’ between ‘district’ and ‘village’. On the screen, you’ll see twice ‘has’. The pipe and characters after will not be displayed.
- How to rearrange the attributes of my entities or associations ?
If you want to move up/down an attribute in an entity type or association type.
Solution : To reorder your attributes in an entity type or association type, simply select the attribute and press the up arrow key (or down) of the keypad while simultaneously holding down the ALT key. Your attribute will then move up (or down).
- How to represent reflexive associations ?
Here’s how you go about creating a reflexive association type in a graphic view.
Solution : You must first create an association type ([New/Rel type] menu). Click where you want to create it. Press ESC to stop the “graphic design” mode. Then go to the [New/Role/Rel-type/Link] menu to create both roles. Click the association type, hold the button and release it on the entity concerned. Repeat the same operation for the second role. Press ESC to stop the “graphic design” mode. You now have a reflexive association type.
- How to represent a weak entity in Rever DB-Main ?
In order to represent an entity whose identifier is related to another entity :
Solution : It is possible to represent a weak entity type in Rever DB-Main. For example, run Rever DB-Main and, in the About dialog box, click the Library (demo project) button. Open the LIBRARY/Conceptual schema by double-clicking it. In this schema, you see that the identifier of the entity type COPY comprises its Copy-No attribute and the distant role 0-N played by BOOK in association type of. In the case of COPY, we speak of weak entity.
To create an identifier of a weak entity type, be sure to select the role of the strong entity and not the one played by the weak entity in the relationship between them. For your information, a role is the object that has a cardinality, which is the link between two entity types. Generally (in the case of binary association between two entity types), there are two roles (cardinalities) on a link. The cardinality of a role is the minimum and maximum number of times an instance of an entity type can be connected to the instances of the related entity types. In a schema Entity/Association, it may be 1-1, 0-N, 1-N, 4-5 (provided that the minimum cardinality is less than or equal to the maximum cardinality). In an UML class diagram, it will be 1, *, 1-*, 4-5.
- Impossible to create attributes (grayed out in New menu) ?
To create an attribute, it is necessary that the object for which you want to create it (entity type, association type or compound attribute) is selected.
Solution : You must select an entity type, an association type or compound attribute and go to the [New/Attribute/First Att…] menu. If the [Attribute] menu is grayed out, it means that you are not in the correct view to see the created attributes (for example, the compact view). If you select the “View/Graph. standard” menu, you will see all the attributes that you have already created. Rever DB-Main has multiple views (textual or graphic) that can work on all schema types. The default view of a schema is the standard graphical view.
- Does Rever DB-Main support ascending and descending legacy ?
The descending and ascending legacy is not implemented in Rever DB-Main.
Solution : You must achieve the transformation manually or write a Java module that will perform this transformation.
- The graphical toolbar is invisible ?
The toolbar is closed.
Solution : Access this toolbar through Window/Graphical tools.
The toolbar is open but has been moved beyond the limits of the screen./p>
Solution : Increase the resolution of the screen to show the bar or edit the db_main.ini configuration file (“Windows” directory in version 8 and lower, “\Documents and Settings\xxx\Application Data\DB-Main” directory in version 9 and higher). In version 8 and lower, in [TOOL_POS], set GRAPH_X to 0 (GRAPH_X=0) and GRAPH_Y to 0 (GRAPH_Y=0). In version 9 or higher, in [Perspectives], set Layout to nothing (Layout=).
- The configuration parameters do not work
When you change the value of a parameter you must click the change button before you close the dialog box or the changes will not be saved.
Exit and restart Rever DB-Main (some parameters are read at startup).
Examine the contents of db_main.ini file (“Windows” directory in version 8 or lower, “Documents and Settings\xxx\Application Data\DB-Main” directory in version 9 or higher). This file records the current parameters.