diff --git a/code/common/db/readme.md b/code/common/db/readme.md new file mode 100644 index 00000000..886153b6 --- /dev/null +++ b/code/common/db/readme.md @@ -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) diff --git a/code/common/service/src/main/java/nu/marginalia/service/module/DatabaseModule.java b/code/common/service/src/main/java/nu/marginalia/service/module/DatabaseModule.java index ce88599a..8a51d141 100644 --- a/code/common/service/src/main/java/nu/marginalia/service/module/DatabaseModule.java +++ b/code/common/service/src/main/java/nu/marginalia/service/module/DatabaseModule.java @@ -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; diff --git a/doc/conceptual-overview.svg b/doc/diagram/conceptual-overview.svg similarity index 100% rename from doc/conceptual-overview.svg rename to doc/diagram/conceptual-overview.svg diff --git a/doc/index-service-map.svg b/doc/diagram/index-service-map.svg similarity index 100% rename from doc/index-service-map.svg rename to doc/diagram/index-service-map.svg diff --git a/doc/search-service-map.svg b/doc/diagram/search-service-map.svg similarity index 100% rename from doc/search-service-map.svg rename to doc/diagram/search-service-map.svg diff --git a/doc/sql/er-diagram-domain.png b/doc/sql/er-diagram-domain.png new file mode 100644 index 00000000..d92eba4e Binary files /dev/null and b/doc/sql/er-diagram-domain.png differ diff --git a/doc/sql/er-diagram-url.png b/doc/sql/er-diagram-url.png new file mode 100644 index 00000000..16336b6c Binary files /dev/null and b/doc/sql/er-diagram-url.png differ