diff --git a/src/db-mgr.cpp b/src/db-mgr.cpp
index 1cd0d3a..691299e 100644
--- a/src/db-mgr.cpp
+++ b/src/db-mgr.cpp
@@ -109,13 +109,42 @@
 }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
+// Zone
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+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, -1, &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);
+}
 
 bool
-DbMgr::lookup(Zone& zone)
+DbMgr::find(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);
+  int rc = sqlite3_prepare_v2(m_conn, sql, -1, &stmt, 0);
   if (rc != SQLITE_OK) {
     throw PrepareError(sql);
   }
@@ -136,33 +165,6 @@
 }
 
 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)
@@ -170,7 +172,7 @@
 
   sqlite3_stmt* stmt;
   const char* sql = "DELETE FROM zones where id=?";
-  int rc = sqlite3_prepare_v2(m_conn, sql, strlen(sql), &stmt, 0);
+  int rc = sqlite3_prepare_v2(m_conn, sql, -1, &stmt, 0);
   if (rc != SQLITE_OK) {
     throw PrepareError(sql);
   }
@@ -185,10 +187,155 @@
 
   sqlite3_finalize(stmt);
 
-  zone.setId(0);
-  zone.setTtl(time::seconds(3600));
+  zone = Zone();
 }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Rrset
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+void
+DbMgr::insert(Rrset& rrset)
+{
+  if (rrset.getId() != 0)
+    return;
+
+  if (rrset.getZone() == 0) {
+    throw RrsetError("Rrset has not been assigned to a zone");
+  }
+
+  if (rrset.getZone()->getId() == 0) {
+    insert(*rrset.getZone());
+  }
+
+  const char* sql =
+    "INSERT INTO rrsets (zone_id, label, type, version, ttl, data)"
+    "    VALUES (?, ?, ?, ?, ?, ?)";
+
+  sqlite3_stmt* stmt;
+  int rc = sqlite3_prepare_v2(m_conn, sql, -1, &stmt, 0);
+  if (rc != SQLITE_OK) {
+    throw PrepareError(sql);
+  }
+
+  sqlite3_bind_int64(stmt, 1, rrset.getZone()->getId());
+
+  const Block& label = rrset.getLabel().wireEncode();
+  sqlite3_bind_blob(stmt,  2, label.wire(),              label.size(),              SQLITE_STATIC);
+  sqlite3_bind_blob(stmt,  3, rrset.getType().wire(),    rrset.getType().size(),    SQLITE_STATIC);
+  sqlite3_bind_blob(stmt,  4, rrset.getVersion().wire(), rrset.getVersion().size(), SQLITE_STATIC);
+  sqlite3_bind_int64(stmt, 5, rrset.getTtl().count());
+  sqlite3_bind_blob(stmt,  6, rrset.getData().wire(),    rrset.getData().size(),    SQLITE_STATIC);
+
+  rc = sqlite3_step(stmt);
+  if (rc != SQLITE_DONE) {
+    sqlite3_finalize(stmt);
+    throw ExecuteError(sql);
+  }
+
+  rrset.setId(sqlite3_last_insert_rowid(m_conn));
+  sqlite3_finalize(stmt);
+}
+
+bool
+DbMgr::find(Rrset& rrset)
+{
+  if (rrset.getZone() == 0) {
+    throw RrsetError("Rrset has not been assigned to a zone");
+  }
+
+  if (rrset.getZone()->getId() == 0) {
+    bool isFound = find(*rrset.getZone());
+    if (!isFound) {
+      return false;
+    }
+  }
+
+  sqlite3_stmt* stmt;
+  const char* sql =
+    "SELECT id, ttl, version, data FROM rrsets"
+    "    WHERE zone_id=? and label=? and type=?";
+  int rc = sqlite3_prepare_v2(m_conn, sql, -1, &stmt, 0);
+
+  if (rc != SQLITE_OK) {
+    throw PrepareError(sql);
+  }
+
+  sqlite3_bind_int64(stmt, 1, rrset.getZone()->getId());
+
+  const Block& label = rrset.getLabel().wireEncode();
+  sqlite3_bind_blob(stmt, 2, label.wire(), label.size(), SQLITE_STATIC);
+  sqlite3_bind_blob(stmt, 3, rrset.getType().wire(), rrset.getType().size(), SQLITE_STATIC);
+
+  if (sqlite3_step(stmt) == SQLITE_ROW) {
+    rrset.setId(sqlite3_column_int64(stmt, 0));
+    rrset.setTtl(time::seconds(sqlite3_column_int64(stmt, 1)));
+    rrset.setVersion(Block(static_cast<const uint8_t*>(sqlite3_column_blob(stmt, 2)),
+                           sqlite3_column_bytes(stmt, 2)));
+    rrset.setData(Block(static_cast<const uint8_t*>(sqlite3_column_blob(stmt, 3)),
+                        sqlite3_column_bytes(stmt, 3)));
+  } else {
+    rrset.setId(0);
+  }
+  sqlite3_finalize(stmt);
+
+  return rrset.getId() != 0;
+}
+
+void
+DbMgr::remove(Rrset& rrset)
+{
+  if (rrset.getId() == 0)
+    throw RrsetError("Attempting to remove Rrset that has no assigned id");
+
+  sqlite3_stmt* stmt;
+  const char* sql = "DELETE FROM rrsets WHERE id=?";
+  int rc = sqlite3_prepare_v2(m_conn, sql, -1, &stmt, 0);
+
+  if (rc != SQLITE_OK) {
+    throw PrepareError(sql);
+  }
+
+  sqlite3_bind_int64(stmt, 1, rrset.getId());
+
+  rc = sqlite3_step(stmt);
+  if (rc != SQLITE_DONE) {
+    sqlite3_finalize(stmt);
+    throw ExecuteError(sql);
+  }
+
+  sqlite3_finalize(stmt);
+
+  rrset = Rrset(rrset.getZone());
+}
+
+void
+DbMgr::modify(Rrset& rrset)
+{
+  if (rrset.getId() == 0) {
+    throw RrsetError("Attempting to replace Rrset that has no assigned id");
+  }
+
+  if (rrset.getZone() == 0) {
+    throw RrsetError("Rrset has not been assigned to a zone");
+  }
+
+  sqlite3_stmt* stmt;
+  const char* sql = "UPDATE rrsets SET ttl=?, version=?, data=? WHERE id=?";
+  int rc = sqlite3_prepare_v2(m_conn, sql, -1, &stmt, 0);
+
+  if (rc != SQLITE_OK) {
+    throw PrepareError(sql);
+  }
+
+  sqlite3_bind_int64(stmt, 1, rrset.getTtl().count());
+  sqlite3_bind_blob(stmt,  2, rrset.getVersion().wire(), rrset.getVersion().size(), SQLITE_STATIC);
+  sqlite3_bind_blob(stmt,  3, rrset.getData().wire(),    rrset.getData().size(),    SQLITE_STATIC);
+  sqlite3_bind_int64(stmt, 4, rrset.getId());
+
+  sqlite3_step(stmt);
+  sqlite3_finalize(stmt);
+}
 
 } // namespace ndns
 } // namespace ndn
