Question: 1. Create the following database and tables based on the following specifications. Database: Bank Customer (CustomerId, FirstName, LastName, E-mail, SSN) Account (AccountId, CustomerId, Balance) Primary
1. Create the following database and tables based on the following specifications.
Database: Bank
Customer (CustomerId, FirstName, LastName, E-mail, SSN)
Account (AccountId, CustomerId, Balance)
Primary keys should use the self-incrementing IDENTITY property.
Strings should use the NVARCHAR(50) type.
CustomerId is a FK in Account.
All properties should be required except Balance, which uses the MONEY type.
SSN should be numerical.
2. Insert 50 customers into the Customers table using a loop. For SSN, use a 9-digit random number. Research online how to generate the random number. Ensure that SSN does not belong to another customer.
3. Insert 20 accounts. For the Balance, generate a random decimal.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
