MCQ Unit 1
MCQ Unit 1
Que.7)what is SQL?
A. Structured Query Language
B. Structured Question Language
C. Structured Query Level
D. Sturctued Query Lavels
Ans.A
Que.8)What is SQLite?
A. Stracture Query Language
B. Structure Question Language
C. Embeddable Relational Database Management System
D. Standalone Query Langauge
Ans.C
Que.9)Explain DML
A. Data Maintain Language
B. Date Manipulation Language
C. Data Multiple Language
D. Data ManipulDation Language
Ans.D
Que.13)SQLite is a
A. NoSQL database
303-Database Handling Using Python SY BCA SEM 3
B. Distributed database
C. Relational database
D. Operational database
Ans.Option c: SQLite is a relational database management system
Que.15)Any column can still store any type of data but the preferred storage class for a column is
called its?
A. Affinity
B. Type affinity
C. Column store
D. Type storage
Ans.A. Affinity
Que.26)What will be the output of following query : select * from EMP order by ename limit 2,3;
A. first all records are arranged in ascending order of ename column and then only display
only 3rd, 4th and 5th records from this ordered data
B. first all records are arranged in ascending order of ename column and then only display
only 4th and 5th records from this ordered data
C. First fetch only 4th and 5th records from EMP and then display in ascending order of
ename column
D. First fetch only 3rd, 4th and 5th records from EMP table and then display in ascending
order of ename column
Ans.A
Que.27)SQLite uses a dynamic typing technique also known as ________? Any column can still store
any type of data but the preferred storage class for a column is called its _______?
A. Affinity typing, Private storage
B. Manifest typing, Affinity
C. Affinity typing, Manifest
D. Storage typing, Private storage
Ans.B
Que.29)Which of the following statements can be used to disable auto-commit mode and control
transactions based on our requirements ?
A. disable auto-commit;
B. begin...commit and begin...rollback
C. pragma auto_commit off;
D. auto_commit to user;
Ans.B
C. Transactional
D. All Of the Above
Ans.D
Que.34)Which SQLite keyword is used to combine result of query from more than one tables of a
database?
A. IN
B. JOIN
C. BETWEEN
D. SELECT INTO
Ans.B
Que.37)Which of the keyword used to display the unique values of the column in SQLite?
A. ALL
B. FROM
C. DISTINCT
D. EXCEPT
303-Database Handling Using Python SY BCA SEM 3
Ans.C
Que.38)By whom & When SQLite was released? a) Korth in 2002 b) c) d) Dr. Edgar.Frank. Codd, in
2002
A. Guido van Rossum, in 2000
B. Dr. Edgar.Frank. Codd, in 2002
C. D. Richard Hipp, in 2000
D. David Axmark, in 2002
Ans.C
Que.40)For SQlite date and time, Real datatype is used to store days in?
A. Julian day numbers
B. Unix Time
C. ISO8601 strings
D. None
Ans.A
Que.41)Which database object is executed automatically when DML statement is issued against the
associated table.
A. Table
B. Trigger
C. View
D. Sequence
Ans.B
Que.44) Which conditional logic CASE expression only compares for equality?
A. Simple Case expression
B. Search Case expression
C. Both A and B
D. None of these
Ans.A
Que.45)Which operator is used to combine the results of two SELECT statements including
duplicate rows.
A. UNION
B. INTERSECT
C. UNION ALL
D. INTERSECT ALL
Ans.C
Que.46)Which clause returns only common rows returned by the two SELECT statements.
A. UNION
B. INTERSECT
C. EXCEPT
D. None of the above
Ans.B
Que.47)Which join returns all records from the left table, and the matched records from the right
table?
A. Inner join
B. Left outer join
C. Right outer join
D. Full outer join
Ans.B
Que.48)Using the _______ clause retains only one copy of identical tuples
A. Limit
B. Distinct
C. Intersect
D. Except
Ans.B
Que.51)What is correct method to delete all the rows where the 'name' is"Raj" in the 'Employee'
table?
A. DELETE FROM Employee where name = 'Raj'
B. DELETE name= 'Raj' FROM Employee
C. DELETE FROM Employee WHERE name == 'Raj'
D. DELETE 'Raj' FROM Employee
Ans.A
Que.54)In context to SQLite trigger, which amongst the following statements specifies a condition?
A. WHILE statement
B. FROM statment
C. WHERE statement
D. WHEN statement
Ans.D
Que.55)To view field name while exporting data from the SQLite database to a csv file _____ is used
A. .headers on
B. .header on
C. .column-name on
D. .mode csv
Ans.A
303-Database Handling Using Python SY BCA SEM 3
Que.56)This clause compares the results set of two queries and return distinct rows from the left
query that are not output by the right query.
A. Except clause
B. Union Clause
C. Intersect Clause
D. None of the Above
Ans.A
Que.59)Which data type is used to store large files like images, files
A. BLOB
B. TEXT
C. REAL
D. NONE
Ans.A
A. Embedded Applications
B. Disk Access Replacement
C. Testing
D. All of the mentioned
Ans.D
Que.65)The ______ commands are special commands which don’t end with a semicolon
A. Backup
B. Sub query
C. Dot
D. DML
Ans.C
Que.66)To filter the records of the sub groups the _____clause is used
A. Where
B. Between
C. Having
D. Like
Ans.C
Que.68)Which dot (.) command is used to display the structure of the table?
A. .table
B. .schema
C. .tabs
303-Database Handling Using Python SY BCA SEM 3
D. .tcl
Ans.B
Que.69)In python any column can store any type of data but preferred storage class is called
its__________
A. affinity
B. manifest
C. class
D. Namespace
Ans.A
Que.74)If you attempt to store a value with a numeric type (float or integer) into a column with a
text affinity,
A. it will be converted into an integer type before being stored
B. it will be converted into an floating type before being stored
C. it will be converted into a text representation before being stored as a text value type
D. it will be stored without any conversion
303-Database Handling Using Python SY BCA SEM 3
Ans.C
Que.75)Which of the following trigger can be fired on views rather than on tables?
A. instead of
B. before
C. after
D. all of the above
Ans.A
Que.76)What will happen if you give a column type to a table's column which does not match with
any of the SQLite column type then
A. the column is given the float affinity.
B. the column is assigned the numeric affinity.
C. then the column is given the text affinity.
D. then the column is given the integer affinity.
Ans.B
Que.77)Which of the following SELECT clause will skips over rows at the beginning of the result set.
A. DISTINCT
B. LIMIT
C. WHERE
D. OFFSET
Ans.D
Que.80)1. Any column can store any type of data what concept is it called ?
A. Manifest type
B. Affinity type
C. Both A and B
D. Type casting
Ans.A
303-Database Handling Using Python SY BCA SEM 3
B. Text
C. Blob
D. NULL
Ans.C
Que.89)4. In SQLite who will evaluates multiple conditions and returns the result based on
evaluation ?
A. UNION Clause
B. HAVING Clause
C. CASE
D. GROUP BY Clause
Ans.C
Que.92)To Find any value that starts with 2 and have exactly 3 characters in length
A. SELECT * FROM COMPANY WHERE ADDRESS LIKE '2_%’
B. SELECT * FROM COMPANY WHERE ADDRESS LIKE ‘2%_’
C. SELECT * FROM COMPANY WHERE ADDRESS GLOB '2??'
D. d)All of the above
Ans.C
D. cross join
Ans.B
Que.96)Which Constraint can be used to ensure that the Emp_id in emp table must start with e?
A. Check Contraint
B. Not Null Contraint
C. Unique Contraint
D. Forign Key Contraint
Ans.A
Que.102)SQL _______ constraints are used to enforce "exists" relationships between tables
A. Primary Constraints
B. Unique Constraints
C. Foreign Key Constraints
D. Check Constraints
Ans.C
B. Back End
C. CUI
D. GUI
Ans.B
Que.107)Which of the following command is true regarding SQLite ALTER TABLE Statement
(Rename)?
A. ALTER TABLE table_name ADD COLUMN column_def...;
B. ALTER TABLE table_name RENAME TO new_table_name;
C. ALTER TABLE table_name COLUMN column_def...;
D. ALTER TABLE table_name TO new_table_name;
Ans.B
Que.110)Which operator is used to search for values that are within a set of values, given the
minimum value and the maximum value?
A. AND
B. IN
C. EXISTS
D. BETWEEN
Ans.D
Que.112)The master table holds the key information about your database tables and it is called?
A. sqlite_master
B. sqlite_source
303-Database Handling Using Python SY BCA SEM 3
C. sqlitemaster
D. sqlite
Ans.A
Que.119)In SQLite which is used to combine rows from more than one tables in database?
A. BETWEEN
B. IN
C. JOIN
D. SELECT INTO
Ans.C
Que.121)Display the list of student having patel in his name.which one is correct query?
A. Select * from student where name like '_patel_'
B. Select * from student where name like '%patel%'
C. Select * from student where name = '_patel_'
D. Select * from student where name = '_patel%'
Ans.Select * from student where name like '%patel%'
Que.124)Any column can still store any type of data but the preferred storage class for a column is
called its ?
A. affinity
B. type
C. column store
D. type storage
Ans.A
Que.128)If we have not specified ASC or DESC after a SQLite3 ORDER BY clause, the following is
used by default
A. DESC
B. ASC
C. There is no default value
D. None
Ans.B
Que.130)Which type of JOIN is used to returns rows that do not have matching values?
A. Natural JOIN
B. Outer JOIN
C. EQUI JOIN
D. All
Ans.B
C. Drop
D. Modify
Ans.B
Que.134)Sqlite does not have a separate Boolean storage class. Values are stored as integer
___________ (false) and ____ (true).
A. 0,1
B. 1,0
C. 0,0
D. 1,1
Ans.A
Que.135)In sqlite ___ operator is used to match text values against a pattern matching using
wildcards ______ & _______.
A. Like, %, *
B. Like, ?, _
C. Like, *, ?
D. Like, %, _
Ans.D
Que.137)Advantages of SQLite :
A. Lightweight
B. No Installation Needed
C. Portable
303-Database Handling Using Python SY BCA SEM 3
Que.145)_____ function opens a connection to the SQLite database file. If database is opened
successfully, it returns a connection object.
A. Open()
B. Connect()
C. Connection()
D. Execute()
Ans.B
Que.146)This method fetches the next row of a query result set, returning a single sequence, or
None when no more data is available.
A. fetchone()
B. fetchnext()
C. fetchall()
D. fetch()
Ans.A
Que.149)_____ is primarily integer position based (from 0 to length-1 of the axis), but may also be
used with a boolean array
A. Loc()
B. iLoc()
C. Values()
D. std()
303-Database Handling Using Python SY BCA SEM 3
Ans.B
Que.150)_____ uses dots to represent values for two different numeric variables. The position of
each dot on the horizontal and vertical axis indicates values for an individual data point. It is used
to observe relationships between variables.
A. Bar Chart
B. Line Chart
C. Histogram
D. Scatter Plot
Ans.D
Que.151)_____ consists of adjacent rectangles erected on the x axis, split into discrete intervals
called bins, and with an area proportional to the frequency of the occurrences for that bin. This kind
of visualization is commonly used in statistical studies about distribution of samples.
A. Bar Chart
B. Line Chart
C. Histogram
D. Scatter Plot
Ans.C
Que.152)__________ is an environment variable which you can set to add additional directories where
python will look for modules and packages.
A. PATH
B. PYTHONPATH
C. PYTHONDICT
D. LOCATION
Ans.B
Que.156) Which of the following file is not available in SQLite folder when installed in CUI mode?
A. sqldiff.exe
B. sqlite3.exe
C. sqlite3_analyzer.exe
D. sqlite3_db.exe
Ans.D
Que.157) Which of the following can be used to use different tables from different database.
A. Detach Databases
B. Attach Databases
C. Locate Databases
D. Open Databases
Ans.B
Que.160) Which join condition return all records for first joining table and the matching common
records available in second table?
A. Inner Join
B. Right Join
C. Left Join
D. Full Join
Ans.C
Ans.A