至于所有数据库交互,我们需要设置数据库连接并提取数据。
As with all database interaction, we need to set up our database connections and get our data out.
在本例中,我们将遵循active Record模式并用能够执行所有数据库操作的类封装数据库行。
In this case, we will follow the Active Record pattern and wrap a database row with a class capable of all database operations. Its code is shown below.
因为我们在协议中没有数据库保证能提交或回滚(参阅步骤12)这一点,所以数据库可以不执行任何写人操作。
It might not perform any write operations, because we haven't gotten to the point in the protocol where the database guarantees being able to commit or rollback (see step 12).
Though we have to have not just the generic program, but the specific data files and databases and so forth.
虽然我们不仅有通用程式,还有特别的数据文档和数据库等等。
应用推荐