Question 2
Marks : +2 | -2
Pass Ratio : 100%
create table apartment(ownerID varchar (5), ownername varchar(25), floor numeric(4,0), primary key (ownerID));
Explanation: It creates a relation apartment with three attributes as specified. The attribute ownername cannot be null because it is the primary key of the relation.
Question 3
Marks : +2 | -2
Pass Ratio : 100%
What is the syntax to load data into the database? (Consider D as the database and a, b, c as data)
Explanation: To load data into a database we use the insert into command. The syntax is
Question 4
Marks : +2 | -2
Pass Ratio : 100%
What does the notnull integrity constraint do?
Explanation: The notnull integrity constraint ensures that all the tuples have a finite value on the specified attribute in the relation. It avoids the specification of null values.
Question 5
Marks : +2 | -2
Pass Ratio : 100%
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?
Explanation: Whenever the integrity constraint foreign key is mentioned, the attributes that are the foreign keys should always be referenced from the relation in which they are primary keys.
Question 8
Marks : +2 | -2
Pass Ratio : 100%
Which of the following information does an SQL DDL not specify?
Explanation: The SQL DDL does not specify the operations that are supposed to be made on the tuples. DDL means Data definition language, hence it does not include the operations made.