I'm new to dba in oracle. Im just learning about rollback segment. I have a few questions about it, it'll be great if i can find some help here.
1- after issuing a dml statement, does the most valid data exists in redo log files or rollback statement?
2- is the rollback statement ever used in a ddl statement?
You can (loosely) think of redo and undo as instructions.
For example, you drove from home to the shop. That is a change in your "state", ie, 20 mins ago you were at home, now you are at the shop.
The redo information would be:
It is a list of instructions that would let you (aka the database) repeat a task (for example, during a database recovery).
The undo information is not about remembering your previous state (you were at home), but more a set of instructions on how to return to a previous state. In this case it would be:
This information is stored in the undo (or rollback) segments in the database.
A video walk through of the process is at
https://youtu.be/lmrWmH1vMPc?t=66