Database Theory and Design Flashcards
What is a database?
An organised collection of related data.
What is a DBMS?
Software that manages &controls access
to the database
What is a database application?
A program that interacts with the database.
What are the disadvantages of file-based systems?
Data Duplication. Data dependence. Incompatible file formats. Fixed queries/proliferation of application programs.
What are the differences between Database Systems and File-based systems.
In the file-based approach, each application program defines and manages its own data.
While in the database approach, a shared database is stored to control the redundancy and ensure the data consistency and integrity.
In the file-based approach, each application program directly accesses the data.
While in the database approach, all applications access the database through DBMS which provides a few important access control facilities.
What is the three level architecture of a DB?
External - Describes what part of the database that is relevant to each user.
Conceptual - Describes what data is stored in the database and the relationships among the data.
Internal - Describes how the data is stored in the DB. Physical representation of the DB.
What is data independence?
Data independence is the capacity that upper levels are unaffected by changes to lowerlevel.
What are the two kinds of data independence?
Physical and Logical. Physical/Logical is the ability to make changes to the physical storage structures/logical structure without affecting application programs that access the data.
Which model is the most popular logical data model?
The Entity-Relationship Model.
What is Database Scheme and Database State?
The database schema is the design of the database. It represents the organisation of data and the relationships between different elements. The database state represents the actual data stored in the database in a particular point in time.
What are the 4 components of an er model?
Entity, Relationship, Attribute, Multiplicity Constraint.
What is a weak entity?
A weak entity is an entity in a database that does not have a primary key attribute of its own and is dependent on another entity.
What is aggregation?
An abstraction through which relationships are treated as higher-level entities.
What is a relation?
A 2d table that has specific characteristics.
What is Entity Integrity?
Entity Integrity ensures that row in a tuple is uniquely identified by a unique primary key.
What is Referential Integrity?
Referential Integrity ensures the consistency of relationships through foreign keys. Each foreign key refers to the primary key of another table.
What are Domain Constraints?
Domain Constraints ensure that values stored in a database conform to predefined data types and constraints.
What are the main objectives of normalisation?
Remove redundancy, and remove potential for insert, update and delete anomalies.
What is a functional dependency?
When the value of one attribute is determined by the value of another attribute.
What is a transitive dependency?
this occurs when a functional dependency indirectly influences another attribute through a chain of dependencies. For example if A is needed for B, and B is needed for C, then C has a transitive dependency on A.
What is a partial functional dependency?
when a non pk attribute is functionally dependent on a part, but not the whole, of a composite pk.
How does select work in relational algebra?
It selects all tuples that satisfy the condition from a relation.
How does projection work in relational algebra?
Produces a new relation with only some of the attributes from an old relation. Removes duplicate tuples.
How does rename work in relational algebra?
Renames a relation to another name.