1.If we have a Salary coloumn in Staff entity with this
description the salary must be monetary and >=$35450.00,
how we can write it in into schemain SQL?

2. If we have Weight and Marks in Assessment entity and the
Weight has the description of this it must be Non-zero
percentage. And also the Marks attribute stores the maximum
possible raw mark for assessment (e.g., 30), while Weight
stores of the weight of this assessment for the paper as a
whole (e.g., 10%). If Marks is not specified, then Weight
is used for both. How we can convert this into schema in
SQL????



1.If we have a Salary coloumn in Staff entity with this description the salary must be monetary an..

Answer / Akhil Jain

1. For Staff entity:
CREATE TABLE Staff (
...,
Salary DECIMAL(10, 2) NOT NULL CHECK (Salary > 35450),
...
)

2. For Assessment entity:
CREATE TABLE Assessment (
...,
Marks INT CHECK (Marks >= 0),
Weight DECIMAL(5, 2) NOT NULL CHECK (Weight > 0),
...
);

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Database Management Interview Questions

What is database join?

1 Answers  


What is the use of FILE option in IMP command ?

1 Answers  


hi, i am new to database cau give me link where can i get about databse..

0 Answers  


What is the normal procedure followed by a java client to access the db?

1 Answers  


How to start and stop database control?

1 Answers   MCN Solutions,


What is difference between database and file?

1 Answers  


What is an extensible database?

1 Answers  


Mention the types of join?

1 Answers  


What are the integrity rules in dbms?

1 Answers  


Define denormalization.

1 Answers  


How many number of columns can a RECORD GROUP have ?

1 Answers  


I'm need to prepare Month Over Month Sales Growth report. Is there any function available in OBIEE to perform this task.

1 Answers   Infosys,


Categories