Evaluating bids

Mongoose Queries & Optimization

Published on the August 20, 2018 in IT & Programming

About this project

Open

We are looking for a database expert to help us doing queries and optimization on a model we have. Optimizations are to connect schemas to other schemas without losing speed and saving resources. Example:

We have this:

'use strict'

var mongoose = require('mongoose');
var schema = mongoose.schema;
var addressSchema = schema({
  country: String,
  administrative_area_level_1: String,
  administrative_area_level_2: String,
  locality: String,
  sublocality: String,
  neighborhood: String,
  postal_code: String,
  route: String,
  street_number: Number,
  premise: String.

  Subpremise: String.
  Coordinates: [Number]
});

module.exports = mongoose.model('Address', addressSchema);




And we want this:

'use strict'

var mongoose = require('mongoose');
var schema = mongoose.schema;
var addressSchema = schema({
  country: String,
  administrative_area_level_1: {type: schema.ObjectId, ref: 'Administrative_Area_Level_1'},
  administrative_area_level_2: {type: schema.ObjectId, ref: 'Administrative_Area_Level_2'},
  locality: {type: schema.ObjectId, ref: 'Locality'},
  sublocality: {type: schema.ObjectId, ref: 'Sublocality'},
  neighborhood: {type: schema.ObjectId, ref: 'Neighborhood'},
  postal_code: {type: schema.ObjectId, ref: 'Postal_Code'},
  route: {type: schema.ObjectId, ref: 'Route'},
  street_number: Number,
  premise: {type: schema.ObjectId, ref: 'Premise'}.
  Subpremise: {type: schema.ObjectId, ref: 'Subpremise'}.

  Coordinates: {type: schema.ObjectId, ref: 'Coordinates'}
});

module.exports = mongoose.model('Address', addressSchema);


We want to pass the key of country to  administrative_area_level_1 and so on.

Category IT & Programming
Subcategory Web development
What is the scope of the project? Medium-sized change
Is this a project or a position? Project
I currently have I have specifications
Required availability As needed
API Integrations Cloud Storage (Dropbox, Google Drive, etc.), Payment Processor (Paypal, Stripe, etc.), Social media (Facebook, Twitter, etc.), Other (Other APIs)
Roles needed Developer

Delivery term: August 27, 2018

Skills needed

Other projects posted by J. G.