0% found this document useful (0 votes)
41 views

7th Exam

The document contains multiple choice questions about database concepts like entity-relationship modeling, relationships, attributes, keys, normalization, and SQL. It tests knowledge of identifying relationships, mandatory relationships, composite identifiers, constraints, derived attributes, cardinality constraints, degrees, and more. It also contains questions about SQL statements like SELECT, INSERT, UPDATE, DELETE, JOIN, DISTINCT, and clauses like WHERE, GROUP BY, HAVING, and ORDER BY.

Uploaded by

Seif.A. Sayed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views

7th Exam

The document contains multiple choice questions about database concepts like entity-relationship modeling, relationships, attributes, keys, normalization, and SQL. It tests knowledge of identifying relationships, mandatory relationships, composite identifiers, constraints, derived attributes, cardinality constraints, degrees, and more. It also contains questions about SQL statements like SELECT, INSERT, UPDATE, DELETE, JOIN, DISTINCT, and clauses like WHERE, GROUP BY, HAVING, and ORDER BY.

Uploaded by

Seif.A. Sayed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

7th Exam:

● A(n) ________ is the relationship between a weak entity type and its owner.
The correct answer is: identifying relationship

● A relationship where the minimum and maximum cardinality are both one is a(n)
________ relationship.
The correct answer is: mandatory one

● An attribute that uniquely identifies an entity and consists of a composite attribute is


called a(n):
The correct answer is: composite identifier.

● A rule that CANNOT be violated by database users is called a:


The correct answer is: constraint.

● An attribute that can be calculated from related attribute values is called a ________
attribute.
The correct answer is: derived

● A database is an organized collection of ________ related data.


The correct answer is: logically

● An attribute that must be present for every entity (or relationship) instance is a(n):
The correct answer is: required attribute.

● The logical representation of an organization's data is called a(n):


The correct answer is: entity-relationship model.

● A value that indicates the date or time of a data value is called a:


The correct answer is: time stamp.

● ________ are established between entities in a well-structured database so that the


desired information can be retrieved.
The correct answer is: Relationships

● A ________ specifies the number of instances of one entity that can be associated with
each instance of another entity.
The correct answer is: cardinality constraint

● The number of entity types that participate in a relationship is called the:


The correct answer is: degree.
● An entity that associates the instances of one or more entity types and contains
attributes peculiar to the relationships is called a(n):
The correct answer is: associative entity.
● A ________ defines or constrains some aspect of the business.
The correct answer is: business rule

● Database management involves all of the following EXCEPT:


The correct answer is: design web pages.

● The total quiz points for a student for an entire semester is a(n) ________ attribute.
The correct answer is: derived

● Which of the following criteria should be considered when selecting an identifier?


The correct answer is: Choose an identifier that doesn't have large composite attributes.

● The most common types of entities are:


The correct answer is: strong entities.

● Relational databases establish the relationships between entities by means of common


fields included in a file called a(n):
The correct answer is: relation.

● Which of the following is NOT an advantage of database systems?


The correct answer is: Redundant data

● A student can attend five classes, each with a different professor. Each professor has 30
students. The relationship of students to professors is a ________ relationship.
The correct answer is: many-to-many

● An entity type name should be all of the following EXCEPT:


The correct answer is: as short as possible.

● Data that describe the properties of other data are:


The correct answer is: metadata.

● Customers, cars, and parts are examples of:


The correct answer is: entities.
● In the figure shown below, which of the following business rules would apply?

The correct answer is: Each vendor can supply many parts to any number of
warehouses, but need not supply any parts.

● In the following diagram, which answer is true?

The correct answer is: Each employee can supervise one employee, no employees, or
many employees.

● In the following diagram, which of the answers below is true?

The correct answer is: Each patient has one or more patient histories.

● The following figure shows an example of:

The correct answer is: a strong entity and its associated weak entity.
● For the relationship represented in the figure below, which of the following is true?

The correct answer is: A department can have more than one employee.

● In the figure below, which attribute is derived?

The correct answer is: Years_Employed

