Unit 2 Exploring Databases and SQL
cheatsheet1999 opened this issue · 0 comments
cheatsheet1999 commented
Knowledge Check: Relational Algebra 1
- Given two tuple sets (A with 10 elements and B with 5 elements), what is the maximum number of tuples in the union of these sets?
- 10
- [Correct] 15 (The maximum number of tuples is achieved when there are no common elements between A and B)
- 5
- 50
- Which mathematical operator must be used in order to display information about students who are majoring in Computer Science but not in Electrical Engineering?
- [Correct] Difference (The difference operator displays the requested information)
- Intersection
- Union
- Cartesian Product
- Which statement about the selection operator is true?
- [Correct] It filters certain tuples in a relation based on given criteria. (This is the function of the selection operator)
- It filters certain attributes in a relation based on given criteria.
- It requires more than one relation as its input.
- It requires more than one database as its input.
Knowledge Check: Relational Algebra 2
- Consider a relation, STUDENT, with the following attributes: Name, ID number, Major, Graduation Year, and GPA. Consider a query using this relation: “List the names and ID numbers of students majoring in Computer Science.” Which operator is absolutely necessary for this query?
- Intersection
- Union
- Difference
- [Correct] Projection (The projection operator is necessary to display the two attributes, name, and ID number, in the query)
- Consider two sets: A with 10 tuples, and B with 5 tuples. What is the maximum number of tuples that the intersection of A and B can have?
- 15
- [Correct] 5 (The number of tuples in the intersection must be less than the minimum number of tuples in A and B)
- 50
- 10
- What is the ϴ-Join operation used for?
- To join two tuples in the same relation.
- To join two attributes in the same relation.
- To join two databases.
- [Correct] To join two relations in a database.
- Which statement about the selection operator is correct?
- It displays certain tuples based on given criteria. (This is the output of the selection operator)
- It displays certain attributes based on given criteria.
- It requires more than one relation.
- It requires more than one attribute.
Unit 1 & 2: Graded Quiz
- Which of the following is NOT one of the levels of abstraction for databases?
- Physical Schema
- Conceptual Schema
- [Correct] Filesystem Schema
- Views
- Table descriptions are an example of ______ level documentation.
- Physical Schema
- Views
- Filesystem Schema
- [Correct] Conceptual Schema
- A particular query that pulls information from one or more tables is an example of a:
- [Correct] View
- Conceptual Schema
- Physical Schema
- Relation
- Which of the following database types is most oriented toward storing well-structured data?
- NoSQL Database
- Hadoop
- [Correct] Relational Database
- Spark
- What major advantage do NoSQL database systems have?
- [Correct] NoSQL database systems can deal with unstructured data
- NoSQL database systems data is highly structured
- NoSQL database systems bundle massive scale well
- NoSQL database systems are good for operational data.
- In an ER Diagram, a diamond shape indicates what?
- An attribute
- [Correct] A relationship
- A constraint
- An entity
- A participation constraint is indicated how in an ER diagram.
- A dotted line
- A dashed line
- A line
- [Correct]A bold line
- Consider the query: ∏𝑎,𝑏(𝜎𝑐=2(𝑧∪𝑦)) What does the query return?
- [Correct] Fields a and b of the rows from z and y where c=2.
- Fields a, b, c or the rows from the intersection of z and y where c=2.
- Fields a,b, and c of the rows from y and z where c=2.
- Fields a and b of the rows from the intersection of z and y where c=2.
- What does the relational algebra operator ‘x’ indicate?
- The union of the two tables.
- [Correct] All possible pairs from the two tables.
- All pairs from the two tables matched on a specified field.
- The intersection of the two tables.
- Of the three elements in the basic SQL query, which is the only optional one?
- FROM
- [Correct] DISTINCT
- SELECT
- WHERE
- Massive scale analytics merely require which type of database system?
- [Correct] Hadoop, Spark, or similar
- MongoDB
- Oracle
- NoSQL
- The basic formula for an SQL query is:
[Correct] SELECT, FROM, WHERE
TARGET, RELATION, DISTINCT
DISTINCT, FIELD, ID
DISTINCT FROM QUALIFICATION