Giter Club home page Giter Club logo

sql_nosql's Introduction

sql_nosql

Issues to learn basic sql NoSql

sql_nosql's People

Contributors

baevpetr avatar gitavk avatar

Watchers

 avatar  avatar

Forkers

battyone

sql_nosql's Issues

3 Base select

Create sql selects to:

  • get records person + phones + address
  • get top 10 most younger person
  • get top 10 most old person
  • get most younger person per city
  • get mean age per city

1 DataBase initial script

In the postgreSQL
Create user role with password to connect to the database;
Create data base with owner the created user;

Use the database user create in the new data base tables to store data about:

  • persons (Name, SecondName, born date, city born)
  • person phone (number, type (mobile, work etc.)) many to one to person
  • person address (Address, city, type (home, work, summerhouse)) many to one to person

4 Create city type

Create new column in the address table city_type.
Apply the categories of the cities by people lives in : 10 and more percentages of all is megalopolis, less than 5 percentages - village, other way city.

7 Base select NoSQL

Create select from the mongo:

  • Get the biggest megalopolis.
  • Get the list of persons living in the smallest village.

6 Update age

Update the age of the persons so, the younger man living in the village should be 20 years old, and the oldest man in the megalopolis should be 60 years. ( change only year)

Synchronize the values with mongo db, only for updated values.

2. initial data

MongoDB.
Generate random (possible to use py Faker) list of persons with list of the phones and address.
Push it to the mongoDB (use docker image or other solution), use database name traindb and collection name persons. Each person should have at least one address home.

links:
py Faker
MOngo doc
Docker mongo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.