Using TiDB for Personal Finance Analysis

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 用tidb来做个人理财的分析

| username: tidb狂热爱好者

[TiDB Usage Environment] Production Environment / Testing / Poc
[TiDB Version]
[Reproduction Path] What operations were performed that led to the issue
[Encountered Issue: Problem Phenomenon and Impact]
[Resource Configuration] Enter TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
[Attachments: Screenshots/Logs/Monitoring]

My personal thoughts are as follows:

Take a screenshot every day. Use Python to automate OCR to convert the text into data. Import it into TiDB.

After importing, you can see where your personal salary and expenses went. For example, in recent years, I paid 100,000 in medical expenses for my parents in 2020, 100,000 in 2021, 30,000 in 2022, and 20,000 in 2023.

Reflecting on this, it shows a lack of concern for my parents. Not paying attention to them daily has led to their continuous illnesses.

The 5Why analysis method is a way to delve into the root cause of a problem by continuously asking “why.” Based on the information you provided, here is a possible 5Why analysis and solutions:

Why 1: Why do parents need to pay a large amount of medical expenses?
Answer: Because they keep getting sick.

Why 2: Why do they keep getting sick?
Answer: Possibly because there is no daily attention to their health.

Why 3: Why is there no attention to their health?
Answer: Possibly because of being busy with work or not realizing that their health needs more attention.

Why 4: Why is this not realized?
Answer: Possibly due to a lack of understanding of their health status or not prioritizing their health issues.

Why 5: Why is there a lack of understanding or prioritization?
Answer: Possibly due to not maintaining good communication with them or not valuing health enough personally.

Solutions:

  1. Increase attention to parents’ health: Regularly communicate with them to understand their physical condition and remind them to pay attention to their health.
  2. Arrange regular health check-ups for parents: Help them detect and prevent diseases early.
  3. Learn basic health knowledge: To better care for their health.
  4. Reasonably arrange work and life: Ensure enough time and energy to focus on them.
  5. Encourage parents to maintain a healthy lifestyle: Such as a balanced diet and moderate exercise.
  6. Set up reminder mechanisms: Regularly remind yourself to pay attention to their health.
  7. Seek support and help from family members: Jointly care for their health.

By continuously analyzing your bills, you can understand where your money goes. As a database administrator, you know that databases need regular inspections and preventive measures. Using tools like Yearning to audit and prevent the database from being polluted by bad SQL can help manage the database well. Similarly, the human body is like a database. If you don’t manage it well, it will consume your wealth.

Doing business is not about who earns more, but who lives longer. Don’t aim for instant success; take steady steps.

If you don’t take care of your family’s health, no amount of money you earn will matter.

After entering the data, because it is standardized, you can manage your assets and perform data analysis.

For example, query the daily consumption amount of each product in the family. The query statement is as follows:

  • |select date_trunc(‘day’, time) as day, sum(PretaxAmount) as cost FROM instance_bill where productcode = ‘Jiang Ming’ group by day

For example: Get the total bill cost for me and my wife.

  • |select sum(PretaxAmount) as cost FROM instance_bill where productcode = ‘Jiang Ming’ and productcode = ‘rqy’

For example: Query the bill cost of different products.

  • |select productcode, sum(PretaxAmount) as cost FROM instance_bill group by productcode

Actually, put down the computer and spend more time with your family. The time parents are alive is really limited. No one lives forever. This article is poorly written. I’m going to spend time with my family. I can slowly implement the backend code.

Using TiDB and a data analysis perspective to look at any problem can help you solve it better.

At least now I arrange annual health check-ups for my parents, watch them take their medicine every day, and set an alarm to talk to them daily. Accompanying them is the best confession.

| username: TiDBer_QYr0vohO | Original post link

:+1: :+1: :+1:

| username: TiDBer_JUi6UvZm | Original post link

:+1:

| username: vcdog | Original post link

:+1:t3: :+1:t3: :+1:t3:

| username: xiaoqiao | Original post link

Learned.

| username: Jack-li | Original post link

:+1:

| username: forever | Original post link

:+1:

| username: Kongdom | Original post link

:+1: :+1: :+1:

| username: dba远航 | Original post link

Great idea, thumbs up!