0% found this document useful (0 votes)
21 views6 pages

Technical Questions Based On Mysql

The document contains technical questions and answers related to MySQL. It covers topics like data integrity constraints, data normalization, adding columns, data mining, referential integrity, data warehousing, transaction logging, database abstraction levels, data redundancy, and SQL commands for querying, importing, sorting, counting, and more.

Uploaded by

Shail Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views6 pages

Technical Questions Based On Mysql

The document contains technical questions and answers related to MySQL. It covers topics like data integrity constraints, data normalization, adding columns, data mining, referential integrity, data warehousing, transaction logging, database abstraction levels, data redundancy, and SQL commands for querying, importing, sorting, counting, and more.

Uploaded by

Shail Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Technical Questions based on Mysql

• The student marks should not be greater than 100. This is


Integrity constraint

• BCNF Stands for ____ Boyce - Codd Normal Form_____.

• In an RDBMS relationship between tables are created by using


composite keys

• In order to add a new column to an existing table in SQL, we can use the command.
To add a new column to an existing table in SQL, you can use the following
command:
ALTER TABLE table_name
ADD COLUMN new_column_name data_type;
Replace table_name with the name of your existing table, new_column_name with
the name of the new column you want to add, and data_type with the appropriate
data type for the new column.

• _____ is process of extracting previously non known valid and actionable information
from large data to make crucial business and strategic decisions.
The process you are referring to is known as "Data Mining." Data mining involves
extracting valuable and actionable patterns, trends, and insights from large sets of
data to support decision-making in business and strategic contexts.

• Referential integrity is directly related to


Referential integrity is directly related to maintaining the consistency and
relationships between tables in a relational database. It ensures that relationships
between tables are valid by enforcing foreign key constraints. In other words,
referential integrity ensures that any foreign key in a table points to an existing,
valid primary key in another table. If a foreign key references a primary key, that
referenced key must exist, preventing orphaned or inconsistent data in the database.
• Data Warehouse provides
A data warehouse provides a centralized and integrated storage system for historical
data, supporting efficient querying, reporting, and analysis to facilitate business
intelligence and decision-making.

• The problem that occurs when one transaction updates a database item and then the
transaction fails for some reason is ____ Logical or Conceptual Level____.
• Which level of Abstraction describes what data are stored in the Database?
The level of abstraction that describes what data are stored in the database is known
as the "Physical Level" or "Storage Level." At this level, the database management
system (DBMS) defines how data is stored on the physical storage media such as
disks. It involves details such as data structures, file organization, indexing methods,
and access mechanisms. The physical level deals with the actual implementation of
data storage and retrieval.

• What is Granularity?
Granularity is the level of detail at which data are stored in a database.

• Storing same data in many places is called.


Data redundancy

• TCL is used for _______?


manage transactions within the database.

• DCL is used to _______?


control access to data stored in a database.

• DDL is used for _______?


used to create and modify the structure of objects in a database using predefined
commands and a specific syntax.

• DML is used for _______?


is a computer programming language used for adding (inserting), deleting, and
modifying (updating) data in a database.
• Query result can be displayed vertically by terminating the query____?
To display the query result vertically, you can terminate the query with a semicolon
(`;`). In many database systems, including SQL databases, the semicolon is used as a
statement terminator. When you execute a query and terminate it with a semicolon,
the result is often displayed vertically, showing each column's values in a separate
row. This can be useful for a clearer and more readable presentation of the query
output. Keep in mind that the exact behavior might depend on the specific database
management system you are using.

• Which command is used to import data form text file in MySQL on MySQL editor?
In MySQL, you can use the `LOAD DATA INFILE` command to import data from
a text file into a table. Specify the file path, target table, and delimiters for fields and
lines. Example:
LOAD DATA INFILE 'path/to/your/file.txt' INTO TABLE your_table FIELDS
TERMINATED BY ',' LINES TERMINATED BY '\n';

• The DISTINCT keyword used along with the SELECT keyword retrieves ______ ?
unique records from single or multiple columns/tables.

• Which clause is used to sort the result of SELECT statement?


ORDER BY clause.

• Which statement is used to count number of rows in table?


The SQL COUNT() Function

• Which statement is used to load data form file to table?


The LOAD DATA statement reads rows from a text file into a table at a very high
speed.
• What is maximum length of Database, Table, Column, trigger and view's name in
MySQL?
In MySQL, the maximum length for various identifiers is as follows:

1. Database Name: Up to 64 characters


2. Table Name: Up to 64 characters
3. Column Name: Up to 64 characters
4. Trigger Name: Up to 64 characters
5. View Name: Up to 64 characters

It's important to adhere to these length limits when naming databases, tables,
columns, triggers, and views in MySQL to ensure compatibility and proper
functioning of the database. If identifiers exceed these lengths, you may encounter
errors or unexpected behaviour.

• Which statement is used to displays information about the columns in a table.


SHOW COLUMNS

• Which statement is used to change database?


To change the current database in MySQL, you can use the USE statement.

• Which command returns current version on MySQL?


To retrieve the current version of MySQL, you can use the following SQL query:
SELECT VERSION();
Executing this query will return the version number of the MySQL server you are
connected to.
• Which statement is used to connect with mysql server?
To connect to a MySQL server, you use the `mysql` command-line client or another
MySQL client application. In the command-line client, you typically run:

mysql -u your_username -p

This command prompts you to enter your MySQL user password after hitting
Enter. Replace `your_username` with your actual MySQL username.

Alternatively, you can also include the `-h` option to specify the host if it's not on the
local machine:

mysql -u your_username -p -h your_hostname

Replace `your_hostname` with the hostname or IP address of the MySQL server.

After entering the command, you'll be prompted to enter your password, and upon
successful authentication, you'll be connected to the MySQL server.

• What is IGNORE keyword in MySQL?


In MySQL, the `IGNORE` keyword, used with the `INSERT` statement, allows the
database to skip inserting rows that would cause duplicate key violations, ensuring
the operation continues with the next row.

• How to see currently running queries in MySQL?


To see currently running queries in MySQL:

1. Use `SHOW PROCESSLIST;` query.


2. In MySQL command-line client, type `\g`.
3. In MySQL Workbench, go to "Server" > "Server Status."
• How to set value of "query_cache_size" MYSQL system variable
the SET statement by using the --maximum-query_cache_size= 32M option on the
command line or in the configuration file.

• Query to check value of MYSQL system variable


To check the value of a MySQL system variable, you can use the following query:

SHOW VARIABLES LIKE 'variable_name';

Replace `variable_name` with the name of the MySQL system variable you want to
check. For example, to check the value of the `max_connections` variable, you would
run:

SHOW VARIABLES LIKE 'max_connections';

This query will return the current value of the specified system variable.

• Mysql is ____?
MySQL is a relational database management system (RDBMS). It is an open-source
database server that uses SQL (Structured Query Language) for managing and
manipulating data. MySQL is known for its reliability, performance, and ease of
use, making it a popular choice for various applications, ranging from small-scale
projects to large-scale enterprise systems. It supports multiple storage engines,
transactions, and has extensive community support. MySQL is widely used in web
development, powering many dynamic websites and applications.

You might also like