Data and Database Concepts Flashcards

(23 cards)

1
Q

What is a database?

A

A structured set of data that is stored locally, on a server, or in the cloud.

Definition: Databases resemble spreadsheets but contain tables. Flat files are two-dimensional (rows and columns).
Boot Story: Imagine a filing cabinet where each drawer is a table and each folder is a record.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

When should we use a database?

A

When theres multiple concurrent users, for scalability, speed, a variety of data, or security is required.

Definition: Databases are better than flat files because they allow multiple users, handle large data sets, and store varied data securely.
Boot Story: Think of an office where everyone needs to access the same spreadsheet at once — a database makes this possible.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a relational database?

A

A database that uses tables with rows and columns to recognize relationships among stored information.

Definition: Relational Database Management Systems (RDBMS) manage these databases and allow adding, updating, and retrieving data.
Boot Story: Like linking customers, addresses, and cities in a real-world address book.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a schema in a relational DB?

A

The rules and structure of a database.

Definition: Schema defines how data is organized — tables, relationships, and constraints.
Boot Story: Like the blueprint of a house showing where each room (table) belongs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the difference between a record and an attribute?

A

A record is a row (horizontal), an attribute is a column (vertical).

Definition: Records store individual entries, attributes define the type of data stored in each column.
Boot Story: Think of a spreadsheet — rows are people, columns are their details.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a primary key?

A

A unique identifier for a record.

Definition: There can only be one primary key per record, ensuring uniqueness.
Boot Story: Like a student ID that uniquely identifies each student.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a foreign key?

A

A key that links two tables together.

Definition: Foreign keys create relationships between tables by pointing to a primary key in another table.
Boot Story: Like linking a student’s ID in the student table to their course ID in the course table.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a non-relational database?

A

A database that doesn’t use rows and columns.

Definition: Uses models optimized for unstructured (videos, pictures) or semi-structured (metadata-tagged) data.
Boot Story: Like a box of mixed media (photos, letters, videos) stored together, not in neat rows.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are examples of non-relational databases?

A

Redis, Dynamo DB, Microsoft Azure, Oracle NoSQL, Amazon, Memcached, Cosmos DB.

Definition: These are NoSQL databases designed for handling massive and flexible datasets.
Boot Story: Think of a big photo album app storing millions of pictures instantly.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are DB access methods?

A

Different ways to access a database — from direct table editing to GUIs and SQL queries.

Boot Story: Like different doors leading into the same building — some front doors, some back doors.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are examples of data manipulation commands?

A

SELECT, INSERT, DELETE, UPDATE.

Definition: DML (Data Manipulation Language) commands used to work with data in tables.
Boot Story: Think of managing a contact list: add a new person, delete an old one, or update their phone number.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does data definition do?

A

Defines the structure of a database and its tables.

Definition: DDL (Data Definition Language) includes CREATE, ALTER, DROP, and permissions.
Boot Story: Like laying the foundation and walls of a building before putting furniture inside.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are examples of data definition commands?

A

CREATE, ALTER, DROP, Permissions.

Definition: Used to set up or modify database structures.
Boot Story: Like adding, changing, or demolishing rooms in a house.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are two types of database backups?

A

Database Dump and Database Backup.

Definition: Dump is a one-time logical copy, Backup is repeatable, often physical, and used for restoration.
Boot Story: Like saving one copy of an essay (dump) versus setting automatic daily saves (backup).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is data manipulation vs data definition?

A

Data manipulation works with data, data definition works with structure.

DML edits contents, DDL defines tables and schema.
Boot Story: Like editing text in a Word document (DML) versus designing the template of the document (DDL).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

*

How does a database support multiple users?

A

By allowing concurrent access and secure handling of data changes.

Definition: Databases manage simultaneous queries without data corruption.
Boot Story: Like multiple tellers in a bank updating accounts at the same time.

17
Q

What does scalability mean in databases?

A

Ability to handle more users and larger datasets efficiently.

Definition: Databases perform better with scaling mechanisms compared to flat files.
Boot Story: Like upgrading a restaurant kitchen to serve more customers without slowing down.

18
Q

Which type of key ensures uniqueness in a table?

A

Primary Key.

Definition: Guarantees no duplicate rows in a table.
Boot Story: Like a fingerprint — unique to each person.

18
Q

What is a query language?

A

A language used to retrieve or input data from a database.

Definition: SQL and LDAP are common query languages.
Boot Story: Like asking a librarian to find a specific book from the shelves.

19
Q

What is data backup used for?

A

To restore a database in case of failure.

Definition: Backups can be scheduled and repeated to protect data integrity.
Boot Story: Like saving your phone photos to the cloud so you can recover them if the phone is lost.

20
Q

Which type of key connects different tables?

A

Foreign Key.

Definition: Establishes a relationship between two tables by referencing another table’s primary key.
Boot Story: Like linking a student’s record to their teacher’s record in a school system.

21
Q

How do relational databases differ from non-relational databases?

A

Relational use rows and columns with strict schema, non-relational handle unstructured or semi-structured data.

Definition: Relational = predictable, tabular. Non-relational = flexible, often NoSQL.
Boot Story: Like the difference between a neatly organized filing cabinet vs a box full of mixed documents.

22
Q

What is the difference between a dump and a backup?

A

Dump is one-time, backup is ongoing and scheduled.

Definition: Dump copies schema/data into another database, backup creates recoverable copies.
Boot Story: Like copying an assignment once (dump) versus auto-saving every version (backup).