Database Structures and Key Usage

zozonema avatar
zozonema
·
·
Download

Start Quiz

Study Flashcards

33 Questions

What is a primary key in a database?

A field in a table that uniquely identifies each row in that table

What is a foreign key in a database?

A field in one table that uniquely identifies a row in another table

What is the difference between a flat file database and a relational database?

Relational database allows data to be held in multiple tables, while flat file database only allows data in a single table

What is the purpose of creating a relationship between tables in a database?

To connect and organize related data across different tables

What type of relationship is defined by 'one-to-many'?

'For one primary key in a record there are many matches to other foreign keys in another table'

What is the purpose of a primary key in a database?

To hold the unique data that identifies a record from all other records in the database

In a relational database, what is the function of a foreign key?

To uniquely identify a primary key in another table

What distinguishes a flat file database from a relational database?

Flat file databases can only be viewed in a limited way, while relational databases allow data to be held in multiple tables with relationships between them

What type of relationship is defined by 'one-to-many'?

A relationship where for one primary key in a record there are many matches to other foreign keys in another table

What is the key function of a primary key in a database table?

To hold the unique data that identifies a record from all other records in the database

What is the key field in a database?

A field that holds the unique data which identifies a record from all the other records in the file or database

What is the primary function of a primary key in a database table?

To uniquely identify each record in the table

Which type of database allows data to be held in a number of tables where links are created to connect the data in different tables?

Relational database

What is the primary characteristic of a foreign key in a database?

It is defined in the first table but refers to the primary key in the second table

What type of relationship is defined by 'one-to-one'?

Each primary key can only match one foreign key

Flat file databases are more flexible and efficient than relational databases.

False

In a one-to-many relationship, one primary key in a record can only ever match one other foreign key in another table.

False

A foreign key uniquely identifies a row of another table and is defined in the same table.

False

What is the purpose of a primary key in a database?

To uniquely identify each record in a table

How does a foreign key differ from a primary key in a database?

A foreign key uniquely identifies a row in another table, while a primary key uniquely identifies each record in its own table.

What distinguishes a flat file database from a relational database?

A flat file database holds data in a single table, while a relational database holds data in multiple tables with established relationships.

Define a one-to-one relationship between tables in a database.

A one-to-one relationship means that the foreign key in one record can only ever match one other primary key in another table.

Describe a one-to-many relationship between tables in a database.

In a one-to-many relationship, one primary key in a record can have many matches to other foreign keys in another table.

Flat file or relational database A flat file database: is a collection of data held in a single table, meaning data can only be viewed in a limited way. Relational database: data may be held in a number of tables where links (or relationships) are created to connect the data in different tables to each other. Lesson objectives Identify different database structures and the use of primary keys and foreign keys. Describe the need database tables. and properties of relationships between

fields

Primary and foreign keys Primary keys: Primary keys is the key that is unique from others. Foreign keys: Foreign keys is a field in one table that uniquely identifies a row of another table. Foreign key is defined in a second table but it refers to the primary key in the first table. Lesson objectives Identify different database structures and the use of primary keys and foreign keys. Describe the need database tables. and properties of ______ between

relationships

When two tables are joined together a relationship is created between them, as between Cars and Customers. There are different types of relationship depending on the kind of connection made. Lesson objectives Identify different database structures and the use of primary keys and foreign keys. Describe the need database tables. and properties of relationships between

one-to-one

One-to-many: where for one primary key in a record there are many matches to other foreign keys in another table. Lesson objectives Identify different database structures and the use of primary keys and foreign keys. Describe the need database tables. and properties of relationships between

records

Flat file or relational ______base A flat file ______base: is a collection of ______ held in a single table, meaning ______ can only be viewed in a limited way. Relational ______base: ______ may be held in a number of tables where links (or relationships) are created to connect the ______ in different tables to each other. Lesson objectives Identify different ______base structures and the use of primary keys and foreign keys. Describe the need ______base tables. and properties of relationships between

data

Match the following terms with their definitions:

Primary key = A key that is unique from others Foreign key = A field in one table that uniquely identifies a row of another table Flat file database = A collection of data held in a single table Relational database = Data may be held in a number of tables with created links to connect the data

Match the following relationships with their descriptions:

One-to-one = Where the foreign key in one record can only ever match one other primary key in another table One-to-many = For one primary key in a record, there are many matches to other foreign keys in another table Primary key = The unique data which identifies a record from all the other records in the file or database Foreign key = A field in a record that holds the unique data which identifies that record from all the other records in the file or database

Match the following terms with their usage:

Flat file database = Data can only be viewed in a limited way Relational database = Data may be held in a number of tables where links are created to connect the data Primary key = Unique identifier for a record Foreign key = Uniquely identifies a row of another table and is defined in a second table but refers to the primary key in the first table

Match the following types of databases with their descriptions:

Flat file database = Collection of data held in a single table Relational database = Data held in multiple tables with relationships connecting them One-to-one relationship = Foreign key matches one primary key in another table One-to-many relationship = Many matches to other foreign keys for one primary key in a record

Match the following terms with their properties:

Primary key = Key field that is unique from others Foreign key = Field that uniquely identifies a row of another table Flat file database = Limited view of data as it's held in a single table Relational database = Holds data in multiple tables with connections between them

Learn about storing and managing data, including different database structures, primary keys, and foreign keys. Understand how data is stored, structured, and referenced in a collection.

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free
Use Quizgecko on...
Browser
Browser