Schema | Instance Flashcards
(15 cards)
What is a schema in DBMS?
A schema is the logical structure or blueprint of a database. It defines how data is organized, including tables, fields, data types, and relationships.
What is an instance in DBMS?
An instance refers to the actual data stored in the database at a specific moment in time. It represents the current state of the database.
What is the difference between schema and instance?
Schema is the design or structure of the database, while instance is the actual data stored in the database at a given time.
What are the types of schema in DBMS?
The types of schema are: 1. Physical Schema (how data is stored physically), 2. Logical Schema (logical structure of the database), and 3. View Schema (user-specific views of the database).
What is schema evolution?
Schema evolution refers to the process of modifying the database schema over time, such as adding new tables or columns, to accommodate changing requirements.
What is an instance snapshot?
An instance snapshot is a copy of the database instance at a specific point in time, often used for backups or auditing purposes.
What is logical data independence?
Logical data independence is the ability to change the logical schema (e.g., adding a new column) without affecting the application programs or external schemas.
What is physical data independence?
Physical data independence is the ability to change the physical schema (e.g., storage structures) without affecting the logical schema or application programs.
Why is schema important in DBMS?
Schema is important because it provides a structured framework for organizing data, ensuring data integrity, and defining relationships between data elements.
What happens if the schema changes frequently?
Frequent schema changes can lead to data inconsistencies, application errors, and increased maintenance overhead. Proper planning is required to minimize disruptions.
What is a view schema?
A view schema represents a user-specific or application-specific view of the database, often created to simplify data access or restrict access to sensitive information.
Can an instance exist without a schema?
No, an instance cannot exist without a schema. The schema defines the structure, and the instance is the data that conforms to that structure.
What is the role of constraints in a schema?
Constraints in a schema enforce rules on the data, such as primary keys (uniqueness), foreign keys (relationships), and data type validations, ensuring data integrity.
What is the difference between logical schema and physical schema?
Logical schema defines the logical structure of the database (e.g., tables and relationships), while physical schema describes how the data is stored physically (e.g., files and indexes).
How does schema evolution impact database performance?
Schema evolution can impact performance if not managed properly. For example, adding indexes or partitioning tables can improve performance, while poorly designed changes can degrade it.