1.
What does SQL stand for?
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.
2.
Using which language can a user request information from a database?
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.
3.
-To remove a relation from an SQL database, we use the ____ command.
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.
4.
Key to represent relationship between tables is called
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".
5.
In the ______ normal form, a composite attribute is converted to individual attributes.
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.
6.
Which of the following is not Armstrong's Axiom?
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.
7.
An entity set that does not have sufficient attributes to form a primary key is termed as _____.
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.
8.
In SQL the spaces at the end of the string are removed by ______ function.
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.
9.
Student(ID, name, dept, name, tot_cred)
In this query which attribute form the primary key?
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.
10.
The tuples of the relations can be of ______ order.
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.
11.
A domain is atomic if elements of the domain are considered to be ______units.
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.
12.
Course(course_id, sec_id, semester)
Here the course_id, sec_id and semester are _______ and course is a______.
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".
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.
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."
14.
For each attribute of a relation, there is a set of permitted values, called the _____of the attribute.
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.
15.
A relational database consists of a collection of
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.
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.
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.
17.
The DROP TABLE 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.
18.
Which of the following indicates the maximum number of entities that can be involved in a relationship?
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.
19.
With SQL, how do you select all the columns from a table named "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.
20.
With SQL, how can you return all the records from a table named "Persons" sorted descending by "FirstName"?
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.