Relational Databases Flashcards

(81 cards)

1
Q

What is data?

A

Unorganised information that becomes meaningful after processing (facts, numbers, text, images, etc.)

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

What are the three main types of data structures?

A

Structured, Unstructured, Semi-structured

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

What is structured data?

A

Data organised in tables with rows and columns and a fixed schema

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

Give two examples of structured data

A

Excel spreadsheets, SQL tables

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

What is unstructured data?

A

Data with no predefined format or structure

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

Give two examples of unstructured data

A

Text documents, images, videos, social media posts

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

What is semi-structured data?

A

Data with some organisation using tags or keys but not rigid tables

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

Give two examples of semi-structured data

A

JSON files, XML files, emails

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

What is a CSV file?

A

A comma-separated values text file used to store tabular data

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

What is a TSV file?

A

A tab-separated values text file

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

What is a relational database?

A

A database that stores structured data in related tables

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

What does RDBMS stand for?

A

Relational Database Management System

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

Give two examples of relational databases

A

MySQL, SQL Server, Oracle, IBM DB2

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

What is OLTP used for?

A

Daily business transactions and operations

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

What is OLAP used for?

A

Analysing large datasets for reporting and insights

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

What is a non-relational database?

A

A flexible database used for semi-structured or unstructured data

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

Give two examples of NoSQL databases

A

MongoDB, Cassandra, Redis

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

What is an information model?

A

A high-level abstract representation of entities, relationships, and business rules

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

What is a data model?

A

A technical blueprint for how data is stored in a database

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

Who uses information models?

A

Business analysts and stakeholders

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

Who uses data models?

A

Database designers and developers

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

What is the hierarchical model?

A

A physical database model that stores data in a tree structure

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

Name two problems with the hierarchical model

A

Poor support for many-to-many relationships, data redundancy

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

What is an ERD?

A

A diagram showing entities and relationships in a database

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What does ERD stand for?
Entity Relationship Diagram
26
What shape represents an entity in an ERD?
Rectangle
27
What shape represents an attribute?
Oval
28
What shape represents a relationship?
Diamond or labelled line
29
What is crow’s foot notation?
A symbol system used to show relationship types and quantities
30
What is a one-to-one relationship?
Each entity is linked to exactly one other entity
31
What is a one-to-many relationship?
One entity links to many others
32
What is a many-to-many relationship?
Many entities link to many entities
33
When mapping ERDs to tables, what does an entity become?
A table
34
When mapping ERDs to tables, what does an attribute become?
A column
35
What is a primary key?
A unique identifier for each row in a table
36
Why is data validation important?
To ensure data accuracy and consistency
37
What is a database view?
A virtual table used to simplify queries or reporting
38
What is concurrency control?
Managing multiple users accessing the database safely
39
What is a data type?
A rule defining what type of data a column can store
40
What is VARCHAR?
A variable-length text data type
41
What does VARCHAR(100) mean?
Text up to 100 characters
42
Why is VARCHAR efficient?
It only uses the space needed
43
What is CHAR?
A fixed-length text data type
44
Difference between CHAR and VARCHAR?
CHAR is fixed length, VARCHAR is variable length
45
What is the DATE data type used for?
Storing dates
46
What is the DATETIME or TIMESTAMP type used for?
Storing date and time
47
What is INT used for?
Whole numbers
48
What is FLOAT used for?
Approximate decimal numbers
49
What is DECIMAL used for?
Exact decimal numbers, especially financial data
50
What is BLOB used for?
Storing binary data like images or files
51
Give one advantage of using correct data types
Prevents incorrect data, allows sorting, filtering, calculations, better performance
52
What is the relational model?
A model for organizing data using sets and relations introduced in 1970
53
What is a set?
A collection of unique elements with no specific order
54
How are sets written?
Using curly brackets {} or set-builder notation
55
What does a ∈ A mean?
a is an element of set A
56
What does A ⊆ B mean?
A is a subset of B
57
What is the union of two sets?
All elements in A or B or both
58
What is the intersection of two sets?
Elements common to both sets
59
What is set difference (A − B)?
Elements in A but not in B
60
What is the empty set?
A set with no elements (∅)
61
What is a power set?
The set of all subsets of a set
62
What is the universal set?
The set containing all possible elements
63
What are disjoint sets?
Sets with no elements in common
64
What is a Venn diagram?
A visual representation of relationships between sets
65
What is a relation?
A connection between elements of sets
66
What is a binary relation?
A relation between two elements
67
What is an ordered pair?
A pair written as (a, b) representing a relation
68
What is reflexivity?
Each element relates to itself
69
What is symmetry?
If a relates to b, then b relates to a
70
What is transitivity?
If a relates to b and b to c, then a relates to c
71
What is antisymmetry?
If a relates to b and b to a, then a equals b
72
What is a relation schema?
The structure of a table including name, attributes, and data types
73
What is a relation instance?
The actual data stored in the table
74
What is an attribute?
A column in a relation
75
What is a tuple?
A row in a relation
76
What is degree in a relation?
The number of columns
77
What is cardinality in a relation?
The number of rows
78
What data type is CHAR?
Fixed-length character string
79
What data type is VARCHAR?
Variable-length character string
80
What does schema describe?
The design/structure of the table
81
What does instance describe?
The current contents of the table