1. Introduction Flashcards
What is a database?
- A collection of inter-related data
- A logically coherent collection of data with some inherent meaning
- A representation of some aspect of the real world
What is a database management system?
- A database
* A set of programs to access, manipulate and present the data
What is the goal of a database management system?
- A means to store and retrieve data
* In a convenient and efficient way
What are database applications?
A computer program whose primary purpose is entering and retrieving information from a database
Before database management systems, how were database applications accessed and manipulated?
- Built on top of file systems
- Data was stored in files
- Custom programs were written to access/update data in files
What are the disadvantages of using a file system for database applications? (7)
- Data redundancy and inconsistency, duplication of information in different files
- Difficulty in accessing data, new programs would need to be written to carry out new tasks
- Data isolation, multiple files and formats
- Integrity problems, hard to add new constraints or change existing ones
- Atomicity of updates, failures may leave database in an inconsistent state
- Concurrent access by multiple users, where uncontrolled concurrent access can lead to inconsistencies
- Security problems, hard to provide user access to some but not all data
What are the advantages of using a database management system for database applications? (4)
- Efficient, for large amounts of data
- Convenient, being able to abstract data
- Flexible, being able to customise access and constraints
- Safe, prevent unauthorised access
What are the levels of database abstraction? (3)
- Physical level, describes how a record is stored
- Logical level, describes data and relationships between data stored in the database
- View level, provides selected aspects of data conveniently and can hide details
What is a schema?
- The overall design of the database (data type)
- Physical schema, database design at the physical level
- Logical schema, database design at the logical level
- Changes are infrequent
What is an instance?
- Content of the database at a particular point in time (data value)
- Changes may be frequent
What is meant by ‘physical data independence’?
Ability to change the physical schema (how the data is stored) without affecting the logical schema
Why might you need ‘physical data independence’? (2)
- Internal schema may change to improve performance
* Application programs depend on logical schema
What is meant by ‘logical data independence’?
Ability to change the logical schema (what data is stored and how they relate) without having to modify the application programs which make use of them
Why might you need ‘logical data independence’?
• So you can add/delete entities or relationships
What is DDL?
- Data Definition Language
- Language for defining database schema
- Compiled schemas are stored in Data Dictionary which contains meta-data