The data access layer usually takes the form of ORM. This allows you to map tables to objects. It provides a high level of abstraction, so you don't have to worry about raw sql. http://en.wikipedia.org/wiki/Data_access_layer
The data abstraction layer creates an api that makes independent access to the database. Do you use postgres, mysql, sqlite etc. This will allow you to query these databases without worrying about specifics. http://en.wikipedia.org/wiki/Database_abstraction_layer
If you are creating a platform that others can use, and they can choose their database backend, an abstraction layer is required, otherwise I would not worry about that.
Whenever I have questions about the structure of web projects, I always look at the popular MVC structures to see how they deal with these problems. CakePHP, CodeIgniter, Kohana, are great examples of creating extensible object-oriented frameworks. They are an indispensable resource when it comes to such issues.
source share