Please keep at least one language enabled. || కనీసం ఒక భాషను ఎంచుకోండి.
Question 1
ప్రశ్న 1
What is the principal purpose of a primary key in a relational table?
Explanation:
• A primary key consists of one column or a combination of columns whose values uniquely identify each row.
• Primary-key values must be unique and cannot be NULL.
• Its purpose is logical row identification, not physical storage positioning or display ordering.
• Primary-key values must be unique and cannot be NULL.
• Its purpose is logical row identification, not physical storage positioning or display ordering.
వివరణ:
Question 2
ప్రశ్న 2
A STUDENT table contains Student_ID, Name, Date_of_Birth and Course. Student_ID is guaranteed to be unique and non-NULL, while the other values can occur in multiple student records. Which is the most appropriate primary key?
Explanation:
• A primary key must uniquely identify every row and must not contain NULL values.
• Student_ID satisfies these requirements in the stated table.
• Names, dates of birth and courses can legitimately be shared by more than one student.
• Student_ID satisfies these requirements in the stated table.
• Names, dates of birth and courses can legitimately be shared by more than one student.
వివరణ:
Question 3
ప్రశ్న 3
Which statement about primary keys is correct?
Explanation:
• A table can have at most one primary key constraint.
• That primary key can consist of either one column or multiple columns acting together.
• A multi-column primary key is known as a composite primary key.
• That primary key can consist of either one column or multiple columns acting together.
• A multi-column primary key is known as a composite primary key.
వివరణ:
Question 4
ప్రశ్న 4
In an ENROLLMENT table, neither Student_ID alone nor Course_ID alone uniquely identifies a row, but the combination (Student_ID, Course_ID) does. What is this combination called when designated as the table's primary key?
Explanation:
• A composite primary key consists of two or more columns that jointly identify each row uniquely.
• In the example, the pair Student_ID and Course_ID uniquely identifies an enrollment.
• Neither component needs to be unique by itself when uniqueness is provided by their combination.
• In the example, the pair Student_ID and Course_ID uniquely identifies an enrollment.
• Neither component needs to be unique by itself when uniqueness is provided by their combination.
వివరణ:
Question 5
ప్రశ్న 5
What is the primary purpose of a foreign key in a relational database?
Explanation:
• A foreign key is a column or combination of columns that references a key in a related table.
• It establishes a logical relationship between rows of the referencing and referenced tables.
• Foreign-key constraints also help enforce referential integrity.
• It establishes a logical relationship between rows of the referencing and referenced tables.
• Foreign-key constraints also help enforce referential integrity.
వివరణ:
Question 6
ప్రశ్న 6
DEPARTMENT contains Department_ID values 10, 20 and 30 as its primary keys. EMPLOYEE.Department_ID is a foreign key referencing DEPARTMENT.Department_ID and does not allow NULL. Which new EMPLOYEE value would violate the foreign-key constraint?
Explanation:
• A non-NULL foreign-key value must correspond to an existing referenced key value.
• Department_ID values 10, 20 and 30 already exist in the parent DEPARTMENT table.
• Department_ID 40 has no matching parent row, so inserting it would violate the stated foreign-key constraint.
• Department_ID values 10, 20 and 30 already exist in the parent DEPARTMENT table.
• Department_ID 40 has no matching parent row, so inserting it would violate the stated foreign-key constraint.
వివరణ:
Question 7
ప్రశ్న 7
EMPLOYEE.Department_ID is a foreign key referencing DEPARTMENT.Department_ID. Can several employee rows contain the same Department_ID value?
Explanation:
• Foreign-key values do not normally have to be unique.
• In a one-to-many relationship, many employee rows can reference the same department row.
• The referenced Department_ID is unique in the parent table, but its value may be repeated in the child table.
• In a one-to-many relationship, many employee rows can reference the same department row.
• The referenced Department_ID is unique in the parent table, but its value may be repeated in the child table.
వివరణ:
Question 8
ప్రశ్న 8
Which statement about foreign keys in a relational table is correct?
Explanation:
• A table can contain multiple foreign-key constraints referencing different parent tables or relationships.
• The rule limiting a table to one primary key does not limit the number of foreign keys.
• Foreign keys may also be composite when the referenced key is appropriately composite.
• The rule limiting a table to one primary key does not limit the number of foreign keys.
• Foreign keys may also be composite when the referenced key is appropriately composite.
వివరణ:
Question 9
ప్రశ్న 9
One DEPARTMENT can contain many EMPLOYEEs, while each employee in this model belongs to one department. What type of relationship exists from DEPARTMENT to EMPLOYEE?
Explanation:
• One department can be associated with multiple employees.
• Each employee record refers to one department under the stated model.
• This is therefore a one-to-many relationship from DEPARTMENT to EMPLOYEE.
• Each employee record refers to one department under the stated model.
• This is therefore a one-to-many relationship from DEPARTMENT to EMPLOYEE.
వివరణ:
Question 10
ప్రశ్న 10
Which situation most clearly represents a one-to-one relationship?
Explanation:
• In a one-to-one relationship, one row in the first table corresponds to at most one row in the second and vice versa.
• A unique locker assigned to one employee satisfies this condition.
• Department-employees and customer-orders are one-to-many, while students-courses is commonly many-to-many.
• A unique locker assigned to one employee satisfies this condition.
• Department-employees and customer-orders are one-to-many, while students-courses is commonly many-to-many.
వివరణ:
Question 11
ప్రశ్న 11
STUDENT and COURSE have a many-to-many relationship: a student may take several courses and a course may contain several students. What is the standard relational-table organization for representing this relationship?
Explanation:
• A many-to-many relationship is commonly represented through an associative or junction table.
• ENROLLMENT can contain Student_ID and Course_ID foreign keys identifying each student-course association.
• This converts the many-to-many relationship into two manageable one-to-many relationships.
• ENROLLMENT can contain Student_ID and Course_ID foreign keys identifying each student-course association.
• This converts the many-to-many relationship into two manageable one-to-many relationships.
వివరణ:
Question 12
ప్రశ్న 12
An ENROLLMENT table contains Student_ID and Course_ID as foreign keys. The same student can join many courses and the same course can contain many students, but the same student-course pair must not occur twice. Which key is a suitable primary key for ENROLLMENT under this design?
Explanation:
• Student_ID alone cannot uniquely identify an enrollment because one student can appear in several course rows.
• Course_ID alone is also not unique because a course can contain several students.
• The combination of Student_ID and Course_ID uniquely identifies each student-course enrollment under the stated rule.
• Course_ID alone is also not unique because a course can contain several students.
• The combination of Student_ID and Course_ID uniquely identifies each student-course enrollment under the stated rule.
వివరణ:
Question 13
ప్రశ్న 13
Which statement best describes referential integrity in a relationship between a child table and a parent table?
Explanation:
• Referential integrity preserves valid relationships between referencing and referenced rows.
• A foreign-key constraint prevents invalid references to nonexistent parent keys, subject to the defined NULL rules.
• It can also restrict changes to referenced keys when those changes would leave invalid child references.
• A foreign-key constraint prevents invalid references to nonexistent parent keys, subject to the defined NULL rules.
• It can also restrict changes to referenced keys when those changes would leave invalid child references.
వివరణ:
Question 14
ప్రశ్న 14
ORDER.Customer_ID is a foreign key referencing CUSTOMER.Customer_ID. Existing ORDER rows refer to Customer_ID 25. Under a restrictive foreign-key relationship with no cascading delete configured, what normally happens if an attempt is made to delete Customer_ID 25 from CUSTOMER?
Explanation:
• Deleting the referenced parent row would leave existing child rows without a valid referenced customer.
• A restrictive foreign-key constraint prevents such an operation while dependent rows exist.
• Different behaviour can be explicitly configured, such as cascading actions, but the question states that no cascading delete is configured.
• A restrictive foreign-key constraint prevents such an operation while dependent rows exist.
• Different behaviour can be explicitly configured, such as cascading actions, but the question states that no cascading delete is configured.
వివరణ:
Question 15
ప్రశ్న 15
Which statement about a primary-key value is correct?
Explanation:
• A primary key uniquely identifies each row of its table.
• Primary-key columns cannot contain NULL values because the identifier must be present for every row.
• Referencing another table is the role normally associated with a foreign key, not a primary key.
• Primary-key columns cannot contain NULL values because the identifier must be present for every row.
• Referencing another table is the role normally associated with a foreign key, not a primary key.
వివరణ:
Question 16
ప్రశ్న 16
In relational terminology, which description best defines a candidate key?
Explanation:
• A candidate key is a minimal set of attributes capable of uniquely identifying each tuple or row.
• A table may have more than one candidate key, from which one can be selected as the primary key.
• Minimal means that no unnecessary attribute is included in the candidate key.
• A table may have more than one candidate key, from which one can be selected as the primary key.
• Minimal means that no unnecessary attribute is included in the candidate key.
వివరణ:
Question 17
ప్రశ్న 17
In a one-to-many relationship between CUSTOMER and ORDER, where one customer can place many orders and each order belongs to one customer, where is Customer_ID normally stored as a foreign key?
Explanation:
• In a typical one-to-many design, the child table on the many side stores the foreign key.
• ORDER.Customer_ID references CUSTOMER.Customer_ID and identifies the customer associated with each order.
• Many ORDER rows can therefore contain the same Customer_ID.
• ORDER.Customer_ID references CUSTOMER.Customer_ID and identifies the customer associated with each order.
• Many ORDER rows can therefore contain the same Customer_ID.
వివరణ:
Question 18
ప్రశ్న 18
Assertion (A): A many-to-many relationship between STUDENT and COURSE can be represented using an ENROLLMENT junction table.
Reason (R): Each ENROLLMENT row can contain foreign keys referencing one STUDENT and one COURSE, thereby representing the relationship through two one-to-many relationships.
Choose the correct answer.
Reason (R): Each ENROLLMENT row can contain foreign keys referencing one STUDENT and one COURSE, thereby representing the relationship through two one-to-many relationships.
Choose the correct answer.
Explanation:
• A junction table is the standard relational design for representing a many-to-many association.
• Each junction-table row references one row from each participating table through foreign keys.
• Both statements are true, and the Reason correctly explains how the junction table implements the relationship.
• Each junction-table row references one row from each participating table through foreign keys.
• Both statements are true, and the Reason correctly explains how the junction table implements the relationship.
వివరణ:
Question 19
ప్రశ్న 19
Match List I with List II:
List I
(a) Primary key
(b) Foreign key
(c) Composite key
(d) One-to-many relationship
List II
1. One parent row may be associated with several child rows
2. Column or columns referencing a key in a related table
3. Two or more columns used together as a key
4. Key selected to uniquely identify each row of a table
Choose the correct matching code.
List I
(a) Primary key
(b) Foreign key
(c) Composite key
(d) One-to-many relationship
List II
1. One parent row may be associated with several child rows
2. Column or columns referencing a key in a related table
3. Two or more columns used together as a key
4. Key selected to uniquely identify each row of a table
Choose the correct matching code.
Explanation:
• A primary key uniquely identifies rows, giving (a)-4.
• A foreign key references a key in a related table, giving (b)-2.
• A composite key uses multiple columns together, while one-to-many means one parent can relate to several child rows, giving (c)-3 and (d)-1.
• A foreign key references a key in a related table, giving (b)-2.
• A composite key uses multiple columns together, while one-to-many means one parent can relate to several child rows, giving (c)-3 and (d)-1.
వివరణ:
Question 20
ప్రశ్న 20
Consider the following statements about relational keys and relationships:
1. A table can have only one primary key constraint.
2. A primary key can consist of more than one column.
3. Every foreign-key value must be unique within the child table.
4. Several child rows can reference the same parent row in a one-to-many relationship.
Which statements are correct?
1. A table can have only one primary key constraint.
2. A primary key can consist of more than one column.
3. Every foreign-key value must be unique within the child table.
4. Several child rows can reference the same parent row in a one-to-many relationship.
Which statements are correct?
Explanation:
• Statements 1 and 2 are correct: a table has at most one primary key constraint, which may be composite.
• Statement 3 is false because foreign-key values may repeat, as occurs naturally on the many side of a one-to-many relationship.
• Statement 4 is therefore also correct, making Statements 1, 2 and 4 the correct combination.
• Statement 3 is false because foreign-key values may repeat, as occurs naturally on the many side of a one-to-many relationship.
• Statement 4 is therefore also correct, making Statements 1, 2 and 4 the correct combination.
వివరణ:
Answer Key సమాధానాల పట్టిక
-
Question 1 ప్రశ్న 1Answer: D. To uniquely identify each row in the table సమాధానం: D.
-
Question 2 ప్రశ్న 2Answer: B. Student_ID సమాధానం: B.
-
Question 3 ప్రశ్న 3Answer: A. A relational table can have only one primary key constraint, although that primary key may contain more than one column. సమాధానం: A.
-
Question 4 ప్రశ్న 4Answer: C. Composite primary key సమాధానం: C.
-
Question 5 ప్రశ్న 5Answer: B. To establish and help enforce a relationship between data in related tables సమాధానం: B.
-
Question 6 ప్రశ్న 6Answer: D. Department_ID = 40 సమాధానం: D.
-
Question 7 ప్రశ్న 7Answer: C. Yes, because multiple child rows may legitimately reference the same parent row. సమాధానం: C.
-
Question 8 ప్రశ్న 8Answer: A. A table can contain more than one foreign key, each potentially representing a different relationship. సమాధానం: A.
-
Question 9 ప్రశ్న 9Answer: A. One-to-many సమాధానం: A.
-
Question 10 ప్రశ్న 10Answer: C. Each employee being assigned at most one unique locker, with each locker assigned to at most one employee సమాధానం: C.
-
Question 11 ప్రశ్న 11Answer: D. Create an associative or junction table such as ENROLLMENT containing references to STUDENT and COURSE. సమాధానం: D.
-
Question 12 ప్రశ్న 12Answer: B. The composite key (Student_ID, Course_ID) సమాధానం: B.
-
Question 13 ప్రశ్న 13Answer: C. Foreign-key references must remain consistent with valid referenced key values in the parent table. సమాధానం: C.
-
Question 14 ప్రశ్న 14Answer: D. The deletion is rejected while dependent ORDER rows still reference that customer. సమాధానం: D.
-
Question 15 ప్రశ్న 15Answer: B. It must be unique for each row and cannot be NULL. సమాధానం: B.
-
Question 16 ప్రశ్న 16Answer: A. A minimal column or combination of columns capable of uniquely identifying each row and therefore eligible to be chosen as the primary key సమాధానం: A.
-
Question 17 ప్రశ్న 17Answer: A. In the ORDER table, which represents the many side of the relationship సమాధానం: A.
-
Question 18 ప్రశ్న 18Answer: D. Both Assertion and Reason are true, and Reason is the correct explanation of Assertion. సమాధానం: D.
-
Question 19 ప్రశ్న 19Answer: C. (a)-4, (b)-2, (c)-3, (d)-1 సమాధానం: C.
-
Question 20 ప్రశ్న 20Answer: B. 1, 2 and 4 only సమాధానం: B.
