Q1. What is the difference between foreign key and reference key? Answer. A Foreign key is the key which refers to another table’s primary key.A Reference key is the primary key of table referred by another table. Q2. Differentiate between Primary key and Unique Key Answer. Primary key and Unique key both enforces uniqueness ofContinue reading “Indexes”
Tag Archives: Tables
Views & Materialized Views
Q1. Why are views created? Answer. Views are created for:• Storing complicated queries in the database so that they are not to be re-written every time they are required.• Hide the complicated logics on joins from the users.• Hide the sensitive data from the users by limiting their view to limited fields mentioned in views.•Continue reading “Views & Materialized Views”
Tables & External Tables
Q1. What are the various constraints that can be applied to a Table? Answer. NULL, NOT NULL, CHECK, DEFAULT, Primary Key & Foreign Key. Q2. What is the purpose of a CLUSTER? Answer. Oracle does not allow a user to specifically locate tables, since that is a part of the function of the RDBMS. However,Continue reading “Tables & External Tables”
