You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -57,6 +59,12 @@ Add tables either from the sidebar or the toolbar and define columns.
57
59
alt="Define tables"
58
60
/>
59
61
62
+
:::info
63
+
64
+
You can create attributes sequentially by pressing enter in the last field.
65
+
66
+
:::
67
+
60
68
### Table Fields
61
69
62
70
You can define the following fields for a column:
@@ -91,17 +99,48 @@ The check constraint will be injected into the SQL output as is.
91
99
92
100
:::
93
101
102
+
94
103
:::info
95
104
96
-
You can create attributes sequentially by pressing enter in the last field.
105
+
To define an attribute as primary key, select the checkbox with a key icon. If you want the attribute to be nullable or not nullable, select the checkbox with a question mark icon.
97
106
98
107
:::
99
108
100
-
:::info
109
+
### More Functions on Tables
101
110
102
-
To define an attribute as primary key, select the checkbox with a key icon. If you want the attribute to be nullable or not nullable, select the checkbox with a question mark icon.
- To increase the width of the table, place the cursor on the right edge of the table and then click and drag to adjust the width.
128
+
129
+
- Also when typing the name of an attribute, if it is too long and takes up more space than previously defined, the width of the table will automatically adjust to fit the new size of the attribute.
- In case you want to quickly find a table in a very large diagram, you can use the search bar located at the top of the tables tab in the left sidebar and then click on the table you want to find. This will open the table's configuration panel where there is a button to center the table in the viewport.
@@ -123,19 +162,29 @@ To create a relationship and define foreign keys, long-press the blue dot on the
123
162
124
163
The gif shows one of three possible notations selectable in the modeler; for each notation, the rendering and some actions may change.
125
164
126
-
<!--If at some point you realize that the keys are flipped you can swap them from the `Relationships` tab. Open the relationship you'd like to edit, click on the more button (three dots) next to the primary and forign columns, and then swap. -->!
127
165
128
166
:::info
129
167
130
168
To delete the relationship, simply double-click on the relationship and select the delete button or delete the auto-generated foreign key from the table.
131
169
132
170
:::
133
171
134
-
:::info
135
172
136
-
To switch between identifying and non-identifying relationships, simply double-click, select the edit icon, or open the child table's configuration panel and modify the primary key attribute. If the foreign key is also part of the primary key, the relationship will be identifying; otherwise, it will be non-identifying.
173
+
If at some point you realize that the keys are flipped you can swap them from the `Relationships` tab. Open the relationship you'd like to edit, click on the more button (three dots) next to the primary and forign columns, and then swap.!
- To define a relationship with a composite primary key, simply drag any of the parent table's primary keys to the child table. This will generate all the necessary foreign keys in the child table.
227
+
228
+
- To delete this type of relationship, simply delete any of the foreign keys generated in the child table, delete the relationship directly, or delete any of the primary keys involved.
- To switch between identifying and non-identifying relationships, simply open the child table's configuration panel and modify the foreign key attribute. If the foreign key is also part of the primary key, the relationship will be identifying; otherwise, it will be non-identifying.
- To define optional or mandatory participation in a relationship, simply edit the child table and modify the foreign key attribute. If the foreign key is nullable, the participation will be optional; otherwise, it will be mandatory.
To create a relationship that uses this concept, you must first create a regular relationship, then go to its configuration panel and select the subtype in the relationship types section.
@@ -173,7 +258,7 @@ When you select it, the relationship's notation will change, and a blue dot will
@@ -189,7 +274,7 @@ In order to model Many to Many relationships you will need to use a join table.
189
274
190
275
A join table is a third table that contains foreign keys to the 2 tables you'd like to connect. Additionally, you can add any other relationship-specific columns to the table. For example:
191
276
192
-
<ThemedImage lightImageSrc={require("./img/light/many-to-many.png").default} darkImageSrc={require("./img/dark/many-to-many.png").default} alt="Pick a database" />
277
+
<ThemedImage lightImageSrc={require("./img/light/many-to-many.png").default} darkImageSrc={require("./img/dark/many-to-many.png").default} alt="Many to Many Relationship" />
Copy file name to clipboardExpand all lines: docs/how-it-works.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
---
2
-
sidebar_position: 8
2
+
sidebar_position: 9
3
3
---
4
4
5
5
# How it works
6
6
7
-
drawDB is a simple ReactJS app. Below is a high-level overview of how things are constructed but generally if you're wondering how something works, the first thing that comes to mind is most probably it.
7
+
drawDB is a simple ReactJS app. Below is a high-level overview of how things are constructed but generally if you're wondering how something works, the first thing that comes to mind is most probably it.
0 commit comments