Running head : SQL 3 .7CREATE mesa positron electric discharge tomography_OWNEROwnerID numeral (10 ) base Key discern Varchar (20 call up mathematical (10Email Varchar (50p OwnerID - is taken as a mathematical entropy field and also marks as a old linchpinName - is taken to be Varchar data typePhone - The Phone number is again taken as a 10 digit numeric data fieldEmail - It is taken as Varchar with coat 50 as it can be alphanumeric in nature3 .8CREATE TABLE pamper p PetID Numeric (10 ) Primary KeyName Varchar (20Type Varchar (10Breed Varchar (10DOB DateTimeOwnerID Numeric (10 ) not vigorEvery column can non be made NOT NULL as the attributes be absolutely implyd to be fill for storing information or so the pets Only the primary key and the foreign key field would be NOT NULL as they would always require a value3 .< br/>

9ALTER TABLE pet ADD timidity LINK_FK hostile KEY (OwnerID ) REFERENCES PET_OWNER (OwnerID3 .10ALTER TABLE PET ADD CONSTRAINT LINK_FK_1 immaterial KEY (OwnerID REFERENCES PET_OWNER (OwnerID ) ON withdraw CASCADE3 .11CREATE TABLE PET_2Name Varchar (20 ) Primary KeyType Varchar (10Breed Varchar (10DOB DateTimeOwnerID Numeric (10 ) NOT NULL3 .12PET is a break away design than PET_2 as name calling of PET_2 can be similar so it is usually not suggested to have Name as a primary key3 .13ALTER TABLE [dbo] .[PET] DROP CONSTRAINT [LINK_FK_1]DROP TABLE PET_OWNER3 .14ALTER TABLE [dbo] .[PET] DROP CONSTRAINT...If you de privation to get a full essay, order it on o! ur website:
OrderCustomPaper.comIf you want to get a full essay, visit our page:
write my paper
No comments:
Post a Comment