Technical Questions Based On Mysql
Technical Questions Based On Mysql
• 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.
• 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.
• 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.
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.
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:
After entering the command, you'll be prompted to enter your password, and upon
successful authentication, you'll be connected to the MySQL server.
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:
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.