Relationals Flashcards
Relational Database
type of database that stores and provides access to data points that are related to one another. It organizes data into tables which can be linked by defining relationships between the tables.
Relational Model
framework for managing databases where data is stored in tables composed of rows and columns. It establishes how data can be related to each other and manipulated using operations that maintain these relationships
What is CRUD?
refers to the four fundamental operations: Create, involves in adding new data entries to the database, Read, allows retrieving or accessing existing data, Update, modifies existing data entries, and Delete removes unwanted data from the database. These operations form the backbone of database manipulation and are crucial for effectively managing and maintaining data integrity.
Data Model
A conceptual representation of how data is organized and structured within the database. It defines the relationship between different data elements, such as tables, attributes, and their constraints. A blueprint for designing and implementing a database system, outlining how data is stored, accessed, and manipulated.
What is Table Indexing
Method to speed up data retrieval. It creates special lists sorted by certain column values, making it faster for the database to find specific data.
What is a primary key and its purpose
primary key is a column or a set of columns that uniquely identifies each record in a table. It must have a unique value for each row and cannot contain NULL values. Ensures data integrity by preventing duplicate or null values in the key columns. Serves as a reference point for establishing relationships with other tables
What is a Foreign key and its purpose
A foreign key is a column or set of columns in a table that establishes a link or relationship with a primary key in another table. It ensures referential integrity by enforcing a relationship between the data in two tables.
What is Entity Integrity in database?
Entity integrity ensures that each row or record in a database table is unique and accurately represents a distinct entity or object. It prevents duplicates or inconsistent data within a table.
What is referential integrity in database?
Referential integrity ensures that relationships between tables are maintained accurately. This means that foreign key values in one table must correspond to primary key values in another table. It guarantees the reliability and coherence of data relationships within a database.
What is Database Recovery?
Database recovery refers to the process of restoring a database to a consistent state after a failure or a system crash. It involves techniques such as rollback to bring the database back to the original state it was in before the failure occurred.
What is Rollback in database operation?
Rollback undoes or cancels the effects of an incomplete or aborted transaction. When a transaction encounters an error or is explicitly rolled back by the user, the db management reverts any changes made by the transaction to ensure data consistency and integrity.
What is Database log and its purpose?
Database log is a record of all changes made to the database. It stores chronological sequence of transactions, including details such as the operations performed, the affected data, and the before and after values of the data.
What is a transaction in database?
A transaction is a unit of work or a sequence of database operations that are executed as a single logical unit. Transactions ensure data integrity by either completing successfully and committing all changes, or failing and rolling back all changes if an error occurs. ACID properties characterize transactions.
What is SQL (Structured Query Language)?
SQL is a standard programming language used to manage and manipulate a relational database. It provides a way to interact with the database by performing various operations such as querying data, inserting, updating, and deleting records, defining database structures, and controlling access to the database.
Summary of SQL Queries
SELECT (attribute list)
FROM (table list)
WHERE (condition)
GROUP BY (grouping attribute(s)
HAVING (group condition)
ORDER BY (attribute list)