Documentation for DB

This commit is contained in:
Viktor Lofgren 2023-03-25 16:14:16 +01:00
parent 2e69179f12
commit c5f4cb34bf
7 changed files with 21 additions and 3 deletions

18
code/common/db/readme.md Normal file
View File

@ -0,0 +1,18 @@
# DB
This module primarily contains SQL files for the URLs database. The most central tables are `EC_DOMAIN`, `EC_URL` and `EC_PAGE_DATA`.
## Central Paths
* [current](src/main/resources/sql/current) - The current database model
* [migrations](src/main/resources/sql/migrations)
## See Also
* [common/service](../service) implements DatabaseModule, which is from where the services get database connections.
## Relation diagrams for EC_DOMAIN and EC_URL
![image](../../../doc/sql/er-diagram-domain.png)
![image](../../../doc/sql/er-diagram-url.png)

View File

@ -21,9 +21,9 @@ import java.util.Properties;
public class DatabaseModule extends AbstractModule {
private static final Logger logger = LoggerFactory.getLogger(DatabaseModule.class);
private static final String DB_USER_KEY="db.user";
private static final String DB_PASS_KEY ="db.pass";
private static final String DB_CONN_KEY ="db.conn";
private static final String DB_USER_KEY = "db.user";
private static final String DB_PASS_KEY = "db.pass";
private static final String DB_CONN_KEY = "db.conn";
private final Properties dbProperties;

View File

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 KiB

BIN
doc/sql/er-diagram-url.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB