Q&A
-
When I name a table that I am creating, is it necessary to use a suffix such as _TBL?
-
Absolutely not. You do not have to use anything. For example, a table to hold employee information could be named similar to the following, or anything else that would refer to what type of data is to be stored in that particular table:
- EMPLOYEE
- EMP_TBL
- EMPLOYEE_TBL
- EMPLOYEE_TABLE
- WORKER
-
Why is it so important to use the schema name when dropping a table?
-
Here's a true story about a new DBA that dropped a table: A programmer had created a table under his schema with the same name as a production table. That particular programmer left the company. The programmer's database account was being deleted from the database, but the DROP USER statement returned an error due to the fact that outstanding objects were owned by the programmer. After some investigation it was determined that the programmer's table was not needed, so a DROP TABLE statement was issued.
It worked like a charmbut the problem was that the DBA was logged in as the production schema when the DROP TABLE statement was issued. The DBA should have specified a schema name, or owner, for the table to be dropped. Yes, the wrong table in the wrong schema was dropped. It took approximately eight hours to restore the production database.