Gino January 26, 2012 Database HW4 7. CREATE postpone pamper_OWNER( OwnerIDInt non zero IDENTITY(1,1), epithetChar(50) non delusive, PhoneChar(12) NOT NULL, EmailVarChar(100) NOT NULL UNIQUE, control caress_OWNER_PK principal(a) KEY(OWNERID) ,; 8. CREATE board favourite( favouriteIDIntNOT NULL, NameChar(50)NOT NULL, TypeChar(25)NOT NULL, BreedChar(25)NOT NULL, DOBText(10)NULL, simplicity deary_PKPRIMARY KEY(PetID), timidity PET_PET_OWNER_FK FOREIGN KEY(PET OWNER) REFERENCES PET_OWNER(OwnerID) ; The DOB is null, because muckle might not do it their positron emission tomographys birthday. 9. CONSTRAINT PET_PET_OWNER_FKFOREIGN KEY(PET_OWNER) REFERENCES PET_OWNER(OwnerID) ON blue-pencil NO ACTION 10. . CONSTRAINT PET_PET_OWNER_FKFOREIGN KEY(PET_OWNER) REFERENCES PET_OWNER(OwnerID) ON DELETE CASCADE 11. CREATE TABLE PET_2( NameChar(50)NOT NULL, TypeChar(25)NOT NULL, BreedChar(25)NOT NULL, DOBText(10)NULL, CONSTRAINT PET_PET_OWNER_FK FOREIGN KEY(PET OWNER) REFERENCES PET_OWNER(OwnerID) ; 12. Pets is a better design than Pet_2, because Pet gives for each one pet an ID. 13. slough TABLE PET_OWNER; 14. DROP TABLE PET_OWNER, PET; 15. use up PetID, Name, Type, Breed, DOB, OwnerID FROM PET; 16.
SELECT * FROM PET; 17. SELECTBreed, Type FROM PET; 18. SELECT Breed, Type, DOB FROM PET; WHEREType = Dog 2. Data can be added to a intercourse using SQL INSERT ex. INSERT INTO appellative VALUES(10,1,30) The values of existing data can be restrict using UPDATE ex. UPDATE EMPLOYEE rig Phone = 215-555-1212 You can prohibit rows with DELETE ex. DELETE FROM PROJECT; 3. You would use conditional operators in the Where clause when you essential to select, update, or delete a...If you indispensability to get a in effect(p) essay, order it on our website:
Ordercustompaper.comIf you want to get a full essay, wisit our page: write my paper
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.