-
Notifications
You must be signed in to change notification settings - Fork 26
Create MongoDB #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Create MongoDB #39
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| MONGO DB | ||
|
|
||
| BASES : | ||
|
|
||
| * Permite guardar documentos en formato JSON. | ||
| * Tiene esquema flexible (osea que podemos cambiar la estructura de nuestros documentos sin problema) | ||
| * MongoDB está preparado para escalar fácilmente de manera horizontal | ||
| <agregar una imagen> | ||
|
|
||
| Cuando podria usar Bases de datos? | ||
Gaunacamila marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| *Cuando mi aplicacion tiene un crecimiento muy rapido. | ||
| *Cuando mi aplicacion va a tener servidores en la nube. | ||
| *cuando quiero montar una base de datos lo mas rapido posible. | ||
|
|
||
| Mongo server : | ||
|
|
||
| <crear o insertar imagen de estructura> | ||
|
|
||
| Los documentos se representan por pares de CLAVE (nombre del campo) y VALOR (valor del campo). | ||
| -Los nombres de los campos siempre son cadenas de textos | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Diría, nombres de las claves. |
||
| -Los valores pueden ser : String ,Number , Array ,BOolean etc. | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Objeto, o documento, es otro tipo de dato importante a mostrar.
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. También ObjectId |
||
|
|
||
| Configurar el ambiente de MongoDB : | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Vamos a usar una solución en la "nube", como Atlas o Heroku. Así que no haría falta la config local por ahora |
||
|
|
||
| *MongoDB necesita que le configuremos un directorio donde guardar todos los datos | ||
|
|
||
| *Por defecto MongoDB utiliza la carpeta \data\db de donde se levanta el servidor | ||
|
|
||
| *Vamos a crear esta carpeta para configurar los datos ( en resumen , creamos un directorio /data y un subdirectorio /bd) | ||
|
|
||
| *En esta carpeta vamos a almacenar toda la informacion que guardemos en mongoDB | ||
|
|
||
| pds: Es importante hacer estos pasos, sino explota todo y no va a funcionar nada :) . | ||
|
|
||
| Levantar una instancia de mongod : | ||
|
|
||
| *Para poder levantar el servidor de MongoDB tenemos que correr el siguiente script según el sistema operativo que tengamos. | ||
|
|
||
| En windows por ejemplo es | ||
| mongod.exe | ||
|
|
||
|
|
||
|
|
||
|
|
||
| Crear un documento : | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Qué significaría escalar de manera horizontal? cómo se diferencia de otras bases de datoss?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exacto !
También no quiero meter información irrelevante