Database
Keys
Relationships
ERD and DML
Query
100

What is a Database?

It's a structured representation of data that we can read from and write to.

100

What are keys?

A field, or combination of fields used to retrieve and sort rows in the table based on certain requirements

100

One-to-one relationship?

Each record in one of the tables maps to only one record in the other table.

each employee only has one office, and each office only has one employee

100

What does ERD stand for?

entity relationship diagram

100

What's a query?

query is a request for data from a database

200

What is a Relational Database?

Relational databases are structured so that they organize data into tables or relations, where each table represents a logical group of data.

200

What is a super key?

Super Key - is a set of attributes that uniquely identifies each tuple of a relation

200

many-to-one relationship?

a row in table A is related to multiple rows in B. But a row in table B is only related to one row in A

Example:

department employs many employees, but each employee is only related to one department

200

Name 5 ERD components

tables

fields in each table

metadata about each field

id of  all primary and foreign key fields 

relationship between each table

200

What is a sub-query?

subquery is a query that is query inside of another query, used to make queries in multiple steps

300

Database Vs. DBMS

DBMS is a software system that manages databases. It can execute commands, provide security, network access, and admin tools for Database Administrators (DBAs)

300

What is a primary key?

a column or group of columns in a table that uniquely identifies every row in that table.

300

many-to-many relationship?

Multiple records in a table are related to multiple records in another table.

A person can be enrolled in multiple courses, and each course has multiple people enrolled in it

300

What is DML?

Data Manipulation Language is a subset of SQL.

300

What does SELECT do?

SELECT is a type of query. We can use it to retrieve data from a database

400

Explain ACID compliance

databases that are designed to withstand unexpected failures without corruption, using concepts of Atomicity, Consistency, Isolation, and Durability.

400

What is a compound key?

combining multiple columns to create a unique identifier for a specific record

400

self-referencing relationship?

occurs when a column in a table relates to another column in the same table.

400

What is ERD of a database?

A diagram showing relationship between multiple components in a database

400

What does JOIN do?

JOIN clause is an optional part of a SELECT. It can join multiple tables based on related columns.

500

Explain Replication and Scaling

Replication: process of creating various resources and dividing the work between them, which ultimately improves the performance of the overall cluster of servers.

Scaling: Scaling, usually means scaling horizontally, means dividing work between existing servers.

500

What is a surrogate key?

 a field that is created specifically to identify each record in a database but has no other purpose in the table.

500

What are aggregates?

Aggregates are single values calculated from many values. for example sum()

500

Name 4 DML Commands

Commands to read, insert, update and delete data

500

What is GROUP BY?

 GROUP BY clause allows us to further partition a result and calculate aggregates per partition

M
e
n
u