● In the figure shown below, which of the following is true?

The correct answer is: A person can marry at most one person.
● In the figure below, which attribute is multivalued?

The correct answer is: Skill

12th Exam:

● Given the table


CUSTOMER(​CustID​, Name, PhoneNum, AcctBalance)
what is the standard SQL query phrase to retrieve the Name and Phone Number of
customers?
The correct answer is: SELECT Name, PhoneNum

● Given the below functional dependency,


MedicineCode → (MedicineName, ShelfLife, Manufacturer, Dosage)
which of the following statements is ​not​ known to be true?
The correct answer is: MedicineName is a determinant.

● Given the table


STUDENT(​StudentID​, Name, Advisor)​,
which of the following SQL statements would be used to add new student data to the
STUDENT table?
The correct answer is: INSERT INTO STUDENT VALUES (123, 'Jones', 'Smith');

● Given the table


STUDENT(​StudentID​, Name, Advisor)​,
which of the following SQL statements would be used to change the value of the Advisor
field to 'Smith' for all rows in the STUDENT table?
The correct answer is: UPDATE STUDENT SET Advisor = 'Smith';

● Given the relations:


STUDENT (​SID​, StudentName, Major, AdvisorID)
ADVISOR (​AdvisorID​, AdvisorName, Office, Phone)
such that each student is assigned to one advisor, which of the following is true?
The correct answer is: AdvisorID is a foreign key.

● Given the table


CUSTOMER(​CustID​, Name, PhoneNum, AcctBalance)
what is the standard SQL query phrase to retrieve data for customers with an account
balance greater than 50?
The correct answer is: WHERE AcctBalance > 50

● Which of the following is ​not​ one of the five SQL built-in functions?
The correct answer is: MODE

● The order of the columns returned by an SQL SELECT statement is determined by the
________.
The correct answer is: order they are listed in following SELECT

● Which SQL keyword can be used in conjunction with wildcards to select partial values?
The correct answer is: LIKE

● One important relational design principle is that ________.


The correct answer is: every determinant must be a candidate key

● Which of the following is the correct SQL clause to restrict the results of a SELECT
query to only records that have a value in the range of 10 to 50 in the Hours column?
The correct answer is: WHERE Hours BETWEEN 10 AND 50

● Which SQL keyword is used to apply conditions to restrict groups that appear in the
results of a SELECT query that uses GROUP BY?
The correct answer is: HAVING

● Which of the following SQL commands would be used to remove only the data from a
table named STUDENT while leaving the table structure intact?
The correct answer is: DELETE FROM STUDENT;

● Which of the following is ​not​ a standard data type used in SQL?


The correct answer is: Text

● A composite primary key can be defined using the CONSTRAINT phrase in which SQL
command?
The correct answer is: CREATE TABLE

● When the primary key of one relation is placed into a second relation, it is called a
________​.
The correct answer is: foreign key

● Which of the following data types used in SQL would define a numeric field of the pattern
99.99?
The correct answer is: Numeric(4,2)

● Which of the following SQL commands would be used to remove both the data and the
table structure of a table named STUDENT?
The correct answer is: DROP TABLE STUDENT;

● Which SQL keyword is used to specify a condition that rows must meet to be included in
the results of an SQL SELECT query?
The correct answer is: WHERE

● A table that meets the requirements of a relation is said to be in which normal form?
The correct answer is: First normal form

● Which of the following is the correct SQL clause to sort the results of a SELECT query in
reverse-alphabetic order using the Department field?
The correct answer is: ORDER BY Department DESC

● Which of the following is ​not​ true about primary keys?


The correct answer is: Primary keys must be a single attribute.

● Which SQL keyword is used to eliminate duplicate rows in the results of an SQL
SELECT query?
The correct answer is: DISTINCT

● During the normalization process, the remedy for a relation that is not well formed is to
________.
The correct answer is: break it into two or more relations that are well formed

● Which of the following data types used in SQL would define a fixed-length text field of 10
characters?
The correct answer is: Char(10)

You might also like