MySQL Quiz: SQL and Database Management Questions, Cheat Sheet of Computer science

A series of multiple-choice questions and true/false statements related to mysql, a relational database management system. It covers topics such as sql syntax, database organization, aggregate functions, and database manipulation commands. The questions are designed to test understanding of key concepts in database management and sql programming, making it a useful resource for students learning about databases. It also includes a practical exercise on creating a table using sql statements. Suitable for high school students studying database management systems and sql.

Typology: Cheat Sheet

2024/2025

Uploaded on 08/04/2025

dhairya-singh-chauhan
dhairya-singh-chauhan 🇮🇳

1 document

1 / 7

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
MBTB/GBTB/RSTIL/MYSQL/JAN-25
1. Fill in the blank ( Marks 5)
1. The _________ statement is used to retrieve the data from one or more tables in a database.
2. MySQL is a ___________________ database management system.
3. Full form of SQL __________________.
4. CREATE VIEW person_1 AS SELECT fname, lname, person_id _______________________person.
5. MySQL is very friendly with ___________________, the most popular language for web development.
2. State Whether The Following Statement Are True Or False (Marks: 5)
1. Text functions cannot accept numbers as arguments. True False
2. The length() function ignore blank spaces from the text. True False
3. round() and truncate() functions returns the similar values. True False
4. The concat() function make additions for two numbers. True False
5. The place where the server stores its database and
status files is the data directory True False
pf3
pf4
pf5

Partial preview of the text

Download MySQL Quiz: SQL and Database Management Questions and more Cheat Sheet Computer science in PDF only on Docsity!

1. Fill in the blank ( Marks 5) 1. The _________ statement is used to retrieve the data from one or more tables in a database. 2. MySQL is a ___________________ database management system. 3. Full form of ‘SQL’ __________________. 4. CREATE VIEW person_1 AS SELECT fname, lname, person_id _______________________person. 5. MySQL is very friendly with ___________________, the most popular language for web development. 2. State Whether The Following Statement Are True Or False (Marks: 5) 1. Text functions cannot accept numbers as arguments.  True  False 2. The length() function ignore blank spaces from the text.  True  False 3. round() and truncate() functions returns the similar values.  True  False 4. The concat() function make additions for two numbers.  True  False 5. The place where the server stores its database and status files is the data directory True  False

3. Multiple Choice Question (Tick the Correct One) (Marks: 30) 1. Which type of database management system is MySQL?  Object-oriented  Hierarchical Relational  Network 2. What is data in a MySQL database organized into? Objects Tables Networks File systems 3. What is the default port for MySQL Server?  3305  3306  3308  3307 4. What represents a ‘tuple’ in a relational database? Table Row Column Object 5. When do we use a HAVING clause?   To limit the output of a queryWhen GROUP by is used  To limit the output of a query using an aggregate function onlyall of the above 6. What will be the output of the following query? SELECT account_id, product_id, cust_id FROM account WHERE product_id IN (  Only those values are selected whose product_id is either ‘sav’, ‘chd’, ‘mm’ ‘sav’, ‘chd’, ‘mm’);   Only those values are selected whose product_id is eitherOnly those values are selected whose product_id is either ‘‘savsav’’’, ‘chd’  All of the mentioned 7. A command that lets you change one or more fields in a record is  INSERT  MODIFY  LOOKUP  ALL

  1. Which SQL keyword is used to retrieve a maximum value? UPPER  MAXIMUM  MOST  MAX
  2. Which of the following is a SQL aggregate function?  LEFT  AVG  JOIN  LEN
  3. (^) Which SQL statement is used to delete data FROM a database? COLLAPSE REMOVE  ALTER  DELETE
  4. What represents a  Row  Column ‘tuple ’ in a relational database? Object  Table
  1. Which clause is mandatory with clause  FROM WHERE Both FROM and WHERE “SELECT” in Mysql? None of the mentioned
  2. What SQL clause is used to restrict the rows returned by a query? AND WHERE HAVING FROM
  3. How can we get the number of records or rows in a table? Using COUNT Using NUM Using NUMBER Both a and c

28. What is joining a table to itself called?

 Complete  self  obsolete  cross

  1. Which among the following belongs to an aggregate function? COUNT UPPER LOWER All of the mentioned
  2. The keyword used with UNION that retains duplicate row is_______________ ALL  NARROW STRICT DISTINCT 4. Solve the problems (Marks:10)
  3. Write a Query to create table of Table NameMobile no & Birth of Date] using MYSQL Statements and insert three records in customer table?” Customer” having column names [Cust_id, Cust_name, Address,
  4. Write an SQL query to create a table TEACHER with the following structure. Teacher_ID^ Field^ IntergerType Teacher_nameQualification Varchar(20)Varchar(20) Date_of_appointment Date