Prepare the Insert SQL Data Management Statements

Assignment Help Database Management System
Reference no: EM132408789

Project: Tools rental store

Section A – Setup Python for database connection

Project overview

The project includes three phases:

Phase #1: Database conceptual design

Submission: ERD diagram with entities and relationships between them. ERD diagram can be prepared in draw.io, for example.

Entity: entity name, attributes and their types, constraints such as primary and foreign keys should be indicated with PK and FK.

Relationships: each relationship should indicate cardinality and optionality in crow foot notation.

o Phase #2: Database creation, which includes

o Database creation

o Table creation

o Table population

o Data management: Queries (select), Insert, Delete

Submission: Text files with extension *.sql with SQL statements

o Phase #3: Python program to manage database

Submission: Python script, test plan, demo

Phase #1 - Database conceptual design

Data requirements

The following data has to be managed for the tool rental store: customer information, tools information, rental information. This will require 5 tables

2. List of relations, including attributes and data type, constraints (such as FK, PK), relationships – cardinality and optionality in Crow foot notation.

Phase #2 - Setting up database

Database creation

Database

Database name: You can select a name for your tool rental store or call it “tool_store_MN”.

Tables

Setup all required tables using SQL statements written to one or more text file(s). Use .sql extension to save files. Use the psql input feature (\i file) to setup the database in PostgreSQL.

Set up all tables.

Populate all tables with a minimum of 8 tuples per table.

Prepare the following SQL queries to:

o Display all customer information.

o Display all tools information, including jobs (sorted by tool_name and jobs).

o Display all tools for a given job.

o Display all rentals, including: customer first and last name, tool_name, rental date, rental return date.

o Display all rentals for a given customer.

o Display a rental for a given customer and given tool.

o Display all overdue rentals.

Prepare the following SQL data management statements: insert, delete:

o Insert a tool rental based on: tool ID, customer ID, rental date (use SQL current_date function) and return date (based on rental days added to current date:

current_date + rental_days).

o Delete a tool rental based on tool ID and customer ID.

Phase #3 – Create Python script

New concepts: Database connection

You will need to install a driver to connect from Python program to the database

In Python script

o Import the driver

Import the driver into your python program with: import psycopg2

o Create the database connection

Program requirements

#1. Menu-driven

The program displays a main menu with the following menu options:

1. Queries (sub-menu)

2. Insert tool rental

3. Delete tool rental

x.Exit

If the first option is selected a submenu is displayed with the following query options:

1. Display all customers

2. Display all tools (optionally by job)

3. Display all rentals (optionally by customer)

4. Display all overdue rentals

The program runs until the user selects the exit option ‘x’.

Attachment:- Project Details.rar

Reference no: EM132408789

Questions Cloud

Fixed rate loan and an adjustable rate mortgage : Ron and Linda are shopping for a mortgage. They are considering between a fixed rate loan and an adjustable rate mortgage (ARM).
Compute the cost of capital of the stock to firm : The dividend rate is 12%, and the par value of the stock is $100. Compute the cost of capital of the stock to your firm. Show all work.
Impact of convergence of public-private sector security : Assess the impact of the convergence of public and private sector security in the post-9/11 world. How is it being accomplished?
What is the value of holdings : What is the value of your holdings after a 17% stock dividend if the stock price per share remains unchanged?
Prepare the Insert SQL Data Management Statements : List of relations, including attributes and data type, constraints (such as FK, PK), relationships – cardinality and optionality in Crow foot notation.
PPT on Internet of Things Solution for Air quality manager : Northeastern University College of Professional Studies, US-Create a powerpoint presentation with audio on Internet of Things Solution for Air quality manager.
Analyze the connection between businesses and society : Illustrate the concept and application of social responsibility. Analyze the connection between businesses and society.
What is the maximum cash price per share : XYZ has 5 million shares outstanding at a current market price of $65 per share. What is the maximum cash price per share that could be paid for XYZ?
Focus your paper on texas : Pick an issue and write a Pro-Con-My Opinion Paper on topic-focus your paper on Texas. A section on why Texas should legalize marijuana backed up with research.

Reviews

Write a Review

Database Management System Questions & Answers

  Explain how to create query in access query wizard

Describe how to create a query in Access Query Wizard equilvant to the query: SELECT first, last, department, hours FROM payroll WHERE hours>.

  Design an entity-relationship model of the problem

Design an entity-relationship model of the problem, convert the model into a relational model, and assess the normal form of each schema.

  Draw an entity relationship diagram

1. Draw an entity relationship diagram (ERD) for the following situation: A company has a number of employees. Each employee is identified by an Employee_Id. The company wants to store Employee_Name, Employee_Address, and Employee_BirthDate in the da..

  Formulate the problem of determining the optimal locations

Consider the University of the Far West described in Example. Suppose that the university administration has decided that two audiovisual centers are needed.

  Determine the manufacturing overhead cost

Determine the manufacturing overhead cost per unit of each of the companys two products under the traditional costing system.

  What is best source of wine in optimum price-rating ratio

Australian Wine Importers (AWI) asked you to develop a data mining method of classifying imported wines based on: Price category (as 5 equal size bins).

  Describe at least two data security measures

Describe at least two data security measures that you believe are necessary to prevent data security issues. Justify your response.

  Explain second normal and third normal form

1. SQL Server 2000 Architecture with diagram. 2. Explain Second Normal and Third Normal Form, 3. Explain query engine and storage manager in MySQL architecture.

  Demonstrate an application of your database design knowledge

Assignment 2 is an extension of Assignment 1 where you have to demonstrate an application of your database design knowledge.

  Explain important design choices

ICT701 - Relational Database Systems - University of sunshine coast - You are not to contact the hospital directly as this takes valuable resources

  Write descriptions for scalar functions and stored procedure

Write descriptions for two scalar functions and two stored procedures (four total code element) that will accomplish some useful functionality in your database.

  If those were for me wed keep them all in two to three

if those were for me wed keep them all in two to three minutes longer he says. but thats not my call-its the

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd