Topic 5 Part 2 Flashcards

1
Q

Define a table:

A

A collection of records organised into rows and columns within a database.

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

Where can we find databases?

A

Websites (e.g., login systems)
Banking systems
Retail and inventory systems

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

What does an entity represent in a database?:

A

An object or concept with attributes, like a customer or product.

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

What is another term for field?:

A

Attribute

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

Define the term foreign key:

A

A field in one table that links to the primary key of another table to establish relationships.

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

By adding a primary key, what can we make sure?:

A

That each record in a table is unique.

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

Name all the entity relationships:

A

One-to-one
One-to-many
Many-to-many

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

Explain one-to-one,

A

One-to-one: One record in a table is linked to one record in another table.

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

Explain one-to-many

A

One-to-many: One record in a table is linked to multiple records in another table.

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

Explain many-to-many

A

Many-to-many: Records in one table are linked to multiple records in another, often using a bridge table.

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

Advantages of using a primary key:

A
  • Ensures unique identification of records.
  • Prevents duplication of data.
  • Maintains data integrity.
  • Simplifies relationships between tables.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Define the term data mining.

A

Data mining is the process of analysing large sets of data to discover patterns, relationships, or useful insights. It often uses techniques like machine learning, statistics, and database systems.

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

Where is data mining used?

A

Where it’s used:

Marketing: Identifying customer preferences for targeted advertising.
Healthcare: Finding trends in patient data to predict diseases.
Fraud detection: Spotting unusual patterns in financial transactions.
Retail: Predicting product demand based on past sales.

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

Data Extraction

A

Definition:
Data extraction involves retrieving specific data from a larger set, usually from databases, documents, or web sources. It prepares raw data for analysis or use in another system.

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

Where is data extraction used?

A

Where it’s used:

Data migration: Transferring data from old systems to new ones.
Web scraping: Collecting information from websites for analysis.
Document processing: Extracting names, addresses, or invoices from scanned files.

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

Composite Key

A

Definition:
A composite key is a combination of two or more fields (columns) in a table that together uniquely identify a record.

Example:
Imagine a table tracking students enrolled in courses.

Fields: Student_ID and Course_ID
Individually, neither Student_ID nor Course_ID is unique because students can take multiple courses. But together, Student_ID + Course_ID can form a unique composite key

17
Q

Where do composite keys come in handy?

A

When no single field is sufficient to uniquely identify a record.
In many-to-many relationships (e.g., students enrolling in courses).

18
Q

Database

A

Definition:
A database is an organised collection of data that allows for efficient storage, retrieval, and management. It typically consists of tables containing rows (records) and columns (fields).

19
Q

Give examples of databases

A

Examples:

A banking database stores account information.
A library database tracks books, authors, and borrowers.
A retail database keeps inventory, sales, and customer data.

20
Q

Foreign Key

A

Definition:
A foreign key is a field in one table that links to the primary key in another table. It establishes a relationship between two tables and ensures data integrity.

21
Q

Example of a foreign key

A

Example:

Table 1: Customers
Customer_ID (Primary Key)
Table 2: Orders
Customer_ID (Foreign Key)
The foreign key ensures that each order is associated with a valid customer.