Database-MySQL [3i Infotech Placement]: Sample Questions 113 - 114 of 162

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 113


Describe in Detail


What is Pro ⚹ C? What is OCI?


Pro ⚹ C:

  • The Pro ⚹ c/C ++ precompiler takes the SQL statement that embedded in C/C ++ code convert into standard C/C ++ code
  • The precompiler accepts the source program as input, translates the embedded SQL statements into standard Oracle run-time library calls, and generates a modified source program that you can compile, link, and run.

    OCI (Oracle Call Interface)

  • OCI refers to Oracle Call interface is set of Low Lavel API (Application Program Interface Call) used to interact with Oracle database. .
  • By OCI one can use the operation such as Logon, Fatch, parse, excute etc. Generally, these are written in C/C ++ .
  • These can be written in any language.

Question 114


Describe in Detail


What is the use of CASCADE CONSTRAINTS?


Define Cascading Constraints
  • When we used the DROP command, a parent table can be dropped even when a child table exists.
  • CASCADE CONSTRAINTS drops referential integrity constraints that refer to primary and unique keys defined on the dropped column.
  • For example:
  • Parent table has branch details

    CREATE TABLE br (bno number constraint mypk1 primary key,

    bname varchar2 (60) )

  • Child table contains student information corresponding to branch

    CREATE TABLE st (sno number constraints mypk2 primary key,

    sname varchar2 (100) ,

    bno number,

  • Constraints pmfk1 foreign key (bno) references br (bno) on delete cascade
  • Cascade constraint is enforced- thus when any records from br table are deleted- corresponding (with reference to bno) records in the st are also deleted.

Developed by: