Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ALTER TABLE STUDENT ADD CONSTRAINT C CHECK ( Major IN ( ' CS ' , ' IS ' , ' IT ' ) ) ;

ALTER TABLE STUDENT ADD CONSTRAINT C CHECK(Major IN('CS','IS','IT'));
c) ALTER TABLE STUDENT ADD Major CHAR(2) IN('CS','IS','IT');
d) None of the above.
Consider the following relation schema:
STUDENT
Which of the following statements creates the above relation?
a) CREATE TABLE STUDENT (
Name CHAR(35),
Student_Number INT CHECK(Student_Number BETWEEN 1 AND 9999),
Class INT CHECK(Class IN(1,5,8,9,15)) NOT NULL );
b) CREATE TABLE STUDENT (
Name VARCHAR(35),
Student_Number INT CHECK(Student_Number BETWEEN 1 AND 10000),
Class INT NOT NULL CHECK (Class =1 OR Class =5 OR Class =8 OR Class =9 OR Class =15);
c) CREATE TABLE STUDENT (
Name VARCHAR(35),
Student_Number INT CHECK(Student_Number >0 AND Student_Number =10000),
Class INT CHECK(Class IN(1,5,8,9,15)));
d) None of the above
Consider the following relation schema:
BOOK
Maximum 5000-The maximum number of characters is 40
Which of the following statements creates the above relation?
a) CREATE TABLE BOOK (
Book_ID DECIMAL (3,0) PRIMARY KEY,
Title VARCHAR(40) NOT NULL,
Publisher_Name VARCHAR(40) UNIQUE,
CHECK(Book_ID >0 AND Book_ID 5001);
b) CREATE TABLE BOOK (
Book_ID INT PRIMARY KEY CHECK(Book_ID>0 AND Book_ID=5000),
Title VARCHAR(40),
Publisher_Name CHAR(40) UNIQUE);
c) CREATE TABLE BOOK (
Book_ID INT PRIMARY KEY CHECK(Book_ID BETWEEN 1 AND 5000),
UNIQUE (Publisher_Name),
Title VARCHAR(40) NOT NULL,
Publisher_Name VARCHAR(40));
d) None of the above.
Consider the following relation schema:
BOOK
Which of the following statements creates the above relation?
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Modeling And Design

Authors: Toby J. Teorey, Sam S. Lightstone, Tom Nadeau, H.V. Jagadish

5th Edition

0123820200, 978-0123820204

More Books

Students also viewed these Databases questions