3 tier - What is the difference between Database Abstraction Layer & Data Access Layer? -


I'm actually stuck in a 3-level structure I surf the Internet and two terminology "Database Abstraction Layer" & amp; ; "Data Access Layer"

What are the differences between the two?

I understand that the data access layer does not actually compile the database, rather the database operation and The query makes building easier. For example, data access layers typically have APIs similar to SQL syntax, which still require knowledge of the structure of the database to write:

  $ user-> Select ('name, email, date joy') - & gt; Where ('rank & gt; 0') - & gt; Boundary (10); Data abstraction layers are generally full blown ORM (object-relational mappers) which in principle suppress the need to understand any underlying database structure or understand any knowledge of SQL. Syntax can be something like this:  
  factory :: search ('user', 10) - & gt; Filter ('rank & gt; 0');  

And all items can be fully populated from all areas, possibly by connecting with any parent or child objects if you set it this way.

However, this intangible comes with a price. I personally find the theory like ORM or are motivated to be unnecessary and incompetent. In most cases a simple data access layer will be cured, manual Whatever specifically needs to be done with SQL, some syntax for Chinese instead of destroying the display of your application. This area is a very hot debate, so I will not go into it now.

If you mean the data base an abstract layer, then it will be something on the pattern of the PDO, so that your code can be used for a large number of database vendors PDO Works with MySQL, PostgreSQL, and MySqli, I believe.


Comments