https://github.com/rainu/dbc
Database-Container. Collection implementations that store data into a database.
https://github.com/rainu/dbc
java library
Last synced: 6 months ago
JSON representation
Database-Container. Collection implementations that store data into a database.
- Host: GitHub
- URL: https://github.com/rainu/dbc
- Owner: rainu
- License: mit
- Archived: true
- Created: 2012-12-31T12:55:10.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2014-08-24T17:45:32.000Z (almost 12 years ago)
- Last Synced: 2025-07-10T06:00:03.660Z (12 months ago)
- Topics: java, library
- Language: Java
- Size: 266 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
dbc
===
[EN]
Database-Container. Collection implementations that store data into a database.
License
-------
Database-Container is distributed under the [The MIT License](http://opensource.org/licenses/MIT).
Maven Integration
--------
If you want to add ___Database-Container___ to your maven project, you can add the following dependency in your __pom.xml__:
```xml
de.raysha.lib
dbc
2.0
```
TODO
How to build:
- Install maven (i use version 2)
- go into the project root-directory
-
execute the following command:
mvn clean install
How to use:
Example 1:import de.rainu.lib.dbc.DBMap;
import de.rainu.lib.dbc.beans.ConnectionInfo;
...
ConnectionInfo info = new ConnectionInfo(
"org.h2.Driver", "jdbc:h2:/tmp/dbc", "sa", "");
Map map = new DBMap(info);map.put("key", "value");
...
[DE]
Database-Container.
DBC ist ein Projekt indem die Java-Basis-Collections (Map, List, Set) so implementiert werden, dass sie ihre Daten nicht in den Speicher, sondern in eine Datenbank hinterlegen. Dazu wird die JDBC-Schnittstelle verwendet.
Ziel:
Datenbanklogik hinter der Implementierung "verstecken", sodass man möglichst leicht in einem bestehenden Projekt die Collection-Implementierung austauschen kann.
Prioritäten:
- Schnelligkeit - Sodass die Gesamtperformance eines Projektes nicht ausgebremst wird
Bau-Anleitung:
- Installiere maven (ich benutze Version 2)
- Wechsel in das Projekt-Verzeichnis
-
führe folgendes Kommando aus:
mvn clean install
Benutzung:
Beispiel 1:import de.rainu.lib.dbc.DBMap;
import de.rainu.lib.dbc.beans.ConnectionInfo;
...
ConnectionInfo info = new ConnectionInfo(
"org.h2.Driver", "jdbc:h2:/tmp/dbc", "sa", "");
Map map = new DBMap(info);map.put("key", "value");
...