2) Introduction to DBS Flashcards
What is a traditional file based system?
A method where each program stores its own data in files, usually text files or binary files, without a central database.
What are the flaws of traditional file based systems?
- Data redundancy
- Data inconsistency
- Poor data sharing
- No security
- Difficult maintenance
- Chaos, inefficiency, errors, high maintenance costs
What does data redundancy refer to in traditional file based systems?
Same data might be stored in multiple files.
What does data inconsistency mean?
There exist different versions of the same data.
What is meant by poor data sharing?
It is hard to access and update data across systems.
True or False: Traditional file based systems provide high security.
False
What are the key challenges addressed by databases?
- Structured data representation
- Efficient data access
- Integrity and consistency
- Secure access
- Concurrent usage
What is a database (DB)?
A collection of related data.
What does a database specify?
The data types, structures and constraints of data to be stored.
What is a Database Management System (DBMS)?
A collection of software programs for defining, constructing, and manipulating a database.
What are the three main functions of a DBMS?
- Defining
- Constructing
- Manipulating
Fill in the blank: A DBMS is responsible for _______ what data will be stored and what are the types, constraints, structures.
[defining]
Fill in the blank: The DBMS is responsible for physically _______ data on disk.
[constructing]
What does manipulating data in a DBMS involve?
- Querying
- Modifying data (insert, update, delete)
What is a database system (DBS)?
Database (DB) + software (DBMS)
A database system includes both the database and the software that manages it.
What does the system catalog (metadata) describe?
The structure of the database
Metadata is stored in the system catalog and is part of the DBMS.
What are the components included in the system catalog?
- Table names
- Column names
- Data types
- Constraints
- Relationships between tables
- Indexes
- Views
- Triggers and stored procedures
Each component plays a crucial role in defining the structure and behavior of the database.
What are constraints in a database?
- Primary keys
- Foreign keys
- Not null
- Unique
Constraints enforce rules on the data to maintain integrity.
What is the purpose of indexes in a database?
To optimize searches and make them faster
Indexes provide a way to quickly locate data without scanning the entire database.
What are views in a database?
Virtual tables created by querying one or more tables
Views do not hold data themselves but present data as if it were a table.
What are triggers and stored procedures?
Automatic actions based on conditions or pre-written logic
They help manage the database by executing actions automatically or running complex tasks.
What does constructing a database refer to?
Storing the data itself
This is the foundational step in creating a functional database.
What does manipulating the database involve?
- Querying to retrieve data
- Updating values
Manipulation allows users to interact with the data stored in the database.
What is an example of querying a database?
SELECT
The SELECT statement is used to retrieve specific data from a database.