Database Concepts

Published by Pearson
ISBN 10: 0133544621
ISBN 13: 978-0-13354-462-6

Chapter 3 - Structured Query Language - Figure 3-18 - Pet_Owner Data - Page 213: 3.7


CREATE TABLE PET_OWNER( OwnerID int NOT NULL, OwnerLastName nvarchar(15) NOT NULL, OwnerFirstName nvarchar (15) NOT NULL, OwnerPhone nchar(14) NULL, OwnerEmail nvarchar(50) NOT NULL ) GO ALTER TABLE PET_OWNER ADD CONSTRAINT PK_OwnerID PRIMARY KEY(OwnerID); GO Justification OwnerID is surrogate key and should be int OwnerLastName, OwnerFirstName, OwnerEmail are characters with variable length, therefore, nvarchar is best choice Phone num is of fix length, therefore, nchar is best choice

Work Step by Step

No steps involved
Update this answer!

You can help us out by revising, improving and updating this answer.

Update this answer

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.