The final i'm ducked for
INSERT INTO Student VALUES ('Peter'
'Jackson'), With SQL, how can you insert a new record into the "Student" table? Note: Student table has only two attributes, which are Fname and Lname.
It returns the results of table R renaming the attributes
, , . . .𝐴1 𝐴2 𝐴3, What does the following relational operation perform?
tuple
A row of a table in relational model terminology is classified as _________
Weak entity set
An entity set that does not have sufficient attributes to form a primary key is termed a __________
nonprime attribute
If the attribute of relation schema R is not a member of some candidate key then this type of attributes is classified as ______________.
Three
If two entities have many to many relationships mostly results in how many tables.
insert is rejected
If two or more constraints are violated by using insert operation then by default the ________
Number of tuples in R +Number of tuples in S - Number of the common tuples between R and S
If we have two relation R and S that are union compatible, the number of tuples in the output of their union equal __________
Entity
If you were collecting and storing information about your music collection, an album would be considered a/an ___________
candidate key
In a relation schema, each key of schema having more than one key is classified as _________
domain
In formal relational model, a set of indivisible values that could be a value for certain attribute is called ______________
Table
In relational algebra, the term relation is equivalent to ________.
Row
In relational algebra, the term tuple is equivalent to ______
relation
In relational model terminology, the table is considered as ____________
First
In the __________ normal form, a composite attribute is converted to individual attributes.
explicit constraints
In the data model schemas, the constraints that are expressed directly are classified as _________
implicit constraints
In the data model, the inherent constraints are classified as ______________
left hand side
In the functional dependency between two sets of attributes A and B then the set of attributes A of database is classified as _________________
semantics of relation
In the tuples, the interpretation of the values of the attribute is considered as __________
SELECT * FROM Student WHERE FirstName='Adam'
With SQL, how do you select all the records from a table named "Student" where the value of the column "FirstName" is "Adam"?
One Tuple
How many tuples does the following SQL statement retrieve? SELECT sum(salary) FROM Department, Employee WHERE Mgr=Eid
Phone_number
Select from the following the multi-valued attribute.
Composite attribute
Select the attributes which are made up of more than one single attribute.
7000
Suppose that the following SQL statement will retrieve one value. What is this value? SELECT sum(salary) FROM Department, Employee WHERE Mgr=Eid
4200
Suppose that the following SQL statement will retrieve one value. What is this value? SELECT sum(salary) FROM Employee WHERE Eid in (SELECT DISTINCT Mgr FROM Department)
SELECT name FROM Movies WHERE director IS NULL
Suppose that we have the following table schema: Movies (id, name, director) Which of the following queries could retrieve the movie names that don't have a director in the database (the director attribute equals NULL)?
Project
Suppose we want to list all students' ids and names, but do not care about their addresses. Which of the following operations allows us to produce this relation?
Entity
The Rectangles in ERD represent __________
Derived
The attribute AGE is?
all of the above
The basic operations that can be performed on relations are _________
∪
The binary operation union, denoted as in the set theory by ___________
lossless join property
The joining property which guarantees that spurious tuple generation problem is not created after decomposition is called _______________
super key
The key which specifies that two different tuples cannot have the same value is classified as __________
first normal form
The normal form which only includes indivisible values or single atomic values is classified as ____________
third normal form
The normalization form which is based on the transitive dependency is classified as _______________
Cardinality
The number of entities to which another entity can be related through a relationship set is called?
degree
The number of the attributes of the relation is considered as the ___________ of the relation
cardinality
The number of tuples in a relation is considered as the ____________ of a relation
delete operation
The operation which violates only one constraint called referential integrity when it is performed is called ______________
Select
The output table schema always match the input table schema when we use the __________ operation
On the side where many relationships are defined
The primary key in a many to one relationship, acts as a foreign key on which side?
Greek letter pi (𝜋)
The project operation selects tuples with some attributes that we wish to include but some attributes we do not want to include in the final relation. We use the lowercase ______ to denote project operation
Diamond
The relationship is represented in E-R diagram as________________
Greek letter sigma
The select operation selects tuples that satisfy a given predicate. We use the lower case __________ to denote selection
Unary operations
The select, project, and rename operations are called________
invalid state
The state in which the database does not follow integrity constraints is classified as ___________
valid state
The state in which the database follows all the integrity constraints is classified as _______
Tuples
The system executes the rest of the trigger body that is satisfying the condition only for the ___________
domain constraint
The type of constraint in which the value of each attribute (X) must be an indivisible value from domain(X) is classified as _________
Double rectangle
Weak entity set is represented as____________
Tuple
What are rows of a relation known as?
CREATE Table
What command is used to create a new table in SQL?
Delete all tuples in table student
What does the following statement in SQL do? DELETE FROM student
HAVING Clause
What is the clause that is responsible for adding a condition to an aggregate function?
Both of them are string data types but CHAR has fixed length while VARCHAR is variable
What is the difference between the CHAR(n) and VARCHAR(n) data types?
EXIST
What is the name of the function that is used to check whether the query result is empty or not?
referential integrity
When the foreign key refers to a tuple which does not exist in the subjected relation then the constraint violated is __________
entity integrity constraint
When the primary key is null of the new tuple then the constraint violated is __________
DEFAULT
Which SQL constraint do we use to set some value to a field whose value has not been added explicitly?
ORDER BY
Which SQL keyword is used to sort the result-set?
SELECT DISTINCT
Which SQL statement is used to return only different values?
UPDATE
Which SQL statement is used to update data in a database?
3NF
Which forms simplifies and ensures that there are minimal data aggregates and repetitive groups?
Entity-relationship diagram
Which of the following gives a conceptual structure of the database graphically?
Manipulate
Which of the following is not a relational algebra operation?
Manipulation
Which of the following is not from the typical trigger components?
Data Definition Language
Which of the following is the full form of DDL?
Set difference
Which of the following operations allows us to find the tuples that are in one relation but are not in another relation?
Join operation
Which of the following operations that is equivalent to combine certain selections and a cross product?
Finds all the tuples in Employee where the salary is greater than 1200
Which of the following relational algebra expression do?
The names of the attributes are unique inside a database
Which of the following statement is not true about the attributes in a relation?
ALTER
Which of the operations are not specified in triggers?
INSERT INTO Student (LastName) VALUES ('Salah')
With SQL, how can you insert "Salah" as the "LastName" in the "Student" table? The Student table has two attributes FirstName and LastName.
SELECT * FROM Products
With SQL, how do you select all the columns from a table named "Products"?
SELECT * FROM Student WHERE FirstName='Robin' AND LastName='Williams'
With SQL, how do you select all the records from a table named "Student" where the "FirstName" is "Robin" and the "LastName" is "Williams"?
SELECT * FROM Student WHERE FirstName LIKE '%a'
With SQL, how do you select all the records from a table named "Student" where the value of the column "FirstName" ends with an "a"?
Three tuples
Consider the following schema: Movies Mid Mname Did 1 Braveheart 1 2 Lethal Weapon 5 1 3 Titanic 2 4 Avatar 2 5 Shawshank 3 Directors Did Dname 1 Mell Gibson 2 James Cameron 3 Frank Darabont 4 Jane Campion 5 Hitchcock Note: Attribute Mid in Movies is its primary key. Attribute Did in Directors is its primary key. Attribute Did in Movies is a foreign key to Directors How many tuples does the following SQL statement retrieve? SELECT DISTINCT Did FROM Movies
Five tuples
Consider the following schema: Movies Mid Mname Did 1 Braveheart 1 2 Lethal Weapon 5 1 3 Titanic 2 4 Avatar 2 5 Shawshank 3 Directors Did Dname 1 Mell Gibson 2 James Cameron 3 Frank Darabont 4 Jane Campion 5 Hitchcock Note: Attribute Mid in Movies is its primary key. Attribute Did in Directors is its primary key. Attribute Did in Movies is a foreign key to Directors How many tuples does the following SQL statement retrieve? SELECT Did FROM Movies
Five tuples
Consider the following schema: Movies Mid Mname Did 1 Braveheart 1 2 Lethal Weapon 5 1 3 Titanic 2 4 Avatar 2 5 Shawshank 3 Directors Did Dname 1 Mell Gibson 2 James Cameron 3 Frank Darabont 4 Jane Campion 5 Hitchcock Note: Attribute Mid in Movies is its primary key. Attribute Did in Directors is its primary key. Attribute Did in Movies is a foreign key to Directors How many tuples does the following SQL statement retrieve? SELECT Dname FROM Directors
Three
Consider the relation R = {A, B, C, D, E, F} and the set of functional dependencies {A → DE, B → C, DE → F, F → AB}. How many different keys for the relation R?
AC
Consider the relation R = {A, B, C, D, E, F} and the set of functional dependencies {A → DE, B → C, DE → F, F → AB}. Which one of the following is not considered a key for the relation R?
full functional dependency
Considering the functional dependency, the one in which removal from some attributes must affect dependency is called __________________
A → B
Considering the relational database, the functional dependency between two attributes A and B is denoted by ______
Identifying entity
For a weak entity set to be meaningful, it must be associated with another entity set, called the______________
Three Tuples
How many tuples does the following SQL statement retrieve? SELECT Dname, sum(salary) FROM Department, Employee WHERE Department.Did=Employee.Did GROUP BY Dname
Cartesian product
union, and set difference, Which of the following are the binary operations?
