Does pure MongoDB use schemas and models like Mongoose?

I’m new on pure MongoDB and I’ve some questions about pure MongoDB.

1. Does pure MongoDB use schemas and models like Mongoose ODM?

If you have used Mongoose ODM, you know that Mongoose ODM uses schemas and models for defining fields with their properties. Like this;

/* Dependencies */ const mongoose = require('mongoose');  /* Define the user schema */ const userSchema = new mongoose.Schema({   name: {     type: String,     required: true   },   lastname: {     type: String,     required: true   } });  /* Define the model */ const User = mongoose.model('User', userSchema); 

Do we need to define schemas and models with their fields?

2. Does pure MongoDB have any validators?

For example, If we have a field in schema; we can define some properties to fields like;

...   name: {     type: String,  // Type built-in validator     required: true // Required built-in validator   },   points: {     type: Number,  // Type built-in validator     min: 0,        // Min (minimum) built-in validator     max: 100       // Max (maximum) built-in validator   },   verified: {     type: Boolean, // Type built-in validator     validate: {    // Custom schema validator       validator: function(v) {         return this.points > 50;       },       message: 'You can not register!'     }   } ... 

Does pure MongoDB support for any validators or we define them while CRUD operations like this;

function createUser(userData, db, callback) {   if( && typeof( == 'string' && userData.username && typeof(userData.lastname) == 'string') { // Validator for object     const collection = db.collection('users');     collection.insertOne({       name:,       lastname: userData.lastname     }, function(err, result) {       if(err) callback(err, null);       console.log('One record writed!');       callback(null, result);     });   } else {     callback(new Error('You must enter name and lastname to register!', null));   } } 

All my questions are about these. Thanks…

Oracle impdp onlu one schema when expdp its use many schemas

I have the following problem and doubt in Oracle … I am trying to import with impdp a save from my database made in which I export several schemes … the problem comes when I try to import into the same database in another scheme completely empty one and only one of those schemes that are in the export (expdp) …. during the import show several errors of creation, of sequences, of data that already exist and of creation of other objects in general. How is this possible if the scheme where I import this empty? the expdp I execute it in the following way:

To export: 

expdp \ "/ as sysdba \" DIRECTORY=logic_bakups DUMPFILE=backup%U.dmp FLASHBACK_TIME=timestamp PARALLEL=5 SCHEMAS=SCH1,SCH2,SCH3,SCH4

To import:

impdp \ "/ as sysdba \" DIRECTORY=imp_logic_backups DUMPFILE=backup%U.dmp PARALLEL=5 REMAP_SCHEMA=SCH3:SCH3_V2 REMAP_TABLESPACE=source_tablespace:target_tablespace_V2

Thank you

MYSQL server 8.0.13 does not show schemas previously created

First, I have a problem in accessing mySQL 8.0.13 using Workbench suddenly where the usual password is not accepted.

I then tried different ways to revive the connection; including using the following ways:

C:\Program Files (x86)\MySQL\mysql-8.0.13-winx64\bin>mysqld –initialize-insecure –console 2019-01-06T13:48:30.472661Z 0 [System] [MY-013169] [Server] C:\Program Files (x86)\MySQL\mysql-8.0.13-winx64\bin\mysqld.exe (mysqld 8.0.13) initializing of server in progress as process 7148 2019-01-06T13:48:30.526721Z 0 [ERROR] [MY-010457] [Server] –initialize specified but the data directory has files in it. Aborting. 2019-01-06T13:48:30.549741Z 0 [ERROR] [MY-013236] [Server] Newly created data directory C:\Program Files (x86)\MySQL\mysql-8.0.13-winx64\data\ is unusable. You can safely remove it. 2019-01-06T13:48:30.566754Z 0 [ERROR] [MY-010119] [Server] Aborting 2019-01-06T13:48:30.575948Z 0 [System] [MY-010910] [Server] C:\Program Files (x86)\MySQL\mysql-8.0.13-winx64\bin\mysqld.exe: Shutdown complete (mysqld 8.0.13) MySQL Community Server – GPL.

Now, even though I have no problem in connecting, the schema just will not show up.

What should I do ?

Another strange thing is that I have used the following :


when an error show up :

ERROR 1045 (28000): Access denied for user ‘ODBC’@’localhost’ (using password: NO)

which really stumped me cos I never created user ODBC. All along I am using root @ localhost

Another strange thing is when I log in using WorkBench, it shows me mysql@localhost and not root@localhost

Please help me out how to make MYSQL server work properly again.

OS : Windows 10