Question: DATABASE Please answer all the questions given(1,2,3,4) CUSTOMER CUST_NUM CUST_LNAME CUST_FNAME CUST_BALANCE 1000 Billy Jean 1050.11 1001 Amanda John 840.92 INVOICE INV_NUM 8000 CUST_NUM INV_DATE

 DATABASE Please answer all the questions given(1,2,3,4) CUSTOMER CUST_NUM CUST_LNAME CUST_FNAME

DATABASE

Please answer all the questions given(1,2,3,4)

CUSTOMER CUST_NUM CUST_LNAME CUST_FNAME CUST_BALANCE 1000 Billy Jean 1050.11 1001 Amanda John 840.92 INVOICE INV_NUM 8000 CUST_NUM INV_DATE 23/3/2020 INV_AMOUNT 235.89 1000 8001 1001 23/3/2020 312.82 8002 1002 30/3/2020 528.10 8003 1003 12/4/2020 194.78 8004 1004 23/4/2020 619.44 1. Create both the CUSTOMER and INVOICE tables structure above. Details of both tables are: a) The customer number should store integer values. The name attributes should support variable length character data up to 30 characters each. The customer balance should support up to six digits on the left of the decimal place and two digits to the right of the decimal place. (5 Marks) b) The invoice number should store integer values. The invoice date should store date values. The invoice amount should support up to 8 digits to the left of the decimal place and two digits to the right of the decimal place. (5 Marks) 2. Write the SQL commands necessary to insert the data into the CUSTOMER table and the INVOICE table created in (1). (5 Marks) 3. Modify the CUSTOMER table: a) to include the customer's date of birth (CUST_DOB), which should store date data. (2 Marks) b) to indicate the date of birth on March 15, 1989 for customer 1000. (2 Marks) c) to indicate the date of birth on December 22, 1988 for customer 1001. (2 Marks) 4. Write a query to count the number of invoices. (2 Marks)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!