Learning Objectives:

Your task:

  1. Create a table called CustomerAccounts that has the following columns (data type in the brackets): accnum (6 digit integer), customerName (string up to 30 characters), address (string up to 100 characters), and balance (number with 2 digits after decimal point and up to $1,000,000). The schema of the relation CustomerAccounts should include the following constraints:
  2. Alter the table CustomerAccounts to add another column called email (string up to 80 characters).
  3. Create another table called Transactions that includes the following columns (data type in the brackets): transactionID (8 digit integer), unitPrice (number with 2 decimal places), units (integer up to 99999), startTime (date), endTime (date), and the transaction is done by a customer account.
    The schema of the relation Transactions should include the following constraints:
  4. Complete the following tasks using SQL update query:
  5. Drop the tables CustomerAcccounts and Transactions you just created.