Week 1 practive quiz Flashcards
Which of the following is a correctly formatted database query?
1) What will be the temperature in New York City tomorrow?
2) Is there a correlation between oil prices and temperature?
3) What is the name of the student with ID number 2357?
4) What is the best U.S. state for retirement?
3) What is the name of the student with ID number 2357?
his is a correctly formatted database query.
What is the role of a relationship in a database?
1) It connects two attributes.
2) It connects two entities.
3) It is part of a relation.
4) It helps users connect to a remote database.
2) It connects two entities.
Two entities are connected by one relationship.
- Which of the following can be an entity name in a database?
1) Age
2) First Name
3) Gender
4) Student
4( Student
First Name cannot be an entity name because it is a characteristics with single value.
Entity = table
What is required in order to use the cartesian product operator on two relations?
1) There must be at least one common attribute in the two relations.
2) The number of attributes in each relation must be the same.
3) The number of tuples in each relation must be the same.
4) It can be applied to any two relations without a requirement.
4) It can be applied to any two relations without a requirement.
The cartesian product does not require any condition.
- Consider two relations A and B in a database. Relation A has 5 rows and relation B has 3 rows. How many rows are produced if we apply the cartesian product operation to A and B?
1) 15
2) 8
3) 3
4) 5
1) 15
The number of rows created by the cartesian product is found by multiplying the number of rows in each relation.
Which mathematical operator must be used in order to display information about students who are majoring in Computer Science but not in Electrical Engineering?
1) Cartesian Product
2) Union
3) Intersection
4) Difference
4) Difference
The difference operator displays the requested information.
- Which statement about the selection operator is true?
1) It requires more than one database as its input.
2) It filters certain attributes in a relation based on given criteria.
3) It filters certain tuples in a relation based on given criteria.
4) It requires more than one relation as its input.
3) It filters certain tuples in a relation based on given criteria.
The selection operator specifies tuples in a relation, not its attributes.
- Which mathematical operator must be used in order to display information about students who are majoring in both Computer Science and Electrical Engineering?
1) Intersection
2) Cartesian Product
3) Difference
4) Union
1) Intersection
The union operator will display information about students who are majoring in either Computer Science or Electrical Engineering or both.
Which mathematical operation must be completed before the ϴ-Join operation?
1) Multiplication
2) Intersection
3) Cartesian product
4) Union
3) Cartesian product
The ϴ-Join operation requires cartesian product.
For which of the following functions require database management software because typical spreadsheet software cannot implement it?
1) Search data
2) Create multiple user types
3) Update data
4) Store data
2) Create multiple user typDatabase management software can create multiple user types, but spreadsheet software cannot.
What connects two entities in a database?
1) Record
2) Relation
3) Table
4) Relationship
4) Relationship
Two entities are connected by a relationship.
What is the name of the operation used for joining two relations?
1) ⋈-Join
2) ϴ-Join
3) β-Join
4) α-Join
2) ϴ-Join
This is the name of the operation used for joining two relations.
- Which operator must be used to display information about students majoring in Mathematics or Physics
1) Union
2) Difference
3) Cartesian Product
4) Intersection
1) Union
The union operator displays information about students majoring in either Mathematics, Physics, or both.
The intersection operator displays information about students who are majoring in both areas.
Which of the following two operators must be used one after another?
1) Cartesian Product, ϴ-Join
2) B: Union, ϴ-Join
3) Multiplication, ϴ-Join
4) Cartesian Product, Multiplication
these two operators can be implemented independently.
NOT 2) B: Union, ϴ-Join
What must be listed after the SELECT command in a SQL query?
1) Attributes
2) Tables
3) Records
4) Conditions
1) Attributes
The SELECT command requires one or more attributes to be listed.