# Loading Data

{% hint style="warning" %}
**This is the manual for older MicroStream versions (Version < 5.0).**

**The new documentation (Version >= 5.0) is located at:**

[https://docs.microstream.one/](https://docs.microstream.one/manual)
{% endhint %}

Loading data can be done in two ways, eager and Lazy. The basic, default way of loading is eager loading. This means that all objects of a stored object graph are loaded immediately. This is done during startup of the MicroStream database instance automatically if an already existing database is found.

Contrary to [lazy loading](https://manual.docs.microstream.one/data-store/loading-data/lazy-loading), eager loading has no requirements to your entity model.

To load your data you just need to create an `EmbeddedStorageManager` instance:

```java
EmbeddedStorageManager storage = EmbeddedStorage.start();
```

After that just get the root instance of your object graph from the `StorageManager` by calling `EmbeddedStorageManager.root()` and check for `null` as this indicates a non-existing database

```java
final EmbeddedStorageManager storage = EmbeddedStorage.start();

if(storage.root() == null)
{
    //No existing Database found
}
else
{    
    MyRoot root = (MyRoot) storage.root();          
}
```

{% hint style="info" %}
The full code for the eager loading example is on [GitHub](https://github.com/microstream-one/examples/tree/master/loading).
{% endhint %}
