KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Color coordinated structures
PRODUCT: 4D | VERSION: | PLATFORM:
Published On: May 1, 1998

4D structures can be difficult to interpret. Relations often cross behind tables or are lost in a tangle of other lines. By color coding each table, foreign key, and the relation connecting them, structures become much easier to read. First, go to the "Design Environment" tab in Database Properties, and select the radio button called Color Background. This changes the use of color from just the table name, to the entire graphical object that represents the table. By default, 4D uses a two-tone scheme, inserting a complementary color (white is the complement of black) in the area of the table name, instead of the color that was selected from the "Color" tab. To force 4D to use the same color for both areas, it is possible to pick a starting color that is its own complement. Using the 256 color palette, select a color from the bottom half of the color palette (128-255), that is exactly seven squares from the left edge. These eight choices are red, orange, yellow, green, light blue, dark blue, purple and gray. Apply any of these eight colors to the ONE table in a relationship. Then apply the exact same color to any relational arrows pointing to that table. Follow each of these relations back to the corresponding MANY table, and change the color of the field (only the field, not the entire table) where the relation originates. The source of a relation is also called a foreign key. This technique makes relations visually obvious and graphically presents the relational structure of the database.