Developers

Speedment is a tool that analyzes an existing SQL database and creates a Java representation of the data model. Instead of writing SQL, the data can be queried using standard Java 8 Streams.

Query Using Streams

// Searches are optimized in the background!
Optional longFilm = films.stream()
    .filter(Film.LENGTH.greaterThan(120))
    .findAny();

Results in the following SQL query:

SELECT `film_id`,`title`,`description`,`release_year`,
  `language_id`,`original_language_id`,`rental_duration`,`rental_rate`,
  `length`,`replacement_cost`,`rating`,`special_features`,
  `last_update` 
FROM `sakila`.`film
WHERE `length` > 120;
SQL Java 8 Stream Equivalent
FROM stream()
SELECT map()
WHERE filter() (before collecting)
HAVING filter() (after collecting)
JOIN flatMap()
DISTINCT distinct()
UNION concat().distinct()
ORDER BY sorted()
OFFSET skip()
LIMIT limit()
GROUP BY collect(groupingBy())
COUNT count()

You can try it out yourself using the Initializer on this site.

Supported Databases

Speedment Community Edition: MySQL, MariaDB and PostgreSQL.
Speedment Enterprise Edition: Oracle, SQL Server, DB2, AS400 and all of the open source databases above.

In-Memory Acceleration

In addition to the Stream API, Speedment has an Enterprise Datastore with in-memory optimization.
By simply adding a single line of Java code to the configuration, queries that would normally take several seconds can be resolved in milliseconds.
The Datastore is designed from the bottom up to leverage the power of the Java 8 Streams.

You can try out the Speedment Enterprise Datastore for free here.

Documentation

You can read the online Speedment User’s Guide here!

Tutorials

The tutorials are divided into three sections. The basics are covered in the first section without any expected prior knowledge of Speedment. This builds a foundation of knowledge needed to fully benefit from the following tutorials.

Basics
Sample applications
Extending Speedment

Contribute

The Speedment Open Source project is available under the Apache 2 License! If you want to contribute to the project, file an issue or simply browse the source code, visit our GitHub page!