GithubHelp home page GithubHelp logo

class7-database-module-week8's Introduction

Class7-Database-Module-Week8

1. Entity Relationship Diagram - Company

Your task is to design and describe the database of a company.

  • You are working in a IT company where multiple small teams deliver one product each. Every member of a team have a responsibilitiy (title) such as product owner, backend developer, frontend developer, data engineer etc. Also each product is being developed for a different customer, and these customers are serving within different domains. Your task is to design and create a database where you can handle (store and retrieve) all these information.

Your tasks:

  • Choose your entities, write down their attributes.

  • Create tables for these entities according to normalization rules.

  • Explain the relationships between entities.

  • Create an entity relationship diagram where you display all these information graphically.

Below is an example ERD. Try to come up with a similar end result. Good luck!

erd-sample

2. Import ERD

  • Import the company ERD created in exercise 1 to pgAdmin

3. Import Pagila DB with data

4. Connect to DB with Python

  • Now, connect to this imported Pagila database from python code.
  • Select all rows from actor table
  • Select first row of category table
  • Select first 50 rows of address table

Do the above operations inside python code. (Use fetchOne(), fetchMany(), fetchAll() etc.)

5. Create DB with Python

  • Create an empty database named PyCoders from your pgAdmin
  • Create a file named exercise5.py: this file will connect to PyCoders database
  • After connecting to database:
    • Create a table with name students
      • This table will have student_id and name columns
    • Create a table with name teachers
      • This table will have teacher_id and name columns
    • Now add 3 records for both of these databases.
  • You should do all of these inside the python code.
  • After doing these, run SELECT queries to get all data from both tables. Print these outputs.

Hackerrank Questions

class7-database-module-week8's People

Contributors

irfankaradeniz avatar shatha6 avatar

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.