●以下的SQL 99语句,Dept与Employee之间的关系是 (63) 。CREATE TYPE Employee(name string,ssn integer);CREATE TYPE Dept(Name stringHead ref(Employee) SCOPE Employee );(63)A. 类型继承B. 类型引用C. 数据引用D. 无任何关系

●以下的SQL 99语句,Dept与Employee之间的关系是 (63) 。

CREATE TYPE Employee(

name string,

ssn integer);

CREATE TYPE Dept(

Name string

Head ref(Employee) SCOPE Employee );

(63)

A. 类型继承

B. 类型引用

C. 数据引用

D. 无任何关系


相关考题:

Examine the structure if the EMPLOYEES table:Column name Data Type RemarksEMPLOYEE_ID NUMBER NOT NULL, Primary KeyEMP_NAME VARCHAR2(30)JOB_ID VARCHAR2(20) NOT NULLSAL NUMBERMGR_ID NUMBER References EMPLOYEE_ID columnDEPARTMENT_ID NUMBER Foreign key to DEPARTMENT_ID column of the DEPARTMENTS tableYou need to create a view called EMP_VU that allows the user to insert rows through the view. Which SQL statement, when used to create the EMP_VU view, allows the user to insert rows? ()A. CREATE VIEW emp_Vu AS SELECT employee_id, emp_name, department_id FROM employees WHERE mgr_id IN (102, 120);B. CREATE VIEW emp_Vu AS SELECT employee_id, emp_name, job_id department_id FROM employees WHERE mgr_id IN (102, 120);C. CREATE VIEW emp_Vu AS SELECT department_id, SUM(sal) TOTALSAL FROM employees WHERE mgr_id IN (102, 120) GROUP BY department_ id;D. CREATE VIEW emp_Vu AS SELECT employee_id, emp_name, job_id, DISTINCT department_id FROM employees;

You created a view called EMP_DEPT_VU that contains three columns from the EMPLOYEES and DEPARTMENTS tables:EMPLOYEE_ID, EMPLOYEE_NAME AND DEPARTMENT_NAME.The DEPARTMENT_ID column of the EMPLOYEES table is the foreign key to the primary keyDEPARTMENT_ID column of the DEPARTMENTS table.You want to modify the view by adding a fourth column, MANAGER_ID of NUMBER data type from the EMPLOYEES tables.How can you accomplish this task? ()A. ALTER VIEW EMP_dept_vu (ADD manger_id NUMBER);B. MODIFY VIEW EMP_dept_vu (ADD manger_id NUMBER);C. ALTER VIEW emp_dept_vu AS SELECT employee_id, employee_name, department_name, manager_id FROM employee e, departments d WHERE e.department _ id = d.department_id;D. MODIFY VIEW emp_dept_vu AS SELECT employee_id, employee_name, department_name, manager_id FROM employees e, departments d WHERE e.department _ id = d.department_id;E. CREATE OR REPLACE VIEW emp_dept_vu AS SELECT employee_id, employee_name, department_name, manager_id FROM employees e, departments d WHERE e.department _ id = d.department_id;F. You must remove the existing view first, and then run the CREATE VIEW command with a new column list to modify a view.

Examine the data in the EMPLOYEES and DEPARTMENTS tables:EMPLOYEESEMP_NAME DEPT_ID MGR_ID JOB_ID SALARYEMPLOYEE_ID101 Smith 20 120 SA_REP 4000102 Martin 10 105 CLERK 2500103 Chris 20 120 IT_ADMIN 4200104 John 30 108 HR_CLERK 2500105 Diana 30 108 IT_ADMIN 5000106 Smith 40 110 AD_ASST 3000108 Jennifer 30 110 HR_DIR 6500110 Bob 40 EX_DIR 8000120 Ravi 20 110 SA*DIR 6500DEPARTMENTSDEPARTMENT_ID DEPARTMENT_NAME10 Admin20 Education30 IT40 Human ResourcesAlso examine the SQL statements that create the EMPLOYEES and DEPARTMENTS tables:CREATE TABLE departments(department_id NUMBER PRIMARY KEY,department _ name VARCHAR2(30));CREATE TABLE employees(EMPLOYEE_ID NUMBER PRIMARY KEY,EMP_NAME VARCHAR2(20),DEPT_ID NUMBER REFERENCESdepartments(department_id),MGR_ID NUMBER REFERENCESemployees(employee id),MGR_ID NUMBER REFERENCESemployees(employee id),JOB_ID VARCHAR2(15).SALARY NUMBER);ON the EMPLOYEES,On the EMPLOYEES table, EMPLOYEE_ID is the primary key.MGR_ID is the ID of managers and refers to the EMPLOYEE_ID. DEPT_ID is foreign key to DEPARTMENT_ID column of the DEPARTMENTS table. On the DEPARTMENTS table, DEPARTMENT_ID is the primary key.Examine this DELETE statement:DELETEFROM departmentsWHERE department id = 40;What happens when you execute the DELETE statement?()

