Podcast
Questions and Answers
Quando un usuario inserta un datos, qual es le stato del circulation_state?
Quando un usuario inserta un datos, qual es le stato del circulation_state?
Como es determinate le stato final de un usuario?
Como es determinate le stato final de un usuario?
Que tipo de datos es necessari pro obtener le prime circulation_time de un usuario?
Que tipo de datos es necessari pro obtener le prime circulation_time de un usuario?
Como es determinate le ultimo circulation_time de un usuario?
Como es determinate le ultimo circulation_time de un usuario?
Signup and view all the answers
Que evento causa un cambio in le stato del circulation_state de un usuario?
Que evento causa un cambio in le stato del circulation_state de un usuario?
Signup and view all the answers
Qual es le scopo del campo circulation_time in le tabella base_person_migratory?
Qual es le scopo del campo circulation_time in le tabella base_person_migratory?
Signup and view all the answers
Study Notes
Table Structure of base_person_migratory
- The table has the following fields:
id
,person_id
,circulation_state
,house_id
,living_type
, andcirculation_time
. -
circulation_state
has two possible values:01
for "迁入" (move in) and02
for "迁出" (move out).
Data Insertion and Circulation State
- When inserting a new record, the
person_id
,circulation_state
(with value01
),house_id
,living_type
, andcirculation_time
are inserted. - A person can have multiple records with the same
person_id
but differenthouse_id
s. - If a person has multiple records with different
house_id
s and all of them have acirculation_state
of02
, the person's final state is considered "迁出" (moved out).
Business Logic for Circulation State
- If a person moves into multiple houses (multiple records with
circulation_state
=01
) and then moves out of all of them (all records updated tocirculation_state
=02
), their final state is considered "迁出" (moved out). - If a person moves into multiple houses but only moves out of some of them (some records updated to
circulation_state
=02
), their final state is considered "迁入" (moved in).
Retrieving Circulation Times
- The task is to retrieve the first
circulation_time
when a person moves into multiple houses. - If the person moves out of all of those houses, the task is to retrieve the last
circulation_time
of the move-out records. - If the person moves into multiple houses again, the task is to retrieve the latest
circulation_time
of the new move-in records.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Description
Questo quiz treata le operazioni de registrazione de datos de personas e circulation states in una tabula. Prova tua comprensione del funcionamento de iste sistema!