We want to map this table to our java code, we can do so by creating a simple class(bean) that contains the same fields. Our aim is to order this layer to create, modify, delete or search for an entity Using simple java objects rather than dealing with SQL statements and other database related commands. This layer should contain a simple class called Data Transfer Object(DTO) this object is just a simple mapping to the table, every column in the table would be a member variable in the class. We want to create a simple table for users, we may create it using these fields id int This layer instead handles all database related calls and queries inside it. The most benefit from DAL is that it simplifies database access operations through some method calls like insert() and find() rather than making connection and executing some queries The aim of this tutorial is to manage the access of a table in database from separate layer written in java, this layer usually called Data Access Layer (DAL)
0 Comments
Leave a Reply. |