This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use BDClientes | |
db.Clientes.save({"_id":187693, | |
"nombre": "Ana Pérez", | |
"dirección" : { "calle" : "C/ Mayor, 12", "ciudad" : "Móstoles", "provincia" : "Madrid","CP" : "28933"}, | |
"telefonos": ["914556677","677445566"], | |
"primer_pedido" : "15/01/2013", | |
"ultimo_pedido" : "27/06/2014"}) | |
db.Clientes.insertOne({"nombre": "Juan Martínez", | |
"dirección" : { "ciudad" : "Madrid", "provincia" : "Madrid"}, | |
"profesión": "profesor"}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Ejercicio 1: Uso básico de las operaciones de CRUD en MongoDB | |
-- Apartado a | |
use BDSuCasa | |
db.getCollectionNames() | |
db.departamentos.drop() | |
db.productos.drop() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"Nombre" : "Albacete", "CA": "Castilla-La Mancha", "Superficie": 14926, "Datos": [ | |
{"Anyo" : 2015, "Valor" : 394928}, | |
{"Anyo" : 2014, "Valor" : 396684}, | |
{"Anyo" : 2013, "Valor" : 399510}, | |
{"Anyo" : 2012, "Valor" : 401590}, | |
{"Anyo" : 2011, "Valor" : 400847}, | |
{"Anyo" : 2010, "Valor" : 399448}, | |
{"Anyo" : 2009, "Valor" : 397881}, | |
{"Anyo" : 2008, "Valor" : 394521}, | |
{"Anyo" : 2007, "Valor" : 389127}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Insertar en la BD REDIS 5 títulos de películas: | |
SET pelicula1 "Maléfica" | |
SET pelicula2 "Frozen" | |
MSET pelicula3 "Aladdin" pelicula4 "El regreso de Mary Poppins" pelicula5 "Dumbo" | |
EXISTS pelicula1 | |
SETNX pelicula2 "Frozen II" | |
-- Devolverá 0, porque existe y no lo puede establecer la clave | |
GET pelicula2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:jpa="http://www.springframework.org/schema/data/jpa" | |
xsi:schemaLocation="http://www.springframework.org/schema/beans | |
http://www.springframework.org/schema/beans/spring-beans.xsd | |
http://www.springframework.org/schema/data/jpa | |
http://www.springframework.org/schema/data/jpa/spring-jpa.xsd"> | |
<jpa:repositories base-package="${es.lanyu.jpa-package}" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package es.lanyu.deportes.evaluador; | |
import java.io.BufferedReader; | |
import java.io.File; | |
import java.io.FileNotFoundException; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.net.HttpURLConnection; | |
import java.net.MalformedURLException; | |
import java.net.ProtocolException; |
NewerOlder