Luyện nói tiếng Anh bằng Shadowing qua video: Understand SQL Transactions in 5 Minutes

Chọn chế độ luyện tập

Mỗi chế độ mở một phòng luyện tập toàn màn hình.

61 câu
Nếu các câu quá ngắn hoặc quá dài, hãy bấm Edit để chỉnh sửa.
1
Ever lost data because something crashed halfway through a database update?
2
SQL transactions are here to protect you.
3
In this video, I'll explain them in simple terms, so you can keep your data safe and consistent, even when things go wrong.
4
A transaction is one of the key concepts in all database management systems.
5
Transactions allow multiple database operations to be grouped into one unit.
6
Within a single transaction, a sequence of data operations either occurs completely or not at all.
7
All intermediate states within a single transaction are not visible to other transactions, and if the transaction cannot be successfully completed for some reason,
8
none of the results will be saved in the database.
9
The easiest way to understand database transactions is through the classic example of banking transactions.
10
Imagine we are working with a bank's database.
11
We have a table that contains information about clients and their available balances.
12
For simplicity, this is a table consisting of two columns, the client's name, and the available balance.
13
Let's assume we want to transfer $100 from Andrew's account to John's account.
14
To do this, we need to perform the following operations.
15
Reduce Andrew balance by $100 with the update command, then increase John balance by these $100.
16
To perform such operation, we need to do two actions.
17
It is necessary that all these actions execute together or not execute at all.
18
A short failure isn't critical if Andrew's first attempt to transfer John's money fails, and both simply keep their original balances.
19
However, if one operation is completed, for example, Andrew's money is deducted but John's account doesn't receive it, this leads to serious issues.
20
In the real world, anything can happen between these two operations.
21
A brief network outage, an error at the banking application level, or something else.
22
We need a guarantee that if something interrupts the completion of this group of operations,
23
none of the results of the intermediate commands will be recorded in the database,
24
and we can get this guarantee if we combine these actions into a single transaction.
25
In PostgreSQL, a transaction consists of a series of SQL commands between the begin and commit statements.
26
If during a transaction we decide not to commit the changes, for example, if Andrew's balance turns negative,
27
we can use the rollback command instead of commit undoing all modifications.
28
It's also important to understand how transactions interact with each other.
29
By default, the transaction isolation level in PostgreSQL is Red Committed.
30
This means that transactions only see the data that other transactions have confirmed
31
and do not see changes made by these transactions that have not yet been confirmed.
32
Let's look at this example in practice.
33
I already have a table prepared with the necessary data.
34
Let's execute a select.
35
We see two balance records let's execute the transaction step -by -step.
36
First, let's perform a begin.
37
We started a transaction.
38
Everything that will happen here in this connection is now occurring within this transaction.
39
Let's execute the next line.
40
Execute select.
41
We see the intermediate result, but it is visible only within our current transaction.
42
Let's open a parallel connection to the database and perform a select from that connection, meaning outside the scope of the current transaction.
43
Open a new connection and execute the query.
44
We see that here Andrew's balance is still displayed as 600,
45
although in another open transaction we started an update and Andrew's balance has already decreased by 100.
46
Let's go back there and continue the transaction perform the next update
47
and see how the data in the table looks now
48
we see that john's balance increased by 100
49
but i repeat we see all this only within the current transaction if we switch to parallel connection
50
everything is still the same as it was before the transaction was executed let's go back and finally commit the transaction
51
Now the result is fully committed, and we will see it within Parallel Transactions.
52
Let's verify this.
53
Execute this query.
54
Now we see the final result.
55
Everything that happened within the transaction block wasn't visible in other database sessions until the transaction was committed,
56
and if the transaction hadn't been committed but was rolled back, then the result of the intermediate executions wouldn't be visible.
57
Thanks for watching.
58
If you want to dive deeper, my complete SQL course on Udemy is available with a special offer for YouTube viewers.
59
You'll get hands -on exercises, quizzes, and advanced tips we didn't cover here.
60
Links in the description.
61
And don't forget to subscribe for more tutorials.

Tải Ứng Dụng

Mọi thứ bạn cần để nói trôi chảy

Chấm điểm AIChấm từng câu nói
Luyện IPAThành thạo mọi âm
Từ vựngMở rộng vốn từ
Game Từ vựngHọc qua chơi
FOR YOU

Video gợi ý

Từ vựng và ghi chú luyện nói cho bài học này

Bài luyện nói này dựa trên video “Understand SQL Transactions in 5 Minutes”. Những từ được nhắc lại nhiều nhất trong bài: transaction, balance, database, execute, operation. Video này có 61 câu và 754 từ để luyện shadowing. Phần lời nói dài 4:40. Người nói nói với tốc độ tự nhiên, khoảng 162 từ mỗi phút, gần với hội thoại hằng ngày. Chỉ 79% số từ nằm trong 3.000 từ tiếng Anh thông dụng nhất, nên từ vựng khá khó.

Từ vựng quan trọng trong video

15 từ đáng học trong video, kèm phiên âm và nghĩa:

