An open API service indexing awesome lists of open source software.

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.

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");
...