anchor.diff:  -export([monitored_by/1]).
   -export([normalize_dbname/1]).
   -export([validate_dbname/1]).
  +-export([dbname_suffix/1]).
   
   -include_lib("couch/include/couch_db.hrl").
   
  
positive.code: 
  is_systemdb(DbName) when is_list(DbName) ->
      is_systemdb(?l2b(DbName));
  is_systemdb(<<"shards/", _/binary>> = Path) when is_binary(Path) ->
      is_systemdb(normalize_dbname(Path));
  is_systemdb(DbName) when is_binary(DbName) ->
      lists:member(DbName, ?SYSTEM_DATABASES).
  
negative.code: select_lt(V1, V2) when V1 > V2 -> V2;
  select_lt(V1, _V2) -> V1.
  
  -spec normalize_dbname(list() | binary()) -> binary().
  
  normalize_dbname(DbName) when is_list(DbName) ->
      normalize_dbname(list_to_binary(DbName));
  normalize_dbname(DbName) when is_binary(DbName) ->
      case filename:extension(DbName) of
          <<".couch">> ->
              mem3:dbname(filename:rootname(DbName));
          _ ->
              mem3:dbname(DbName)
      end.
  
  -spec dbname_suffix(list() | binary()) -> binary().
  
  dbname_suffix(DbName) ->
      filename:basename(normalize_dbname(DbName)).
  
  
  validate_dbname(DbName) when is_list(DbName) ->
      validate_dbname(?l2b(DbName));
  