Data Access Layer Documentation

Code documentation is a one from the most effective criteria makes code maintainable and usable. Change management board is relaying on such document also to find out which places the change will affect.

One of the important areas to cover in code documentation is “Data Access Layer”. For me, it should tell me a lot of information:

  • Which tables, stored procedures and DB functions the data access function hits?
  • Which columns from which tables the function retrieves (in case of selection)?
  • What are the conditions filters the data? In addition to grouping and sorting conditions?
  • Information about the connection and transaction.

Sometimes, I use this template for each data access layer function:

Function Name

Database objects

  • Table names
  • Stored procedures
  • Functions

Main operations

  • Table (add/update/remove)

Where conditions

  • Conditions

Group by conditions

  • Conditions

Having conditions

  • Conditions

External Usage

  • functions or modules using this function

 

Using documentation like this, the database administrator can tune the database by creating proper indexes. The requirement change board can decide changes either in database side or application side. In addition to: helping the data access layer functions users and helping developers trying to maintain the code in the future.

Advertisements

One Response to Data Access Layer Documentation

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: