Query Maestro - Round 1(Set 1)

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By QueryMaestro
Q
QueryMaestro
Community Contributor
Quizzes Created: 2 | Total Attempts: 346
Questions: 20 | Attempts: 201

SettingsSettingsSettings
Query Maestro - Round 1(Set 1) - Quiz

.


Questions and Answers
  • 1. 

    What does SQL stand for?

    • A.

      Structured Question Language

    • B.

      Strong Question Language

    • C.

      Structured Query Language

    • D.

      String Query Language

    Correct Answer
    C. Structured Query Language
    Explanation
    SQL stands for Structured Query Language. It is a programming language that is used to manage and manipulate relational databases. It allows users to create, modify, and retrieve data from databases, as well as perform various operations such as inserting, updating, and deleting records. SQL is widely used in the field of database management and is essential for working with data in a structured and organized manner.

    Rate this question:

  • 2. 

    Using which language can a user request information from a database?

    • A.

      Relational

    • B.

      Structural

    • C.

      Compiler

    • D.

      Query

    Correct Answer
    D. Query
    Explanation
    A user can request information from a database using the Query language. Query language allows users to retrieve, manipulate, and manage data stored in a database. It provides a standardized way to communicate with the database and perform various operations such as selecting specific data, updating records, and sorting information. By using the Query language, users can effectively interact with the database and retrieve the desired information based on their specific requirements.

    Rate this question:

  • 3. 

    -To remove a relation from an SQL database, we use the ____ command.

    • A.

      Delete

    • B.

      Remove

    • C.

      Drop table

    • D.

      Purge

    Correct Answer
    A. Delete
    Explanation
    To remove a relation from an SQL database, we use the "Delete" command. This command is specifically designed to delete data from a table in the database. It allows us to remove specific rows or all rows from a table, effectively removing the relation associated with that data. The other options mentioned in the question, such as "Remove," "Drop table," and "Purge," are not valid commands in SQL for removing a relation from a database.

    Rate this question:

  • 4. 

    Key to represent relationship between tables is called

    • A.

      Foreign Key

    • B.

      Primary Key

    • C.

      Super Key

    • D.

      Secondary key

    Correct Answer
    A. Foreign Key
    Explanation
    A foreign key is a key used to establish a relationship between two tables in a database. It is a column or a set of columns in one table that refers to the primary key in another table. This relationship ensures data integrity and enables the tables to be linked together. Therefore, the correct answer is "Foreign Key".

    Rate this question:

  • 5. 

    In the ______ normal form, a composite attribute is converted to individual attributes.

    • A.

      First

    • B.

      Second

    • C.

      Third

    • D.

      Fourth

    Correct Answer
    A. First
    Explanation
    In the first normal form, a composite attribute is converted to individual attributes. This means that instead of having a single attribute that stores multiple values, each value is stored in its own separate attribute. This helps to eliminate data redundancy and ensures that each attribute contains atomic values.

    Rate this question:

  • 6. 

    Which of the following is not Armstrong's Axiom?

    • A.

      Transitivity rule

    • B.

      Pseudotransitivity rule

    • C.

      Reflexive rule

    • D.

      Augmentation rule

    Correct Answer
    B. Pseudotransitivity rule
    Explanation
    The given correct answer, "Pseudotransitivity rule," is not Armstrong's Axiom. Armstrong's Axioms are a set of inference rules used in functional dependency theory to derive all functional dependencies in a relational database schema. The three main axioms are Reflexivity, Augmentation, and Transitivity. The Pseudotransitivity rule is not one of Armstrong's Axioms and is therefore the correct answer.

    Rate this question:

  • 7. 

    An entity set that does not have sufficient attributes to form a primary key is termed as _____.

    • A.

      Strong entity set

    • B.

      Variant set

    • C.

      Weak entity set

    • D.

      Variable set

    Correct Answer
    C. Weak entity set
    Explanation
    A weak entity set is an entity set that does not have sufficient attributes to form a primary key. Unlike a strong entity set, which has a unique identifier, a weak entity set relies on its relationship with a strong entity set to determine its identity. The primary key of a weak entity set includes the primary key of the related strong entity set, along with its own partial key. This ensures that the weak entity set is uniquely identified within the context of its relationship with the strong entity set.

    Rate this question:

  • 8. 

    In SQL the spaces at the end of the string are removed by ______ function.

    • A.

      Upper

    • B.

      Lower

    • C.

      String

    • D.

      Trim

    Correct Answer
    D. Trim
    Explanation
    The Trim function in SQL is used to remove any leading or trailing spaces from a string. So, in this case, the spaces at the end of the string will be removed by the Trim function.

    Rate this question:

  • 9. 

    Student(ID, name, dept, name, tot_cred) In this query which attribute form the primary key?

    • A.

      Name

    • B.

      ID

    • C.

      Tot_cred

    • D.

      Dept

    Correct Answer
    B. ID
    Explanation
    The attribute "ID" forms the primary key in the given query. The primary key is a unique identifier for each record in a database table, and it ensures the uniqueness and integrity of the data. In this case, the "ID" attribute is most likely a unique identifier for each student, making it suitable to be the primary key.

    Rate this question:

  • 10. 

    The tuples of the relations can be of  ______ order.

    • A.

      Same

    • B.

      Sorted

    • C.

      Any

    • D.

      Constant

    Correct Answer
    C. Any
    Explanation
    The tuples of the relations can be of any order. This means that the tuples can have any number of attributes or fields. There is no restriction on the number of attributes that a tuple can have in a relation.

    Rate this question:

  • 11. 

    A domain is atomic if elements of the domain are considered to be ______units.

    • A.

      Different

    • B.

      Indivisible

    • C.

      Constant

    • D.

      Divisible

    Correct Answer
    B. Indivisible
    Explanation
    An atomic domain refers to a domain where its elements are considered to be indivisible units. This means that the elements cannot be divided or broken down into smaller parts. In this context, the correct answer is "Indivisible" as it accurately describes the characteristic of an atomic domain.

    Rate this question:

  • 12. 

    Course(course_id, sec_id, semester) Here the course_id, sec_id and semester are _______ and course is a______.

    • A.

      Relations,Attribute

    • B.

      Tuple,Relation

    • C.

      Attributes, Relation

    • D.

      Tuple, Attributes

    Correct Answer
    C. Attributes, Relation
    Explanation
    In the given question, the attributes are course_id, sec_id, and semester, which are the characteristics or properties of the relation "Course". The relation "Course" represents a collection of tuples or rows that contain information about different courses. Therefore, the correct answer is "Attributes, Relation".

    Rate this question:

  • 13. 

    Database ________ which is the logical design of the database, and the database _____which is a snapshot of the data in the database at a given instant of time.

    • A.

      Instance, Schema

    • B.

      Relation, Schema

    • C.

      Relation, Domain

    • D.

      Schema, Instance

    Correct Answer
    D. Schema, Instance
    Explanation
    In a database, the schema refers to the logical design of the database, including the structure, organization, and relationships between the data elements. It defines the tables, columns, data types, constraints, and other attributes of the database. On the other hand, an instance of a database is a snapshot of the data in the database at a specific moment in time. It represents the actual data stored in the database at that particular instant. Therefore, the correct answer is "Schema, Instance."

    Rate this question:

  • 14. 

    For each attribute of a relation, there is a set of permitted values, called the _____of the attribute.

    • A.

      Relation

    • B.

      Domain

    • C.

      Set

    • D.

      Schema

    Correct Answer
    B. Domain
    Explanation
    The term "domain" refers to the set of permitted values for each attribute of a relation. In other words, it represents the range of values that an attribute can take within a relation. The domain helps define the type and constraints of the data that can be stored in a specific attribute. It ensures that only valid and meaningful values are allowed for each attribute in a relation.

    Rate this question:

  • 15. 

    A relational database consists of a collection of 

    • A.

      Records

    • B.

      Tables

    • C.

      Fields

    • D.

      Keys

    Correct Answer
    B. Tables
    Explanation
    A relational database consists of tables, which are used to organize and store data. Tables contain rows, also known as records, which represent individual instances or entries in the database. Each record is made up of fields, which store specific pieces of information. Keys are used to uniquely identify each record within a table. Therefore, the correct answer is "Tables" as they are the main structure in a relational database that hold the data.

    Rate this question:

  • 16. 

    A ________ is a special kind of a store procedure that executes in response to certain action on the table like insertion, deletion or updation of data.

    • A.

      Triggers

    • B.

      Functions

    • C.

      Procedures

    • D.

      None of the above

    Correct Answer
    A. Triggers
    Explanation
    Triggers are a special kind of store procedure that execute in response to certain actions on a table, such as insertion, deletion, or updating of data. They are used to enforce business rules, maintain data integrity, and automate tasks. When a trigger is activated, it can perform a series of actions, such as inserting or updating data in other tables, sending notifications, or performing calculations. Therefore, triggers are the correct answer in this case.

    Rate this question:

  • 17. 

    The DROP TABLE statement :

    • A.

      Deletes the table structure only

    • B.

      Works whether or not referential integrity constraints would be violated

    • C.

      Deletes the table structure along with the table data

    • D.

      Is not an SQL statement

    Correct Answer
    C. Deletes the table structure along with the table data
    Explanation
    The DROP TABLE statement is used to delete a table from a database. It not only deletes the table structure but also deletes all the data stored in the table. This means that all the rows and columns within the table will be permanently removed. It is a valid SQL statement and can be used to effectively remove a table and its associated data from the database.

    Rate this question:

  • 18. 

    Which of the following indicates the maximum number of entities that can be involved in a relationship?

    • A.

      Greater Entity Count(GEC)

    • B.

      Minimum cardinality

    • C.

      ERD

    • D.

      Maximum cardinality

    Correct Answer
    D. Maximum cardinality
    Explanation
    Maximum cardinality indicates the maximum number of entities that can be involved in a relationship. It represents the upper limit of the number of entities that can participate in a relationship. In an entity-relationship diagram (ERD), the maximum cardinality is typically represented by a symbol such as "1" for one entity, "N" for any number of entities, or a specific number indicating the maximum count. This helps in defining the scope and constraints of the relationship between entities in a database system.

    Rate this question:

  • 19. 

    With SQL, how do you select all the columns from a table named "Persons"?

    • A.

      SELECT [all] FROM PERSONS

    • B.

      SELECT * FROM Persons

    • C.

      SELECT *.Persons

    • D.

      SELECT Persons

    Correct Answer
    B. SELECT * FROM Persons
    Explanation
    The correct answer is "SELECT * FROM Persons". This query selects all the columns from the table named "Persons". The asterisk (*) is a wildcard character that represents all columns in the table. By using this query, all the data from all columns will be retrieved from the "Persons" table.

    Rate this question:

  • 20. 

    With SQL, how can you return all the records from a table named "Persons" sorted descending by "FirstName"?

    • A.

      SELECT * FROM Persons ORDER FirstName DESC

    • B.

      SELECT * FROM Persons SORT 'FirstName' DESC

    • C.

      SELECT * FROM Persons ORDER BY FirstName DESC

    • D.

      SELECT * FROM Persons SORT BY 'FirstName' DESC

    Correct Answer
    C. SELECT * FROM Persons ORDER BY FirstName DESC
    Explanation
    The correct answer is "SELECT * FROM Persons ORDER BY FirstName DESC". This query will retrieve all the records from the "Persons" table and sort them in descending order based on the "FirstName" column. The "ORDER BY" clause is used to specify the sorting order in SQL queries.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 14, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Feb 26, 2019
    Quiz Created by
    QueryMaestro

Related Topics

Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.