Why do I get the "Class 'Drupal\Core\Database' not found" error? I am using the following code.

$conn = Database::getConnection();
$conn-&gt;insert('testimonial')-&gt;fields(array('name' =&gt; $form_state-&gt;getValue('name')))-&gt;execute();


I get the following error:


  Class 'Drupal\Core\Database' not found


I am using use Drupal\Core\Database;. What is wrong in my code?

Update: i find using namespaces a problem, like now i want to get row count, if insert was successfull or not. i tried with 

$result-&gt;allowRowCount = TRUE;
if ($result-&gt;rowCount() == 0) { }


and for rowcount i added the name space use Drupal\Core\Database;
i get 


  Cannot use Drupal\Core\Database as Database because the name is already in use in


and if i remove this . i get


  Call to undefined method Drupal\Core\Database\Driver\mysql\Connection::rowCount()


How to use namespaces exactly. like i am assuming if i do 


  use Drupal\Core\Database


then all the classes in that namespace and all the children namespace should get inehrited. Is this right ?
Drupal\Core\Database is the namespace of the class, which is not what the use statement requires. It needs the full-qualified class name, which, for that class, is Drupal\Core\Database\Database.

use Drupal\Core\Database\Database;


That is what Drupal core uses, for example in the DbLog.php file.

namespace Drupal\dblog\Logger;

use Drupal\Component\Utility\Unicode;
use Drupal\Core\Database\Connection;
use Drupal\Core\Database\Database;
use Drupal\Core\Database\DatabaseException;
use Drupal\Core\DependencyInjection\DependencySerializationTrait;
use Drupal\Core\Logger\LogMessageParserInterface;
use Drupal\Core\Logger\RfcLoggerTrait;
use Psr\Log\LoggerInterface;