0% found this document useful (0 votes)
258 views2 pages

Database Design for Quiz System

The document defines the schema for tables needed to build a quiz application. It creates tables to store contact information, quiz information, questions asked by users, quiz questions and options, and user registration information. Triggers are created on the quiz info and question tables to auto-generate primary key values during insert operations.

Uploaded by

Manish Bhatt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
258 views2 pages

Database Design for Quiz System

The document defines the schema for tables needed to build a quiz application. It creates tables to store contact information, quiz information, questions asked by users, quiz questions and options, and user registration information. Triggers are created on the quiz info and question tables to auto-generate primary key values during insert operations.

Uploaded by

Manish Bhatt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

CREATE TABLE "QUIZCONTACT"

( "NAME" VARCHAR2(4000),
"EMAIL" VARCHAR2(4000),
"PHONE" VARCHAR2(4000),
"MESSAGE" VARCHAR2(4000)
)
/

CREATE TABLE "QUIZINFO"


( "SUBJECT" VARCHAR2(4000),
"QUIZNAME" VARCHAR2(4000)
)
/

CREATE OR REPLACE TRIGGER "BI_QUIZINFO"


before insert on "QUIZINFO"
for each row
begin
select "QUIZINFO_SEQ".nextval into :[Link] from dual;
end;

/
ALTER TRIGGER "BI_QUIZINFO" ENABLE
/

CREATE TABLE "QUIZQ"


( "NAME" VARCHAR2(4000),
"EMAIL" VARCHAR2(4000),
"PHONE" VARCHAR2(4000),
"QUESTION" VARCHAR2(4000)
)
/
CREATE TABLE "QUIZQUES"
( "QUESTION" VARCHAR2(4000),
"OPTION1" VARCHAR2(4000),
"OPTION2" VARCHAR2(4000),
"OPTION3" VARCHAR2(4000),
"OPTION4" VARCHAR2(4000),
"ANSWER" VARCHAR2(4000),
"QUIZNAME" VARCHAR2(4000),
"QID" VARCHAR2(4000),
"DESCRIPTION" VARCHAR2(4000),
CONSTRAINT "QUIZQUES_PK" PRIMARY KEY ("QID") ENABLE
)
/

CREATE OR REPLACE TRIGGER "BI_QUIZQUES"


before insert on "QUIZQUES"
for each row
begin
select "QUIZQUES_SEQ".nextval into :[Link] from dual;
end;

/
ALTER TRIGGER "BI_QUIZQUES" ENABLE
/

CREATE TABLE "QUIZREGISTER"


( "USERNAME" VARCHAR2(4000),
"USERPASS" VARCHAR2(4000),
"CATEGORY" VARCHAR2(4000),
"EMAIL" VARCHAR2(4000)
)
/

You might also like