Design and implement a database for keeping track

Assignment Help Database Management System
Reference no: EM132694820

Database design and Implementation

Introduction:

In this project, you will design and implement a database for keeping track of customer information for a company called XYZ-Utility that provide utility service to customer at their addresses.

You will first design an ERD diagram for this company's database application. Then, you will need to map the ERD into a relational database schema and implement it on MySQL DBMS, load some data into the created database, and create some SQL queries to update and query the data.

The system description and requirements are given in the following section

System Description and requirements:

XYZ-Utility Company which provides Utility services to Customers at their addresses (You may think of Gas service as an example). Customers subscribe for the service by signing a contract with the company which contains the activation date, the meter number, the address, and the billing rate. The company bills the customer according to their consumption which is measured by Meter installed at their address. Each Meter is assigned a unique number, and the reading of the meter is recorded by a company employee who is assigned the reading task. Each Reader is assigned a list of addresses and Meter numbers to read on specific date. The Reader record the Meter reading and the date it was taken. Then customer consumption is calculated by subtracting the previous reading from the current reading. The cost is calculated by multiplying the customer consumption by the unit rate (specified in the contract). The customers are billed after each reading and given 30 days to pay their bill. A customer may have one or more addresses and consequently may have Multiple Contracts. One Meter is installed at each address. Each Contract is billed separately if the customer has multiple addresses (contracts). Customer can activate or deactivate the service at his address at any date, and these dates should be recorded. Meters are fixed at the installation addresses; however customers can change their addresses. Consequently, the same meter/address can be

assigned to multiple customers but not at the same time period, so the activation and deactivation dates are important to determine which customer is using which meter at any given time.

Currently XYZ-Utility uses traditional file-based system for its data where it keeps track of the Customers information, Meter readings, Bills, Payments, and Employee Reading assignments . The attached excel file has a sample of this file based system data. You need this data to test your database

You can see the current file-based system has all different kinds of update, delete, insert, issues. In addition, answering questions about customers, due dates, bills, and reading assignments is difficult.

Tasks:

Task 1-Your task is to use the description above and the given sample data excel file to design a database system for XYZ-Utility Company to avoid all possible update, insert and query issues in their current file- based system.

To prove the usefulness of your database-based system you should insert the sample data in your tables, add users with different roles (Manager, Reader, Customer service) to your database and assign them privileges according to their job needs (for example: Reader person should only see the list of addresses he needs to visit in order read their Meter, and not allowed to see customer names or other information. Customer service can see customer information and Bills, but not the employee who is assigned to read the customer meter. Manager can see all information and can assign/change the assignment of Meter readings to Reading employees).
Note that the sample data used in the file-based system are not normalized. Also, feel free to add some other attributes to any of the entities if you think it will be useful.

-Task 1 deliverables:
a- PDF file: Detailed Crow's foot ERD for your database system design
b- SQL script file: SQL DDL and Insert script to create the database you designed, with Normalized Tables and insert the sample data in the database
- Note that your design needs to avoid the duplication/redundancy of the data entries
c- SQL script file : SQL DCL to add the three types of users and assign them accesses as explained in the task description

Task 2-Write SQL queries to update the data and answer the following questions:

2.1 Update Queries: Write queries to

1- Update customers by adding new customers

2- Assign one of the Reader employees to do next reading of some customers (at least 2)

3- make one of the readers add a new reading from his assignments list. Note that when a new reading is completed and if it is not the first reading for that customer a new bill will be issued, so create a bill for the entered reading according to the previous reading.

4- deactivate the service for a customer at his current address. Note that deactivating the service will require a new reading to be scheduled on the date of termination request. And new bill to be issued after the reading.

2.2 Informational Queries: Write queries to answer

1- How many customers with balance over $100? And then List their names and balances

2- List all readings assigned to a specific employee with their dates, meter numbers, and addresses 3-List all readings, bills and payments made by a customer at all of his addresses.

4- How many readings have been made by employee x in the interval between any two specified dates (start_date, end_date)?

5- Given a customer bill number, find the readers of the 1st and last reading in that bill? 6-Who is the customer with highest consumption up to specific date?

7- What is the average of all customer consumptions in the interval between any two specified billing dates (start_date, end_date)?

8- Who are the customers whose consumptions is above average in previous query (Q7) during that interval?

Attachment:- Database design and Implementation.rar

Reference no: EM132694820

Questions Cloud

Health condition causes homeostatic imbalance in system : Describe how the pathology of the health condition causes a homeostatic imbalance in the system.
How much each class of shares should receive : 2 years preceding the current year, state how much each class of shares should receive if the preferred shares are non-cumulative and non-participating.
What is the value of the company : If the actual market price immediately following the split is $34.00 per share, what does this tell us about market efficiency?
Explain the role each department plays in the process : Identify two departmental units that play a role in developing and maintaining the accounting information system. Explain the role each department plays
Design and implement a database for keeping track : Design and implement a database for keeping track of customer information for a company called XYZ-Utility that provide utility service to customer
Identify four specific items relating to vacation leave : Identify four specific items relating to vacation leave and vacation pay that will have to be addressed in the policy to ensure compliance
Explain what you see as the future of nursing practice : You have to create an E-Poster on what you see as the future of nursing practice and the role of nursing in the emerging health-care environment.
Do think that rio tinto behaviour at juukaan gorge : Do you think that Rio Tinto's behaviour at Juukaan Gorge (i.e. from the two articles by Walquist) was consistent with Crawley and Sinclair's (2003) framework?
Define group therapy session for children and adolescent : Select two clients you observed or counseled this week during a group therapy session for children and adolescent Note: The two clients you select must have.

Reviews

Write a Review

Database Management System Questions & Answers

  Suggest at least two types of databases that would be useful

Suggest two types of databases that would be useful for small businesses, types for regional level organizations and types for internationally wide companies.

  Which of the four components seem to be present in series

Shipments of Household Appliances. Which of the four components (level, trend, seasonality, noise) seem to be present in this series?

  Write an algorithm that inputs the lunch costs

Write an algorithm that inputs the lunch costs for each the ten employees while accumulating the total cost of the lunch.

  Implement the ecm and data governance policies

Provide a brief description of the organization (can be hypothetical) that will be used as the basis for the projects in the course. Include company size

  Why is a key important in a database

Why is a Key important in a database? How does it help with Referential Integrity? Lists three compelling reasons why Keys are crucial to table structure

  To what extent should you rely on the asn database

The ASN database and Web site were created and are maintained by two individuals. The database might be complete and accurate, or it might not be. To what extent should you rely on these data?

  Perform the physical design and implementation

Perform the physical design and implementation using SQL Data Definition Language (DDL) and proceed with populating the Mom and Pop Johnson Video Store database

  Create an event-agent-database table

Books Ga'Lore! sells books. When a customer makes a credit card purchase at their retail outlet, an employee totals the items.

  What are the pros and cons of building a custom etl tool

Discuss the components of an ETL system. What are the pros and cons of building a custom ETL tool. How would you correct bad data in the warehouse?

  FIT9132 Introduction to Databases Assignment

FIT9132 Introduction to Databases Assignment help and solution, Monash University - assessment writing service - prepare a FULL conceptual model

  Describe 4 software or hardware problems which will render

discuss 4 software or hardware problems that will render two hosts unable to use the tcpip protocol to communicate.

  Compute the forecast error for the given forecast

Compute the sales forecast for January 1999 based on a moving average with w = 4. Compute the forecast error for the above forecast.

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