Relational Databases Flashcards

1
Q

Explain Relational Databases

A

• on of the most popular types of DBMS

• Def: A collective set of multiple sets of data that is carefully organised in tables, records & columns

• Table in a database communicate & share data that makes it possible for effective data search, organisation & reporting

• RDBs use STRUCTURED QUERY LANGUAGE (SQL) which is a STANDARD USER APPLICATION that provides an easy programming interface for data interaction

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

What does a RDB contain (Structure of a Database)

A

• A relational database contains tables; these tables are related to each other by the data they contain
• A table is organised by rows & columns. They are the primary form of data storage in a RDB

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

What is an Entity? (Structure of a Database)

A
  • A group represented by a table/ Each table represents a group called an entity
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does a table contain? (Structure of a Database)

A
  • A table contains RECORDS (a series of fields) & a TUPLE is a record (a single record). These contain ATTRIBUTES which are the field names
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Explain What Keys in a RDB do & how they are used. & list the 3 main types of keys

A
  1. What they do in a RDB: keys are crucial to table structure. They ensure that each record in a table is uniquely identified
  2. How they are used: Keys are used to enforce integrity & identity the relationship between the tables
  3. Three main types of keys:
    • Primary Key
    • Candidate Key
    • Foreign Key
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Primary Key

A
  • this is a special RDB table column (or a combination of columns) designed to uniquely identify each record
  • A Primary Key:
    • Must NOT contain a NULL value
    • Must contain a UNIQUE VALUE for each row of data (record) eg. ID column
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Candidate Key

A
  • This is a column or a set of columns in a table that can uniquely identify any databases record without referring to any data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Foreign Key

A
  • usually a Primary Key from one table that appears in another table where the first table has a relationship with the second table
How well did you know this?
1
Not at all
2
3
4
5
Perfectly