Before we dig deeper in table design or application design, here's a tip.
Do not call the table "transaction" because this will lead to misunderstandings in the future.
A "Transaction" in the context of SQL databases means a set of SQL Commands which are to be done or not.
Do not call the Primary keys "ID" only, use more distinctive expressions instead. This way some can understand the table design much more easier and some design software is able to recognize the connections.
example:
payee (payee_id, payeename). eg amazon, bmw etc
category(category_id, categoryname) eg clothing, medicine etc
booking(booking_id, payee_id, category_id, bookingtext, amount)
Whenever possible, do not use self combined Statements, use parameters instead:
SQLQuery1.SQL.Text:= 'SELECT booking_id, payee_id from booking WHERE booking_id = :booking_id';
SQLQuery1.ParamByName('booking_id').AsInteger := StrToInt(Edit1.Text);
or
SQLQuery1.SQL.Text:= 'INSERT INTO booking( payee_id, category_id, bookingtext, amount)
VALUES ( :payee_id, :category_id, :bookingtext, :amount)';
SQLQuery1.ParamByName('booking_id').AsInteger := StrToInt(Edit1.Text);
SQLQuery1.ParamByName('category_id').AsInteger := StrToInt(Edit2.Text);
SQLQuery1.ParamByName('bookingtext').AsString := Editbookingtext.Text);
SQLQuery1.ParamByName('category_id').AsFloat:= etc etc;
SQLQuery1.ExecSQL;