Tuesday, 5 March 2013

Short ques

(a) Definition of RDBMS.
Answer:
A Relational Database Management system (RDBMS) is a database management system (DBMS) that is based on the relational model as introduced by Dr. Edgar F. Codd. Strictly speaking it should also satisfy codd’s 12 rules, but in practice there is no DBMS that satisfies all these rules.
(b) What is table and tuple?
Answer:
  • Entity information is stored in an object called Table.
  • Multiple field s placed in a horizontal plane, is called a Record or Row or Tuple.
(c) What is Tablespace?
Answer:
An Oracle database comprises of a number of physical files called data files. These files are logically grouped together into oracle(logical) structure called a Tablespace.
(d) What is the difference between Truncate and delete?
Answer:
  • TRUNCATE Remove all records from a table, including all spaces allocated for the records are removed
  • DELETE Deletes all records from a table, the space for the records remain
(e) What is Data Dictionary?
Answer:
One of the most important parts of an Oracle database is its data dictionary, which is a read-only set of tables that provides information about the database.
A data dictionary contains:
  • The definitions of all schema objects in the database (tables, views, indexes, clusters, synonyms, sequences, procedures, functions, packages, triggers, and so on)
  • How much space has been allocated for, and is currently used by, the schema objects
  • Default values for columns
  • Integrity constraint information
  • The names of Oracle users
  • Privileges and roles each user has been granted
  • Auditing information, such as who has accessed or updated various schema objects
  • Other general database information

(f) What is the difference between PRIMARY KEY and UNIQUE key?
Answer:
  • Primary key is unique identity and it can not insert NULL
  • In Unique key, we can insert NULL value


(g) The _________ constraint can only be applied at column level.
Answer:
The NOT NULL constraint can only be applied at column level
(h) What is pseudo column?
Answer:
Pseudo means content is nothing but it is doing everything.
SYSDATE is a pseudo column that contains the current date and time. It requires no arguments when selected from the table DUAL and returns the current date.
(i) What is the difference between CHAR and VARCHAR?
Answer:
CHAR
VARCHAR
This datatype can hold 255 characters
This datatype can hold upto 4000 characters
CHAR is much faster than VARCHAR
VARCHAR is less faster than CHAR
The inserted values will be padded with spaces
The inserted value will not be padded with spaces

(j) What is sub query?
Answer:
A Sub Query is a form of an SQL statement that appears inside another SQL statement. It is also termed as nested query. The statement containing a sub query is called a parent statement. The parent statement is the row(i.e. the result set) returned by the subquery.
Syntax:
SELECT columnnames FROM tablename
WHERE columnname operator (SELECT columnname FROM tablename );
(k) What is Join statement?
Answer:
A join is a query that combines rows from two or more tables or views. Oracle Database performs a join whenever multiple tables appear in the FROM clause of the query. The select list of the query can select any columns from any of these tables.
Types of JOIN:
  • INNER JOIN
  • OUTER ( LEFT, RIGHT, FULL)
  • CROSS JOIN


No comments:

Post a Comment