Lecture 10 - Intro To DBs Flashcards
What is DBMS
- Definition: Software that interacts with the user, applications, and the database itself to capture and analyze data.
- Functions: Data storage, retrieval, and updating; ensuring data integrity and security; managing concurrency and transactions.
Advantages of Using a DBMS
Provides efficient, reliable, convenient and safe multi-user storage of and access to massive amounts of persistent data.
- massive: terabytes
- persistent
- safe: hardware, software, power
- multi-user: concurrency control
- convenient: physical date independence; high level query languages (declarative)
- efficient: thousands of queries / updates per second
- reliable
Data Models
- Defines the logical structure of a database, including tables, relationships, a set of records, XML, graph
Data Definition Language (DDL)
- used to define and set up the schema of a database. It includes commands like
CREATE
,ALTER
, andDROP
to create or modify database structures such as tables, indexes, and constraints.
Data Manipulation or Query Language (DDL)
- used to query and manipulate data within the database. It includes commands like
SELECT
,INSERT
,UPDATE
, andDELETE
to retrieve and modify data.
Normalisation
Process of organizing data to minimize redundancy.
ACID Properties
-
ACID Properties: Ensures reliable processing of database transactions:
- Atomicity: Transactions are all-or-nothing.
- Consistency: Transactions bring the database from one valid state to another.
- Isolation: Transactions do not interfere with each other.
- Durability: Once a transaction is committed, it remains so.
DBMS Implementer
Develops and maintains the database management system software.
Database Designer
Designs the the database schema and structure to meet organisational needs
Database Application Developer
Builds applications that interact with and operate on the database for data manipulation and retrieval.
Database Administrator (DBA)
Manages the operation, performance, and security of the database. Loads data and keeps the database running smoothly.
Relations (Tables) - RM
- A relation is a table in the database that contains data about a specific entity, such as customers, orders, or products.
- Each relation consists of a set of rows (also called tuples) and columns (also called attributes).
Attributes (Columns) - RM
- Attributes are the columns in a table that define the properties or characteristics of the entity. For example, in a “Customers” table, attributes might include
CustomerID
,Name
, andEmail
. - Each attribute has a specific data type, such as integer, string, or date, which determines the kind of data it can hold.
Tuples (Rows) - RM
- Tuples are the individual records or rows in a relation. Each tuple represents a single instance of the entity described by the table.
- For example, a tuple in the “Customers” table might contain the data for one specific customer.
Type - RM
- The type of an attribute defines the nature of the data it can store. Common types include
INTEGER
,VARCHAR
,DATE
, andBOOLEAN
. - The type is crucial for ensuring that the data in each attribute is consistent and valid.