TừPhiên âmNghĩa
database danh từ/ˈdeɪtəˌbeɪs/cơ sở dữ liệu, CSDL
visible tính từ/ˈvɪzɪb(ə)l/nhìn thấy được, khả kiến
select động từ/sɪˈlɛkt/lựa
occur động từ/əˈkɜː/xảy ra
guarantee danh từ/ˌɡæɹ.ənˈtiː/sự bảo đảm
confirm động từ/kənˈfɝm/xác nhận
consist danh từ/kənˈsɪst/đoàn xe ray
consistent tính từ/kənˈsɪs.tənt/phù hợp, thích hợp
sequence danh từ/ˈsiː.kwəns/dãy
default danh từ/dɪˈfɔlt/mặc định
execution danh từ/ˌɛk.sɪˈkjuː.ʃən/tử hình
decrease động từ/dɪˈkɹiːs/hạ
dive động từ/daɪv/lặn
interact động từ/ɪn.təˈɹækt/tương tác
subscribe động từ/səbˈskɹaɪb/đăng kí

Cụm động từ bạn sẽ nghe

TừNghĩa
go back động từtrở lại

Những câu đáng luyện lại

Các câu ngắn, trọn ý trong video mà bạn có thể dùng lại khi giao tiếp hằng ngày:

  • Imagine we are working with a bank's database.
  • Let's look at this example in practice.
  • First, let's perform a begin.
  • Let's execute the next line.

Ngữ pháp trong video

Những cấu trúc người nói dùng nhiều nhất, kèm đúng cụm từ trong video:

Cấu trúcTrong video
Câu bị động be + quá khứ phân từ — nhấn vào việc xảy ra, không phải người làmbe grouped · cannot be successfully completed · will be saved
Thì hiện tại hoàn thành have/has + quá khứ phân từ — việc đã xảy ra nhưng còn liên quan đến hiện tạihave confirmed · has already decreased

Phát âm cần chú ý

Người nói dùng 9 dạng rút gọn, ví dụ didn't, doesn't, don't. Hãy nói theo dạng ngắn đúng như bạn nghe.

  • Âm “sh” và “zh”: transaction /tɹænˈzækʃən/, execution /ˌɛk.sɪˈkjuː.ʃən/, completion /kəmˈpliː.ʃən/, isolation /ˌaɪsəˈleɪʃən/, modification /ˌmɑdɪfɪˈkeɪʃən/
  • Từ dài — đặt trọng âm cho đúng: intermediate /ɪn.tə(ɹ)ˈmi.di.ət/, successfully /səkˈsɛs.fə.li/, execution /ˌɛk.sɪˈkjuː.ʃən/, isolation /ˌaɪsəˈleɪʃən/, modification /ˌmɑdɪfɪˈkeɪʃən/

Những âm người Việt thường gặp khó:

  • Cụm phụ âm cuối — đọc đủ từng âm, đừng nuốt âm cuối: select /sɪˈlɛkt/, consist /kənˈsɪst/, consistent /kənˈsɪs.tənt/, sequence /ˈsiː.kwəns/, default /dɪˈfɔlt/
  • Âm /æ/ — mở miệng rộng hơn âm “e”: transaction /tɹænˈzækʃən/, parallel /ˈpæ.ɹəˌlɛl/, guarantee /ˌɡæɹ.ənˈtiː/, halfway /ˌhæfˈweɪ/, interact /ɪn.təˈɹækt/
  • Phụ âm cuối — bật rõ âm cuối của từ: database /ˈdeɪtəˌbeɪs/, execute /ˈɛksɪˌkjuːt/, commit /kəˈmɪt/, intermediate /ɪn.tə(ɹ)ˈmi.di.ət/, select /sɪˈlɛkt/

Cách luyện với video này

  1. Nghe hết video một lần, chưa cần nói, và ghi lại những từ bạn chưa biết.
  2. Bắt đầu ở tốc độ 0,75×, nói đuổi từng câu, rồi quay lại tốc độ bình thường khi đã quen.
  3. Ghi âm giọng mình rồi so với bản gốc, chú ý các từ như database, visible, select.

Phương Pháp Shadowing Là Gì?

Shadowing là kỹ thuật học ngôn ngữ có cơ sở khoa học, ban đầu được phát triển cho chương trình đào tạo phiên dịch viên chuyên nghiệp và được phổ biến rộng rãi bởi nhà đa ngôn ngữ học Dr. Alexander Arguelles. Nguyên lý cốt lõi đơn giản nhưng cực kỳ hiệu quả: bạn nghe tiếng Anh của người bản xứ và lặp lại to ngay lập tức — như một "cái bóng" (shadow) đuổi theo người nói với độ trễ chỉ 1–2 giây. Khác với luyện ngữ pháp hay học từ vựng bị động, Shadowing buộc não bộ và cơ miệng phải đồng thời xử lý và tái tạo ngôn ngữ thực tế. Các nghiên cứu khoa học xác nhận phương pháp này cải thiện đáng kể phát âm, ngữ điệu, nhịp điệu, nối âm, kỹ năng nghe và độ lưu loát khi nói — đặc biệt hiệu quả cho người luyện IELTS Speaking và muốn giao tiếp tiếng Anh tự nhiên như người bản ngữ.

Phương pháp shadowing: đọc hướng dẫn từng bước đầy đủ →