Machine-translated by Google. Questions are authored in English.
Top

Database Redesign Questions and Answers

11.

How many copies of the database schema are typically used in the redesign process?

Answer: C

Correct answer: Three

Three copies are used: the operational schema, which is left untouched; a test copy on which the changes and their SQL are proved; and a copy carrying the proposed new design. Working with fewer means either testing against live data or having nowhere to develop the new structure, and the three-copy arrangement is what allows the change to be rehearsed completely before it is applied.

Please log in or register to report this question.

Answer: D

Correct answer: All of the above should be done.

All three precautions are necessary and none substitutes for another. The current structure and contents must be understood, or a change will have consequences nobody anticipated; the statements must be tested on a test database, since a DDL error against live data may be irreversible; and a complete backup must exist, because some of what can go wrong cannot be undone by any other means.

Please log in or register to report this question.

13.

What SQL command will allow you to change the table STUDENT to add the constraint named GradeCheck that states that the values of the Grade column must be greater than 0?

Answer: C

Correct answer: ALTER TABLE STUDENT ADD CONSTRAINT GradeCheck CHECK (Grade > 0);

A named constraint is added with ADD CONSTRAINT to give it a name, followed by the constraint type - CHECK, UNIQUE, PRIMARY KEY or FOREIGN KEY - and its definition. Omitting the CHECK keyword leaves the statement without a constraint type and it will not parse. ALTER CONSTRAINT would modify one that already exists. Naming the constraint matters, since an unnamed one receives a generated name that is awkward to drop later.

Please log in or register to report this question.

14.

Which SQL-92 standard SQL command can be used to change a table name?

Answer: D

Correct answer: None of the above is correct.

SQL-92 contains no command for renaming a table. Individual products supply their own - RENAME TABLE in MySQL, sp_rename in SQL Server, ALTER TABLE ... RENAME TO in PostgreSQL and Oracle - but none of these is standard, so a rename cannot be written portably. The standard-conforming alternative is to create the new table, copy the data and drop the old one.

Please log in or register to report this question.

15.

The data model produced from the reverse engineering process does not include intersection table data.

Answer: B

Correct answer: False

Intersection tables exist physically in the schema, so reverse engineering reads them and includes them like any other table. What it cannot do is recognise that they are intersection tables representing a many-to-many relationship rather than entities in their own right - that interpretation requires a person, and it is one of the reasons the reverse-engineered model needs correction.

Please log in or register to report this question.

16.

Because of the importance of making data model changes correctly, many professionals are ________ about using an automated process for database redesign.

Answer: B

Correct answer: skeptical

Automated tools can generate the DDL for a structural change, but they cannot know what the data means, which values will fail a new constraint, or what the applications expect - and a mistake against live data may be irreversible. Practitioners therefore use such tools to draft the change and then review, test and often rewrite it by hand rather than trusting the output.

Please log in or register to report this question.

17.

The EXISTS keyword will be true if any row in the subquery meets the condition.

 

Answer: A

Correct answer: True

EXISTS returns true as soon as the subquery yields a single row. It examines only whether rows exist, not what they contain, which is why it can stop at the first match and why the select list inside it is conventionally written as SELECT * or SELECT 1.

Please log in or register to report this question.

18.

The use of the double NOT EXISTS can be used to find rows that do not match some specified condition.

Answer: A

Correct answer: True

The doubly nested NOT EXISTS is the standard SQL expression of relational division: there is no member of the required set for which no matching row exists. It is how one finds, for example, the students who have taken every course in a list, and it is used because SQL has no division operator of its own.

Please log in or register to report this question.

19.

Dependency graphs are diagrams that consist of nodes and arcs that show the dependencies of a database.

Answer: A

Correct answer: True

A dependency graph represents each database structure as a node and each dependency as an arc, so that everything relying on a given table, column or view can be read off directly. It is the tool that shows, before a change is made, which views, constraints, procedures and queries would be affected by it.

Please log in or register to report this question.

20.

A correlated subquery is processed as a nested subquery.

Answer: A

Correct answer: True

A correlated subquery references a column from the outer query, so it cannot be evaluated once on its own; the database must re-execute it for each candidate row of the outer query, which is what nested processing means. That is also why it is generally the more expensive form and why an equivalent join is often preferred where one exists.

Please log in or register to report this question.

Loading…
Tags: Database Redesign Questions and Answers || Database Redesign MCQ Questions and Answers || Database Redesign GK Questions and Answers || Database Redesign GK MCQ Questions || Database Redesign Multiple Choice Questions and Answers || Database Redesign GK || GK on Database Redesign || Database Questions and Answers || Database MCQ Questions and Answers || Database GK Questions and Answers || GK on Database