7. Compare the truncate and delete commands
A: both of them can be used to delete all records in the table. The difference is that truncate is a DDL operation, which moves hwk and does not require rollback segment. Delete is a DML operation, which requires rollback segment and takes a long time.
8. Reasons for using Indexes
A: quick access to the data block in a table
9. Two types of tables in star schema and their data are given respectively.
Answer: fact tables and dimension tables. fact table contain a large amount of major information, while dimension tables stores information about certain attribute descriptions of fact table.
10. What indexes should be created on the fact table?
A: bitmap Index)
11. are two related constraints provided?
Answer: primary key and foreign key
12. How to recreate a parent table without affecting the sub-table?
A: The foreign key of the sub-table is forced to take effect. The parent table is rebuilt and the foreign key is activated.
13. Explain the differences between archive and non-archive modes and their respective advantages and disadvantages
A: In archive mode, you can back up all database transactions and restore them to any point in time. Non-archive mode, on the contrary, cannot be recovered to any point in time. However, the non-archive mode can slightly improve the database performance.