diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index 369fdfc..a119b9f 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -1760,7 +1760,7 @@ function drupal_is_denied($ip) {
   // won't be denied. However the user asked explicitly not to use the
   // database and also in this case it's quite likely that the user relies
   // on higher performance solutions like a firewall.
-  elseif (class_exists('Database', FALSE)) {
+  elseif (class_exists('Drupal\Core\Database\Database', FALSE)) {
     $denied = (bool)db_query("SELECT 1 FROM {blocked_ips} WHERE ip = :ip", array(':ip' => $ip))->fetchField();
   }
   return $denied;
diff --git a/core/includes/theme.maintenance.inc b/core/includes/theme.maintenance.inc
index 3fd60c9..a2d6870 100644
--- a/core/includes/theme.maintenance.inc
+++ b/core/includes/theme.maintenance.inc
@@ -38,7 +38,7 @@ function _drupal_maintenance_theme() {
     // The bootstrap was not complete. So we are operating in a crippled
     // environment, we need to bootstrap just enough to allow hook invocations
     // to work. See _drupal_log_error().
-    if (!class_exists('Database', FALSE)) {
+    if (!class_exists('Drupal\Core\Database\Database', FALSE)) {
       require_once DRUPAL_ROOT . '/core/includes/database.inc';
     }
 
diff --git a/core/lib/Drupal/Core/Cache/InstallBackend.php b/core/lib/Drupal/Core/Cache/InstallBackend.php
index f332fcc..0861090 100644
--- a/core/lib/Drupal/Core/Cache/InstallBackend.php
+++ b/core/lib/Drupal/Core/Cache/InstallBackend.php
@@ -57,7 +57,7 @@ class InstallBackend extends DatabaseBackend {
    */
   function delete($cid) {
     try {
-      if (class_exists('Database')) {
+      if (class_exists('Drupal\Core\Database\Database')) {
         parent::delete($cid);
       }
     }
@@ -69,7 +69,7 @@ class InstallBackend extends DatabaseBackend {
    */
   function deleteMultiple(array $cids) {
     try {
-      if (class_exists('Database')) {
+      if (class_exists('Drupal\Core\Database\Database')) {
         parent::deleteMultiple($cids);
       }
     }
@@ -81,7 +81,7 @@ class InstallBackend extends DatabaseBackend {
    */
   function deletePrefix($prefix) {
     try {
-      if (class_exists('Database')) {
+      if (class_exists('Drupal\Core\Database\Database')) {
         parent::deletePrefix($prefix);
       }
     }
@@ -90,7 +90,7 @@ class InstallBackend extends DatabaseBackend {
 
   function invalidateTags(array $tags) {
     try {
-      if (class_exists('Database')) {
+      if (class_exists('Drupal\Core\Database\Database')) {
         parent::invalidateTags($tags);
       }
     }
@@ -102,7 +102,7 @@ class InstallBackend extends DatabaseBackend {
    */
   function flush() {
     try {
-      if (class_exists('Database')) {
+      if (class_exists('Drupal\Core\Database\Database')) {
         parent::flush();
       }
     }
