Relational Database Management System Mcqs

Page No. 2

What does the notnull integrity constraint do?


aIt ensures that at least one tuple is present in the relation


b It ensures that at least one foreign key is present in the relation


c It ensures that all tuples have a finite value on a specified attribute


dIt ensures that all tuples have finite attributes on all the relations



create table apartment(ownerID varchar (5), ownername varchar(25), floor numeric(4,0), primary key (ownerID)); Choose the correct option regarding the above statement


aThe statement is syntactically wrong


bIt creates a relation with three attributes ownerID, ownername, floor in which floor cannot be null.


cIt creates a relation with three attributes ownerID, ownername, floor in which ownerID cannot be null.


dt creates a relation with three attributes ownerID, ownername, floor in which ownername must consist of at least 25 characters.



Choose the correct command to delete an attribute A from a relation R


aalter table R delete A


balter table R drop A


calter table drop A from R


ddelete A from R


View Answer alter table R drop A

Which of the following commands do we use to delete all the tuples from a relation (R)?


adelete table R


bdrop table R


c delete from R


ddrop from R


View Answer delete from R

Which of the following commands do we use to delete a relation (R) from a database?


adrop table R


bdrop relation R


cdelete table R


d delete from R


View Answer drop table R

What is the syntax to load data into the database? (Consider D as the database and a, b, c as data)


aenter into D (a, b, c);


binsert into D values (a, b, c);


cinsert into D (a, b, c);


d insert (a, b, c) values into D;



If a1, a2, a3 are attributes in a relation and S is another relation, which of the following is an incorrect specification of an integrity constraint?


aprimary key(a1, a2, a3)


b primary key(a1)


cforeign key(a1, a2) references S


d foreign key(a1, a2)



Which command is used to create a new relation in SQL


acreate table( , …)


bcreate relation( , …)


cnew table( , …)


dnew relation( , …)


View Answer create table( , …)

Which of the following data types does the SQL standard not support?


achar(n)


bString(n)


c varchar(n)


dfloat(n)


View Answer String(n)

Which of the following information does an SQL DDL not specify?


aThe schema for each relation


bThe integrity constraints


cThe operations on the tuples


d The security and authorization information for each relation



Goto Page No.

Page 2 of 54

Alphabetical MCQs Categories

Here below You find all kind of categories of MCQs in alphabetical order.


"Comprehensive Collection of MCQs: Alphabetically Organized by Subject"

"Discover an extensive collection of multiple-choice questions (MCQs) neatly categorized by subject from A to Z. This resource is designed for anyone eager to explore various topics in a straightforward and organized manner. Whether you're a student preparing for exams, an educator seeking supplementary materials, or simply curious about different subjects, this compilation offers a convenient way to learn and assess your knowledge. With questions arranged alphabetically, navigation is effortless, allowing you to delve into subjects of interest at your own pace. Engage, learn, and expand your understanding with this accessible and comprehensive repository of MCQs!"


BolPakistan

bolpakistan.com.pk includes Job Mcqs and Pak Mcqs is the Top Largest Mcqs Forum in World, in which you can read Mcqs of All Subjects, PPSC test preparation, FPSC, NTS and PPSC PAST PAPERS, PPSC PAST MCQS. A Collection of Repeated MCQs for JOBs seekers.

Copyright © 2024, Designed & Developed by BolPakistan