Databases Flashcards

1
Q

Name two types of DBMS

A

RDBMS
NoSQL

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

What is an RDBMS, examples, and the use cases

A
  1. Relational Database Management Systems (RDBMS)
    • Description: Stores data in structured tables with rows and columns, following a predefined schema.
    • Examples: MySQL, PostgreSQL, Oracle, Microsoft SQL Server.
    • Use Case: Applications requiring complex queries, transaction management, and strong consistency.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is NoSQL

A
  1. NoSQL Database
    • Description : Flexible, schema-less databases for handling unstructured or semi-structured data.
    • Types:
      • Document-based: MongoDB
      • Key-value: Redis
      • Column-based: Cassandra
      • Graph-based: Neo4j
      • Use Case: Big data, real-time analytics, highly scalable applications.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does an RDBMS do basically

A

the “relational” aspect refers to the relationships between tables. These relationships are established using keys (primary keys and foreign keys), which connect data across different tables in a structured and organized way.

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

Characteristics of Primary Keys

A
  • Definition: A column (or set of columns) that uniquely identifies each record in a table.
  • Key Points:
    • Must contain unique values.
    • Cannot contain NULL values.
    • Each table can have only one primary key.
  • Purpose: Ensures that each row in the table is unique.
  • Example: In a Students table, StudentID is the primary key that uniquely identifies each student.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Foreign Key

A
  • A column (or set of columns) in one table that creates a link to the primary key of another table. It establishes the relationship between the two tables.
  • Key Points:
    • Can contain duplicate values.
    • Can contain NULL values (unless restricted by a NOT NULL constraint).
    • A table can have multiple foreign keys.
  • Purpose: Maintains referential integrity between tables by linking rows from one table to another.
  • Example: In an Enrollments table, StudentID is a foreign key that references StudentID in the Students table.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Types of relationships

A
  • One-to-One: Each record in one table is linked to only one record in another table.
    • Example: A Person table might have a one-to-one relationship with a Passport table (one person, one passport).
  • One-to-Many: A record in one table is related to multiple records in another table.
    • Example: A Teacher table could have a one-to-many relationship with a Class table (one teacher teaches multiple classes).
  • Many-to-Many: Multiple records in one table are related to multiple records in another table, typically handled with a junction or associative table.
    • Example: A Students table and a Courses table might have a many-to-many relationship, managed by an Enrollments table (many students enroll in many courses).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Why do we even have keys in RDBMS

A
  • To make a connection between the data
  • To locate and collect the unique data that we require
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does SQL stand for

A

Structured Query Language

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

What does SQL do vele

A

Helps access and manipulate your databases

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

What is ANSISQL

A
  • A standardized version of SQL for managing and manipulating databases.
  • Ensures consistency across different database management systems (DBMS).

ANSI SQL promotes a consistent, flexible, and efficient approach to database management, making it essential for developers and data professionals.

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