Able to explain how models are related in a database Flashcards
1
Q
Able to explain how models are related in a database
A
In a database, models represent entities,
- such as people,
- products,
- or orders,
and their relationships to one another. Models are related to one another through the use of foreign keys.
There are three main types of relationships between tables in a database:
One-to-One (1:1)
One-to-Many (1:N)
Many-to-Many (N:M)
2
Q
One-to-One (1:1)
A
when each record in one table is associated
- with one and only one record in another table.
3
Q
One-to-Many (1:N)
A
- when each record in one table can be associated with one or more records in another table,
- but each record in the second table is associated with only one record in the first table.
4
Q
Many-to-Many (N:M)
A
- when each record in one table can be associated with one or more records in another table,
- and each record in the second table can be associated with one or more records in the first table.
5
Q
One-to-Many Relationship in foxshop
A
6
Q
Many-to-Many Relationship in foxshop
A