Answered step by step
Verified Expert Solution
Question
1 Approved Answer
CREATE TABLE Company ( person _ id int PRIMARY KEY, person _ Name VARCHAR ( 2 5 5 ) , department _ ID VARCHAR (
CREATE TABLE Company
personid int PRIMARY KEY,
personName VARCHAR
departmentID VARCHAR
companyName VARCHAR
isAstMgr BOOLEAN,
isMgr BOOLEAN,
isGnrMgr BOOLEAN,
FOREIGN KEY deparmentIDcompanyName REFERENCES HoldingdeparmentIDcompanyName
;
How to check condition that a person can only have one role which is AstMgr or Mgr or GnrMgr Two or more roles are not possible per person.
There may be several AstMgr or Mgr for a specific deparmentIDcompanyName
If there is a GnrMgr for a specific deparmentIDcompanyName there will not be other GnrMgr for same company.
How to write a DDL to check isGnrMgr column and not to allow to enter second GnrMgr for the same unique deparmentIDcompanyName
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started