What is a logical schema in a database?
Define a relational schema and give an example.
What is the difference between a candidate key and an alternate key?
Explain the role of a foreign key in a logical schema.
What is a domain in the context of a logical schema?
Answers and Descriptions:
Answer: A logical schema defines the structure of a database in terms of tables, columns, and relationships, independent of physical storage.
Description: It focuses on how data is logically organized (e.g., tables and keys) without detailing how it’s stored on disk, serving as a blueprint for the database.Answer: A relational schema describes the structure of tables, their attributes, and relationships. Example: Students(StudentID, Name, Age) with StudentID as the primary key.
Description: The schema outlines columns, data types, and constraints, forming the basis for implementing the database in a DBMS.Answer: A candidate key is any attribute (or set of attributes) that can uniquely identify tuples, while an alternate key is a candidate key not chosen as the primary key.
Description: For example, in a Students table, both StudentID and Email could be candidate keys, but if StudentID is the primary key, Email is an alternate key.Answer: A foreign key is an attribute in one table that references the primary key of another, establishing relationships.
Description: For example, in a Grades table, StudentID references the Students table’s primary key, ensuring data consistency across tables.Answer: A domain is the set of allowable values for an attribute in a table.
Description: For example, an Age attribute might have a domain of integers between 0 and 150, ensuring only valid data is entered, enhancing data integrity.
