diff --git a/src/db/db-mgr.cpp b/src/db-mgr.cpp
similarity index 62%
rename from src/db/db-mgr.cpp
rename to src/db-mgr.cpp
index 27d7db4..1cd0d3a 100644
--- a/src/db/db-mgr.cpp
+++ b/src/db-mgr.cpp
@@ -18,7 +18,7 @@
  */
 
 #include "db-mgr.hpp"
-#include "../logger.hpp"
+#include "logger.hpp"
 
 #include <boost/algorithm/string/predicate.hpp>
 
@@ -108,5 +108,87 @@
   m_status = DB_CLOSED;
 }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+bool
+DbMgr::lookup(Zone& zone)
+{
+  sqlite3_stmt* stmt;
+  const char* sql = "SELECT id, ttl FROM zones WHERE name=?";
+  int rc = sqlite3_prepare_v2(m_conn, sql, strlen(sql), &stmt, 0);
+  if (rc != SQLITE_OK) {
+    throw PrepareError(sql);
+  }
+
+  const Block& zoneName = zone.getName().wireEncode();
+  sqlite3_bind_blob(stmt, 1, zoneName.wire(), zoneName.size(), SQLITE_STATIC);
+
+  if (sqlite3_step(stmt) == SQLITE_ROW) {
+    zone.setId(sqlite3_column_int64(stmt, 0));
+    zone.setTtl(time::seconds(sqlite3_column_int(stmt, 1)));
+  } else {
+    zone.setId(0);
+  }
+
+  sqlite3_finalize(stmt);
+
+  return zone.getId() != 0;
+}
+
+void
+DbMgr::insert(Zone& zone)
+{
+  if (zone.getId() > 0)
+    return;
+
+  sqlite3_stmt* stmt;
+  const char* sql = "INSERT INTO zones (name, ttl) VALUES (?, ?)";
+  int rc = sqlite3_prepare_v2(m_conn, sql, strlen(sql), &stmt, 0);
+  if (rc != SQLITE_OK) {
+    throw PrepareError(sql);
+  }
+
+  const Block& zoneName = zone.getName().wireEncode();
+  sqlite3_bind_blob(stmt, 1, zoneName.wire(), zoneName.size(), SQLITE_STATIC);
+  sqlite3_bind_int(stmt,  2, zone.getTtl().count());
+
+  rc = sqlite3_step(stmt);
+  if (rc != SQLITE_DONE) {
+    sqlite3_finalize(stmt);
+    throw ExecuteError(sql);
+  }
+
+  zone.setId(sqlite3_last_insert_rowid(m_conn));
+  sqlite3_finalize(stmt);
+}
+
+void
+DbMgr::remove(Zone& zone)
+{
+  if (zone.getId() == 0)
+    return;
+
+  sqlite3_stmt* stmt;
+  const char* sql = "DELETE FROM zones where id=?";
+  int rc = sqlite3_prepare_v2(m_conn, sql, strlen(sql), &stmt, 0);
+  if (rc != SQLITE_OK) {
+    throw PrepareError(sql);
+  }
+
+  sqlite3_bind_int64(stmt, 1, zone.getId());
+
+  rc = sqlite3_step(stmt);
+  if (rc != SQLITE_DONE) {
+    sqlite3_finalize(stmt);
+    throw ExecuteError(sql);
+  }
+
+  sqlite3_finalize(stmt);
+
+  zone.setId(0);
+  zone.setTtl(time::seconds(3600));
+}
+
+
 } // namespace ndns
 } // namespace ndn
diff --git a/src/db/db-mgr.hpp b/src/db-mgr.hpp
similarity index 64%
rename from src/db/db-mgr.hpp
rename to src/db-mgr.hpp
index 6c5eafd..26041c6 100644
--- a/src/db/db-mgr.hpp
+++ b/src/db-mgr.hpp
@@ -17,10 +17,11 @@
  * NDNS, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef NDNS_DB_DB_MGR_HPP
-#define NDNS_DB_DB_MGR_HPP
+#ifndef NDNS_DB_MGR_HPP
+#define NDNS_DB_MGR_HPP
 
 #include "config.hpp"
+#include "zone.hpp"
 
 #include <ndn-cxx/common.hpp>
 #include <sqlite3.h>
@@ -28,6 +29,17 @@
 namespace ndn {
 namespace ndns {
 
+#define DEFINE_ERROR(Name, Base)                \
+class Name : public Base                        \
+{                                               \
+ public:                                        \
+  explicit                                      \
+  Name(const std::string& what)                 \
+    : Base(what)                                \
+  {                                             \
+  }                                             \
+};
+
 /**
  * @brief Database Manager, which provides some common DB functionalities
  */
@@ -43,6 +55,10 @@
     DB_ERROR
   };
 
+  DEFINE_ERROR(Error, std::runtime_error);
+  DEFINE_ERROR(PrepareError, Error);
+  DEFINE_ERROR(ExecuteError, Error);
+
 public:
   /**
    * @brief constructor
@@ -88,6 +104,35 @@
     return m_status;
   }
 
+public: // Zone manipulation
+  DEFINE_ERROR(ZoneError, Error);
+
+  /**
+   * @brief lookup the zone by name, fill the m_id and m_ttl
+   * @post whatever the previous id is
+   * @return true if the record exist
+   */
+  bool
+  lookup(Zone& zone);
+
+  /**
+   * @brief remove the zone
+   * @pre m_zone.getId() > 0
+   * @post m_zone.getId() == 0
+   */
+  void
+  remove(Zone& zone);
+
+  /**
+   * @brief insert the m_zone to the database, and set the zone's id.
+   * If the zone is already in the db, handle the exception without leaving it to upper level,
+   * meanwhile, set the zone's id too.
+   * @pre m_zone.getId() == 0
+   * @post m_zone.getId() > 0
+   */
+  void
+  insert(Zone& zone);
+
 private:
   /**
    * @brief set error message
@@ -121,4 +166,4 @@
 } // namespace ndns
 } // namespace ndn
 
-#endif // NDNS_DB_DB_MGR_HPP
+#endif // NDNS_DB_MGR_HPP
