Complete Subject Question Bank
Tom has designed a payroll software for XYZ technology.The sofware will store the salary details into the database and later he can retreive the same for future references. Tom falls under which category of user.
Tom writes application code that stores and retrieves data — he is an Application Programmer.
In SQL is a case sensitive language and the data stored inside the table are case in-sensitive. Say true or false?
SQL keywords are case-insensitive; data values are case-sensitive by default in most RDBMS.
Which of the following is not a valid relational database?
XML databases are hierarchical/document stores, not relational databases.
Database is a shared collection of logically unrelated data, designed to meet the needs of an organization. State True or False.
A database is a collection of logically RELATED data — the statement is false.
Which of the following represents the degree of the relation?
The degree of a relation is its number of attributes.
A table consists of ______ primary keys.
Each table has exactly one primary key (which may be composite).
We need to ensure that the amount withdrawn should be less then the credit card limit amount, to ensure this integrity what type constraint will be used?
A CHECK constraint enforces domain integrity rules like withdrawal limits.
Which of the following options is not correct?
The correct syntax is ALTER TABLE emp DROP COLUMN salary; — missing the COLUMN keyword.
An emp table contains fields employ name, desig and salary. How do you drop column salary?
The correct DDL is: ALTER TABLE emp DROP COLUMN salary;
Which of the following is not modification of the database
XML databases are hierarchical/document stores, not relational databases.
In a relational database a referential integrity constraint can be done using
Foreign Keys enforce referential integrity between tables.
___________ removes data from the table, but structure remains the same.
TRUNCATE removes all rows but preserves the table structure; it is a DDL command.
A relational database consists of a collection of
A relational database organises data into tables (relations).
Column header is referred as
A column header in a relational table is called an attribute.
Consider the below table structure: Column Name DataType Constraint Empname Varchar(20) Not Null EmpId int(10) PK Phoneno bigint(10) Not Null insert into employee(empid,empname)values('123','John'); When we issue the above insert command and if the statement fails, what would be the reason.
phoneno has a NOT NULL constraint so it must be provided. empid is numeric so no quotes needed — that part is actually correct; the real issue is only the missing phoneno value.
Examine the structure of the STUDENT table: Column Name DataType Constraint Stud_id int(3) PK Name Varchar(20) Not Null Address Varchar(30) DOB Date Which statement inserts a new row into the STUDENT table?
Providing all column values in the correct order satisfies the table constraints.
State True or False. COMMIT ends the current transaction by making all pending data changes permanent.
COMMIT permanently saves all changes made in the current transaction.
Merge is not supported by MySQL. The other possible way of doing the work of merge statement, is by using ON DUPLICATE KEY UPDATE in the insert statement. State TRUE or FALSE.
MySQL uses INSERT ... ON DUPLICATE KEY UPDATE as an alternative to MERGE.
Which of the below is a reference option for deleting rows from a table?
ON DELETE CASCADE automatically deletes child rows when the parent row is deleted.
To remove a relation from SQL database, we use ___________ command.
DROP TABLE removes the entire table structure and data from the database.
Based on our question bank analysis, master these concepts to score high in Database Management.
Test your knowledge under real exam conditions with our curated mock assessment.
Start Preparing for Primers