JDBC

Java Database Connectivity - JDBC (API).

Bir spesifikasiyadir. Interface ler toplusu (qaydalar toplusu) yaradilib. Onun vasitesile db ya connect oluruq.
Bu spesifikasiyaya uygun Driverlar yazilir (MySQL, Oracle ve s.)
Daxilinde Connection, Statement, ResultSet, PreparedStatement(SQL injection qarshisini almaq uchun) interface i var.
Driverlar daxil olunduqdan sonra, her bir driver a username, password gonderilir ki, db ya connect ola bilsin.

DAO - Data Access Object

losely coupling
UserDaoInter = Context.getUserDaoImpl();

Eger sonradan UserDaoImpl deyishse, bashqa class yerine gelse hal hazirda olan classin bundan xeberi olmaycaq. Yeni classlar bir birinen asili olmur.

thightly coupling
UserDaoInter = new UserDaoImpl();

bu zaman classlar arasinda asililiq yaranir.

what is the difference between statement and preparedstatement ?



Popular posts from this blog

Validation for AZ phone numbers with RegEx in Java

Java necə işləyir, kod nədir ?

@Transactional annotation haqqinda. Cascade istifade olunmasi