架構¶
Database Schema¶
Example
+----------+ +----------+ +----------+
| table_a | | rel_a_b | | table_b |
+==========+ +==========+ +==========+
| id <------< a_id | +---> id |
+----------+ +----------+ | +----------+
| column 2 | | b_id >--+ | column 2 |
+----------+ +----------+ +----------+
| column 3 | | column 3 |
+----------+ +----------+
現在 schema
+------------+ +----------+ +-------+
| projs | | files | | tags |
+============+ +==========+ +=======+
| id | | id | | id |
+------------+ +----------+ +-------+
| title | | name | | name |
+------------+ +----------+ +-------+
| mod_time | | mod_time |
+------------+ +----------+
| start_time |
+------------+
| time_span |
+------------+
Relations
+----------+ +-----------+
| proj_tag | | proj_file |
+==========+ +===========+
| proj_id | | proj_id |
+----------+ +-----------+
| tag_id | | file_id |
+----------+ +-----------+