diff --git a/src/db-mgr.hpp b/src/db-mgr.hpp
index 26041c6..29738be 100644
--- a/src/db-mgr.hpp
+++ b/src/db-mgr.hpp
@@ -22,6 +22,7 @@
 
 #include "config.hpp"
 #include "zone.hpp"
+#include "rrset.hpp"
 
 #include <ndn-cxx/common.hpp>
 #include <sqlite3.h>
@@ -42,6 +43,8 @@
 
 /**
  * @brief Database Manager, which provides some common DB functionalities
+ *
+ * @note Function naming here follows MongoDB
  */
 class DbMgr : noncopyable
 {
@@ -64,7 +67,7 @@
    * @brief constructor
    */
   explicit
-  DbMgr(const std::string& dbFile = DEFAULT_CONFIG_PATH "/" "ndns.conf");
+  DbMgr(const std::string& dbFile = DEFAULT_CONFIG_PATH "/" "ndns.db");
 
   /**
    * @brief destructor
@@ -108,12 +111,22 @@
   DEFINE_ERROR(ZoneError, Error);
 
   /**
+   * @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);
+
+  /**
    * @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);
+  find(Zone& zone);
 
   /**
    * @brief remove the zone
@@ -123,15 +136,44 @@
   void
   remove(Zone& zone);
 
+public: // Rrset manipulation
+  DEFINE_ERROR(RrsetError, Error);
+
   /**
-   * @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
+   * @brief add the rrset
+   * @pre m_rrset.getId() == 0
+   * @post m_rrset.getId() > 0
    */
   void
-  insert(Zone& zone);
+  insert(Rrset& rrset);
+
+  /**
+   * @brief get the data from db according to `m_zone`, `m_label`, `m_type`.
+   *
+   * If record exists, `m_ttl`, `m_version` and `m_data` is set
+   *
+   * @pre m_rrset.getZone().getId() > 0
+   * @post whatever the previous id is,
+   *       m_rrset.getId() > 0 if record exists, otherwise m_rrset.getId() == 0
+   * @return true if the record exist
+   */
+  bool
+  find(Rrset& rrset);
+
+  /**
+   * @brief remove the rrset
+   * @pre m_rrset.getId() > 0
+   * @post m_rrset.getId() == 0
+   */
+  void
+  remove(Rrset& rrset);
+
+  /**
+   * @brief replace ttl, version, and Data with new values
+   * @pre m_rrset.getId() > 0
+   */
+  void
+  modify(Rrset& rrset);
 
 private:
   /**
diff --git a/src/ndns-tlv.hpp b/src/ndns-tlv.hpp
index c81c1a6..7c48920 100644
--- a/src/ndns-tlv.hpp
+++ b/src/ndns-tlv.hpp
@@ -3,18 +3,18 @@
  * Copyright (c) 2014, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
- * See AUTHORS.md for complete list of NdnS authors and contributors.
+ * See AUTHORS.md for complete list of NDNS authors and contributors.
  *
- * NdnS is free software: you can redistribute it and/or modify it under the terms
+ * NDNS is free software: you can redistribute it and/or modify it under the terms
  * of the GNU General Public License as published by the Free Software Foundation,
  * either version 3 of the License, or (at your option) any later version.
  *
- * NdnS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * NDNS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  * PURPOSE.  See the GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License along with
- * NdnS, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ * NDNS, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
 #ifndef NDNS_NDNS_TLV_HPP
