Professional Documents
Culture Documents
Assignment 1
Assignment 1
/* SQL Command to Create a new Schema "HR" for Human Resource data */
CREATE SCHEMA HR
GO
/*
FQDN = Server.Database.Schema.Object
(Object can be any DB Object like Table,View,Function,StoredProcedure etc)
*/
GO
A - Atomicity
C - Consistency
I - Isolation
D - Durability
*/
/* The below Insert will fail with Foreign Key Constraint Error as there is no
corresponding Primary Key for EMP_ID = 'HR-09'*/
INSERT INTO SESSION_DB.HR.DEPARTMENT
(DEP_NAME,DEP_DESCRIPTION,DEP_HR)
VALUES('KSC','Knowledge Service Center','HR-09')
/*
Plese note that if this entire SQL is run as a batch in one shot
there will be no objects left as at the Last Database is being Dropped
*/