quartz/content/notes/data-access.md
2022-05-09 19:09:49 +12:00

1021 B

title aliases tags
data-access Data Access, data access
info201

Most infosystems require persistent data. e.g.,

  • save to file
  • save to database Some systems require several persistent data stores. e.g., multiple databases.

There are three main approaches:

How to manage persistent data access

  1. domain objects interact directly with the data store
    • write to file or send sql statements
    • not easy to change
  2. domain objects interact with data store via a mediator
    • either standalone class or implementation of a data access interface
    • data-access-object
    • encapsulates all access to persistent data

JDBC

JDBC is a Framework for working with (SQL) databases in Java. It was designed to be independent of the DBMS you are using. The same java code should work on all SQL DBMSs (just change the driver)