Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ORACLE SQL The Loan.csv considers all data values as strings. However, some values are indeed numbers and dates. Map a string to a NUMBER or

ORACLE SQL

The Loan.csv considers all data values as strings. However, some values are indeed numbers and dates. Map a string to a NUMBER or DATE data type in your program and insert into a Loan table declared accordingly.

Note:

  1. For this example, it is strongly recommended to go from a working-to-working condition. First, write the create table statement. Then use the first line of data values to manually write an `Insert Into ` statement in SQLDeveloper. From that determine a pattern, based on which you should write your program to generate several `Insert Into` statements.
  2. Copy and paste the output from your program in SQLDeveloper to see if your `Insert Into` statements are correct. If correct, data will be inserted.
  3. No attribute is missing a value, so your program need not check for NULLs.
  4. For more information on screenshots read Resources FAQ on the website. Failure to comply with Screenshot instructions will result in loss of points.

drop table Loan; create table Loan (

Amount number(6,0), Loan_date date, Loan_Title varchar(60), Risk_Score number(3,0), Debt_to_income_ratio number(6,2), Zipcode number(5), State varchar(2), Employment_Length number(1), Policy_Code number(1),

check (Amount between 0 and 999999), check (Debt_to_income_ratio between 0 and 9999.99) );

Example information from csv file:

Where Val1 and Val4 are numeric and Val2 and Val3 are strings.

Amount

Loan_Date

Loan_Title

Risk_Score

Debt_To_Income_Ratio

Zipcode

State

Employment_Length

Policy_Code

1000

5/26/07

Wedding Covered but No Honeymoon

693

10

48127

NM

4

0

1000

5/26/07

Consolidating Debt

703

10

1027

MA

1

0

11000

5/27/07

Want to consolidate my debt

715

10

21227

MD

1

0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Logidata+ Deductive Databases With Complex Objects Lncs 701

Authors: Paolo Atzeni

1st Edition

354056974X, 978-3540569749

More Books

Students also viewed these Databases questions

Question

2. What are the different types of networks?

Answered: 1 week ago