Almost all PHP applications connect to databases and PHP has its own database abstraction layer – PDO. Frameworks usually have other layers of database abstraction, that often work with PDO. But after all what is an ORM? What is a DBAL? Why is Doctrine one of the most popular libraries of PHP developers today? What are it’s competitors? We will try to answer all these questions and while explaining how to use Doctrine in your project. Showing both cases using a framework or via pure PHP.