Write an SQL request that returns all the tuples

Assignment Help Database Management System
Reference no: EM132543538

Data modeling

Question 1: Micro loans are small loans, which is beginning to gain popularity especially among borrowers in developing countries. The idea is to bring venture lenders together using information technology. Typically, the loans will be used to finance startup or development of the borrower's company, so that there is a realistic chance for repayment. The money in a loan can, unlike traditional loans, come from many lenders. In this problem, you must create an E-R model that describes the information necessary to manage micro loans. Thefollowing information form the basis for creating the model:
• Each borrower and lender must be registered with information about name and address.
• A loan starts with a loan request, which contains information about when the loan should at latest be granted. The total amount being discussed (US-dollars), and how long the payback period is. Also, a description is included of how the money will be used. The rent on the payment is calculated in the loan amount, which is to say, the full amount is not paid.
• Lenders can commit to an optional portion of the total amount of a loan request.
• When the commitments for the loan request covers the requested amount, the request is converted to a loan. If not enough commitments can be reached, the loan request is cancelled. A borrower can have more than one request, and more than one loan at a time, but can at most make one request per day.
• The loan is paid through an "intermediary", typically a local department of a charity, who has a name and an address.
• The borrower chooses when he or she will make a payment. Every payment must be registered in the database with an amount and a date (at most one payment per loan per day). The lenders share the repayment based on how large a part of the loan they are responsible for.
• If the loan is not repaid before the agreed upon deadline, a new date is agreed. The database must not delete the old deadline, but save the history (the deadline can be overridden multiple times).
• Each lender can for each burrower save a "trust", which is a number between 0 and 100 that determines the lender's evaluation of the risk of lending money to that person. The number must only be saved for the borrowers, for whom there has been madesuch an evaluation.

a) Make an E-R model for the data described above. If you make any assumptions about data that doesn't show from the problem, they must be described. Use the E-R notation from KBL. Put an emphasis on having the model express as many properties about the data as possible, for instance participation constraints.

b) Make a relational data model for micro loans: Describe the relations using SQL DDL (make reasonable assumptions about data types). The emphasis is if there is a correlation between the relational model and the E-R diagram from a), along with primary key and foreign key contractions being stated for all relation.

Question 2: The following relation schema can be used to register information on the repayments on micro loans Repayment

(borrower_id,name,address,loanamount,requestdate,repayment_date,request_amount)

A borrower is identified with an unique borrower_id, and has only one address. Borrowers can have multiple simultaneous loans, but they always have different request dates. The borrower can make multiple repayments on the same day, but not more than one repayment per loan per day.

a) State a key (candidate key) for Repayment.

b) Make the normalization to 3NF. State for every step in the normalization, which functional dependency that causes it.

c) Write an SQL request that returns all the tuples with information on repayments from the borrower with id equal to 42, and where the lent amount exceeds 1000 USD.

d) Write an SQL request that for each address finds the total repaid amount for the address.

e) write an SQL request that finds all names which has a unique address, which to say is where there does not exist a tuple with a different name and same address.

f) Write an SQL command, which deletes all information on ended loans, which is to say loans where the total repaid amount equals the lend amount.

Attachment:- Data modeling.rar

Reference no: EM132543538

Questions Cloud

Organizational analysis : How do you determine whether an organization is ethical or not? Based on your assessment and research, is the organization ethical?
Discuss two financial report assertions for the audit : Identify and discuss at least TWO financial report assertions for the audit of inventory at book that you believe would be assessed as high risk.
How much is the patent amortization : SPARSE estimates that the patent has a remaining useful life of 8 years. How much is the patent amortization in 20x1
Applies factory overhead based on direct labor costs : Hemingway, Inc. applies factory overhead based on direct labor costs. The company incurred the following costs during 2011:
Write an SQL request that returns all the tuples : Write an SQL request that returns all the tuples with information on repayments from the borrower with id equal to 42, and where the lent amount
Prepare the suspense account : The trial balance of Paa Kwasi Enterprise has an excess of credit over debit of GHS 50,000. Prepare the suspense account
How project success was measured-risk factors : How project success was measured, risk factors that affected the project, and lessons learned from the project.
Prepare the General Journal entries for January : On January 2, 2016, Alpha Corporation issued 15,000 shares of $10 par value common stock for $15 per share. Prepare the General Journal entries for January
Products-goods and services : Learn the distinguishing characteristics between goods and services. Acknowledge the core elements of the market offering.

Reviews

len2543538

6/12/2020 10:38:16 PM

Micro loans are small loans, which is beginning to gain popularity especially among borrowers in developing countries. The idea is to bring venture lenders together using information technology. Typically, the loans will be used to finance startup or development of the borrower's company, so that there is a realistic chance for repayment. The money in a loan can, unlike traditional loans, come from many lenders. In this problem, you must create an E-R model that describes the information necessary to manage micro loans. The following information form the basis for creating the model:

Write a Review

Database Management System Questions & Answers

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

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