●将表employee中name列的修改权限赋予用户Liu,并允许其将该权限授予他人,应使用的SQL语句为:GRANT (52) ON TABLE employee TO Liu (53) ;(52)A.UPDATE(name)B.DELETEC.SELECTD.INSERT(53)A.FORALLB.CASCADEC. WITH GRANT OPTIOND.WITH CHECK OPTION

●以下的SQL 99语句,Student与Person之间的关系是 (62) 。CREATE TYPE Person(name char(20),address varchar(50));CREATE TYPE Student(under Person(degree char(20)department char(20));(62)A.类型继承B.类型引用C.表继承D.无任何关系

A table was created using the following DDL:CREATE TABLE employee (id SMALLINT NOT NULL, name VARCHAR(9), dept SMALLINT CHECK (dept BETWEEN 10 AND 100),job CHAR(10) CHECK (job IN (‘Sales‘,‘Mgr‘,‘Clerk‘)), hiredate DATE, salary DECIMAL(7,2), comm DECIMAL(7,2), PRIMARY KEY (id), CONSTRAINT yearsal CHECK (YEAR(hiredate) 2004 OR salary 80500) );Which of the following INSERT statements will fail?()A.INSERT INTO employee VALUES (2, ‘Smith‘, 80, ‘Mgr‘, ‘09/03/2006‘, 80000, NULL)B.INSERT INTO employee VALUES (4, ‘Smith‘, 86, ‘Mgr‘, ‘07/14/2003‘, 90000, NULL)C.INSERT INTO employee VALUES (1, ‘Smith‘, 55, ‘Sales‘, ‘07/14/2003‘, NULL, NULL)D.INSERT INTO employee VALUES (3, ‘Smith‘, 33, ‘Analyst‘, ‘11/26/2006‘, 90000, NULL)

以下SQL 99语句描述的是(59)。CREATE TYPE Employee(name String,ssn integer);CREATE TYPE ManagerUNDER Employee(degree String,dept String);A.关联关系B.嵌套关系C.继承类型D.聚集关系

某企业的数据库系统中有如下所示的员工关系和仓库关系,每个仓库可有多名员工,但只有一名负责人。员工关系(employee):仓库关系(warehouse):则创建仓库表结构的SQL语句为(58)。A.CREATE TABLE (employee ID CHAR(2)NOTNULL UNIQUE, name CHAR(30)NOT NULL, address CHAR(40), principal ID CHAR(3));B.CREATE warehouse(warehouse ID CHAR(2)PRIMARY KEY, name CHAR(30), address CHAR(40), principal ID CHAR(3));C.CREATE TABLE warehouse(warehouse ID CHAR(2)PRIMARY KEY, name CHAR(30)NOT NULL, address CHAR(40), principal ID CHAR(3), FOREIGN KEY(principal ID)REFERENCES employee(employee ID));D.CREATE TABIE warehouse(warehouse ID CHAR(2), name CHAR(30)NOT NULL, address CHAR(40), principal ID CHAR(3), PRIMARY REY(warehouse ID), FOREIGN KEY(employee ID)REFERENCES employee(employee ID));

以下SQL99语句描述的是(26)。 CREATETYPE Employee( Name String, ssn integer); CREATE TYPE Manager UNDER Employee( Degree String, Dept String);A.关联关系B.嵌套关系C.继承类型D.聚集关系

以下的SQL 99语句,Dept与Employee之间的关系是(63)。 CREATE TYPE Employee( name string, ssn integer); CREATE TYPE Dept( Name string Head ref(Employee)SCOPE Employee );A.类型继承B.类型引用C.数据引用D.无任何关系

public class Employee{       private String name;  public Employee(String name){           this.name = name;      }  public String getName(){         return name;      } }  public class Manager extends Employee{       public Manager(String name){          System.out.println(getName());      } }  执行语句new Manager(“smith”)后程序的输出是哪项?() A、 smithB、 nullC、 编译错误D、 name

public class Employee{   private String name;   public Employee(String name){   this.name = name;  }   public void display(){   System.out.print(name);  }  }   public class Manager extends Employee{   private String department;   public Manager(String name,String department){   super(name);   this.department = department;  }   public void display(){   System.out.println( super.display()+”,”+department);  }   }   执行语句new Manager(“smith”,”SALES”)后程序的输出是哪项?() A、 smith,SALESB、 null,SALESC、 smith,nullD、 null,null

现有表Employee,字段:id(int)、firstname(varchar)、lastname(varchar);以下sql语句错误的是()A、select firstname+’.’+lastnameas’name’from employeeB、select firstname+’.’+lastname=’name’from employeeC、select’name’=firstname+’.’+lastnamefrom employeeD、select firstname,lastname from employee

11. class Person {  12. String name = “No name‟;  13. public Person(String nm) { name = nm; }  14. }  15.  16. class Employee extends Person {  17. String emplD = “0000”;  18. public Employee(String id) { empID = id; }  19. }  20.  21. public class EmployeeTest {  22. public static void main(String[] args) {  23. Employee e = new Employee(”4321”);  24. System.out.println(e.empID);  25. }  26. }  What is the result?() A、 4321B、 0000C、 An exception is thrown at runtime.D、 Compilation fails because of an error in line 18.

单选题public class Employee{       private String name;  public Employee(String name){           this.name = name;      }  public void display(){         System.out.print(name);      } }  public class Manager extends Employee{       private String department;  public Manager(String name,String department){          super(name);  this.department = department;  }  public void display(){  System.out.println(super.display()+”,”+department);      } }  执行语句new Manager(“smith”,”SALES”)后程序的输出是哪项?()A smith,SALESB null,SALESC smith,nullD null,nullE 编译错误

单选题public class Employee{       private String name;  public Employee(String name){           this.name = name;      }  public String getName(){         return name;      } }  public class Manager extends Employee{       private String department;  public Manager(String name,String department){          this.department = department;          super(name);  System.out.println(getName());      }  }  执行语句new Manager(“smith”,”SALES”)后程序的输出是哪项?()A smithB nullC SALESD 编译错误

单选题Examine the structure if the EMPLOYEES table: Column name Data Type Remarks EMPLOYEE_ID NUMBER NOT NULL, Primary Key EMP_NAME VARCHAR2(30) JOB_ID VARCHAR2(20) NOT NULL SAL NUMBER MGR_ID NUMBER References EMPLOYEE_ID column DEPARTMENT_ID NUMBER Foreign key to DEPARTMENT_ID column of the DEPARTMENTS table You need to create a view called EMP_VU that allows the user to insert rows through the view. Which SQL statement, when used to create the EMP_VU view, allows the user to insert rows?()ACREATE VIEW emp_Vu AS SELECT employee_id, emp_name, department_id FROM employees WHERE mgr_id IN (102, 120);BCREATE VIEW emp_Vu AS SELECT employee_id, emp_name, job_id department_id FROM employees WHERE mgr_id IN (102, 120);CCREATE VIEW emp_Vu AS SELECT department_id, SUM(sal) TOTALSAL FROM employees WHERE mgr_id IN (102, 120) GROUP BY department_ id;DCREATE VIEW emp_Vu AS SELECT employee_id, emp_name, job_id, DISTINCT department_id FROM employees;

单选题Evaluate the SQL statement: 1 SELECT a.emp_name, a.sal, a.dept_id, b.maxsal 2 FROM employees a, 3 (SELECT dept_id, MAX(sal) maxsal 4. FROM employees 5 GROUP BY dept_id) b 6 WHERE a.dept_id = b.dept_id 7 AND a. asl b. maxsal; What is the result of the statement?()AThe statement produces an error at line 1.BThe statement produces an error at line 3.CThe statement produces an error at line 6.DThe statement returns the employee name, salary, department ID, and maximum salary earned in the department of the employee for all departments that pay less salary then the maximum salary paid in the company.EThe statement returns the employee name, salary, department ID, and maximum salary earned in the department of the employee for all employees who earn less than the maximum salary in their department.

单选题public class Employee{   private String name;   public Employee(String name){   this.name = name;  }   public String getName(){   return name;  }  }   public class Manager extends Employee{   public Manager(String name){   System.out.println(getName());  }  }   执行语句new Manager(“smith”)后程序的输出是哪项?()A smithB nullC 编译错误D name

单选题You created a view called EMP_DEPT_VU that contains three columns from the EMPLOYEES and DEPARTMENTS tables: EMPLOYEE_ID, EMPLOYEE_NAME AND DEPARTMENT_NAME. The DEPARTMENT_ID column of the EMPLOYEES table is the foreign key to the primary key DEPARTMENT_ID column of the DEPARTMENTS table. You want to modify the view by adding a fourth column, MANAGER_ID of NUMBER data type from the EMPLOYEES tables. How can you accomplish this task?()AALTER VIEW EMP_dept_vu (ADD manger_id NUMBER);BMODIFY VIEW EMP_dept_vu (ADD manger_id NUMBER);CALTER VIEW emp_dept_vu AS SELECT employee_id, employee_name, department_name, manager_id FROM employee e, departments d WHERE e.department _ id = d.department_id;DMODIFY VIEW emp_dept_vu AS SELECT employee_id, employee_name, department_name, manager_id FROM employees e, departments d WHERE e.department _ id = d.department_id;ECREATE OR REPLACE VIEW emp_dept_vu AS SELECT employee_id, employee_name, department_name, manager_id FROM employees e, departments d WHERE e.department _ id = d.department_id;FYou must remove the existing view first, and then run the CREATE VIEW command with a new column list to modify a view.

单选题A new employee needs access to a SQL Server 2005 database that is located on a server named SQL1. You create a login named ajones by using the following Transact-SQL statement. CREATE LOGIN ajones WITH PASSWORD = ’SQLServer$1’ The new employee reports that when he logs in, he receives the following error message: "Login failed. The user is not associated with a trusted SQL Server connection." You need to resolve the error and allow the new employee to gain access to SQL1. What should you do?()AChange the SQL Server security mode from Windows Authentication mode to SQL Server and Windows authentication mode.BChange the SQL Server security mode from SQL Server and Windows Authentication mode to Windows authentication mode.CEnsure that the login name is created with square brackets ([]).DGive the login access to a specific database by using the CREATE USER Transact-SQL statement.

单选题Examine the structure of the EMPLOYEES and DEPARTMENTS tables: EMPLOYEESColumn name Data type Remarks EMPLOYEE_ID NUMBER NOT NULL, Primary Key EMP_NAME VARCHAR2 (30) JOB_ID VARCHAR2 (20) SALARY NUMBER MGR_ID NUMBER References EMPLOYEE_ID COLUMN DEPARTMENT ID NUMBER Foreign key to DEPARTMENT ID column of the DEPARTMENTS table DEPARTMENTSColumn name Data type Remarks DEPARTMENT_ID NUMBER NOT NULL, Primary Key DEPARTMENT_NAME VARCHAR2(30) MGR_ID NUMBER References MGR_ID column of the EMPLOYEES table Evaluate this SQL statement: SELECT employee_id, e.department_id, department_name, salary FROM employees e, departments d WHERE e. department_id = d.department_id; Which SQL statement is equivalent to the above SQL statement? ()ASELECT employee_id, department_id, department_name, salary FROM employees WHERE department_id IN (SELECT department_id FROM departments);BSELECT employee_id, department_id, department_name, salary FROM employees NATURAL JOIN departments;CSELECT employee_id, d.department_id, department_name, salary FROM employees e JOIN departments d ON e.department _ id = d. department_id;DSELECT employee_id, department_id, department_name, Salary FROM employees JOIN departments USING (e.department_id, d.department_id);

单选题A table was created using the following DDL: CREATE TABLE employee (id SMALLINT NOT NULL, name VARCHAR(9), dept SMALLINT CHECK (dept BETWEEN 10 AND 100), job CHAR(10) CHECK (job IN ('Sales','Mgr','Clerk')), hiredate DATE, salary DECIMAL(7,2), comm DECIMAL(7,2), PRIMARY KEY (id), CONSTRAINT yearsal CHECK (YEAR(hiredate) 2004 OR salary 80500) ); Which of the following INSERT statements will fail?()AINSERT INTO employee VALUES (2, 'Smith', 80, 'Mgr', '09/03/2006', 80000, NULL)BINSERT INTO employee VALUES (4, 'Smith', 86, 'Mgr', '07/14/2003', 90000, NULL)CINSERT INTO employee VALUES (1, 'Smith', 55, 'Sales', '07/14/2003', NULL, NULL)DINSERT INTO employee VALUES (3, 'Smith', 33, 'Analyst', '11/26/2006', 90000, NULL)

单选题DEPARTMENT 表包含以下列: DEPT_ID NUMBER, Primary Key DEPT_ABBR VARCHAR2(4) DEPT_NAME VARCHAR2(30) MGR_ID NUMBER EMPLOYEE 表包含以下列: EMPLOYEE_ID NUMBER EMP_LNAME VARCHAR2(25) EMP_FNAME VARCHAR2(25) DEPT_ID NUMBER JOB_ID NUMBER MGR_ID NUMBER SALARY NUMBER(9,2) HIRE_DATE DATE 请评估以下语句: ALTER TABLE employee ADD CONSTRAINT REFERENTIAL (mgr_id) TO department(mgr_id); 是以下哪个说法()AALTER TABLE语句创建从EMPLOYEE表到DEPARTMENT表的引用约束条件BALTER TABLE语句创建从DEPARTMENT表到EMPLOYEE表的引用约束条件CADD CONSTRAINT子句存在语法错误,因此ALTER TABLE语句将会失败DALTER TABLE语句执行成功,但不重新创建引用约束条件

单选题评估EMPLOYEE表的结构: EMPLOYEE_IDNUMBER(9) LAST_NAMEVARCHAR2(25) FIRST_NAMEVARCHAR2(25) DEPARTMENT_IDNUMBER(9) MANAGER_IDNUMBER(9) SALARYNUMBER(7,2) 您使用以下哪条语句可将LAST_NAME列(当前包含200条记录)的长度增加到35个字节()AALTER employee TABLEAL TERCOLUMN(last_name VARCHAR2(35))BALTER TABLE employee RENAME last_name VARCHAR2(35)CALTER TABLE employee MODIFY(last_name VARCHAR2(35))D不能增大LAST_NAME列的宽度

单选题public class Employee{   private String name;   public Employee(String name){   this.name = name;  }   public void display(){   System.out.print(name);  }  }   public class Manager extends Employee{   private String department;   public Manager(String name,String department){   super(name);   this.department = department;  }   public void display(){   System.out.println( super.display()+”,”+department);  }   }   执行语句new Manager(“smith”,”SALES”)后程序的输出是哪项?()A smith,SALESB null,SALESC smith,nullD null,null

单选题public class Employee{   private String name;   public Employee(String name){   this.name = name;  }   public String getName(){   return name;  }  }   public class Manager extends Employee{   private String department;   public Manager(String name,String department){   this.department = department;   super(name); (应于上一行掉位置)   System.out.println(getName());  }  }   Super的位置是否在方法的首行   执行语句new Manager(“smith”,”SALES”)后程序的输出是哪项?()A smithB nullC SALESD 编译错误