Tobecontinued

文章目录

  • 一、选择
  • 二、填空


一、选择

  1. Which of the following is WRONG in the relation rules?(B)
    A.There is no order on the columns.
    B.Two tuples can be identical in all column values.
    C.There is no order on the rows.
    D.Multi-valued attributes are not permitted.
    意思是创建表时不能有重复的列名
create table test(
x int ,
y int);
//报错重复命名
  1. The constraint “In a base relation, NO attribute of a primary key can be null”, is called :(A)
    A.Entity integrity
    B.Check constraint
    C.User defined constraint
    D.Referential integrity

  2. To give database user ‘Zhang’ the privilege of modifying balance on table account, Which of the following statements is RIGHT: B
    A.REVOKE UPDATE(balance) ON account TO Zhang ;
    B.GRANT UPDATE(balance) ON account TO Zhang ;
    C.REVOKE UPDATE balance OF account FROM Zhang ;
    D.GRANT UPDATE balance OF account TO Zhang ;

  3. “A transaction should be ended either by commit or abort”, indicates which property of transaction ?( C
    A.Isolation
    B.Consistency
    C.Atomicity
    D.Durability
    原子性的概念

  4. “When a transaction is failed in the middle of its execution, the modification that has been made to the database by this transaction before failure time must be aborted to guarantee the consistency of database”, indicates which property of transaction: ( C )
    A.Atomicity
    B.Consistency
    C.Durability
    D.Isolation
    当事务在执行过程中失败时,必须中止该事务在失败时间之前对数据库所做的修改,以确保数据库的一致性。一致性是指所有的修改最终使总和不变,但现在只修改了一部分,另一部分还没有被修改。

  5. LOG file must be used in the recovery of database. To re-execute the transaction that has been committed before failure time, which command should be used on the LOG records ?( B
    A.ROLLBACK
    B.Redo
    C.COMMIT
    D.Undo
    在失败前被提交正确部分应该被重做(redo),未执行的错误部分要撤销(undo)

  6. In log-based recovery mechanism, some transactions need to be undone, while others need to be redone to recover after a failure.

    What recovery actions do we need to perform according to the given log?( B
    A.undo(T0) & redo (T1)
    B.redo(T0) & undo (T1)
    C.undo(T0) & undo (T1)
    D.redo(T0) & redo (T1)

  7. which type of relationship set must be mapped into an individual relational schema ?( D
    A.M:1
    B.1:M
    C.1:1
    D.M:N

  8. Which of the following attributes in E-R diagram will NOT appeared in the relation schema mapped by the E-R diagram ?( A
    A.Derived attributes
    B.Single-valued attributes
    C.Multi-valued attributes
    D.Simple attribute

  9. An entity set whose existence depend on the existence of an identifying entity set, it is called ______ ?( A
    A.Weak entity
    B.Foreign key
    C.Strong entity
    D.Primary key

二、填空

K is a superkey of R if values for K are sufficient to identify a unique tuple of each possible relation r( R ).

“Once a transaction committed, changes to database must be persistent”, indicates which property of transaction :Durability。

你可能感兴趣的:(#,数据库)