Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Databases And Information Systems 1 International Baltic Conference Dbandis 2020 Tallinn Estonia June 19 2020 Proceedings

Authors: Tarmo Robal ,Hele-Mai Haav ,Jaan Penjam ,Raimundas Matulevicius

1st Edition

303057671X, 978-3030576714

Students also viewed these Databases questions

Question

DESCRIB. E the five steps in a union organizing campaign.

Answered: 1 week ago

Question

Question 2 of 2 Answered: 1 week ago

Answered: 1 week ago

Question

Explain the steps involved in training programmes.

Answered: 1 week ago