MYSQL

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

What do DDL, DML, and DCL stand for?

DDL is the abbreviation for Data Definition Language dealing with database schemas as well as the description of how data resides in the database. An example is CREATE TABLE command. DML denotes Data Manipulation Language such as SELECT, INSERT etc. DCL stands for Data Control Language and includes commands like GRANT, REVOKE etc.

What are the different types of tables in MySQL?

MyISAM is the default table that is based on the sequential access method. HEAP is the table that is used for fast data access but data will be lost if the table or system crashes. InoDB is the table that supports transactions using the COMMIT and ROLL BACK commands. BDB can support transactions similar to InoDB but the execution is slower.

What are the features of MySQL?

MySQL provides cross-platform support, wide range of interfaces for application programming and has many stored procedures like triggers and cursors that helps in managing the database.

What is the storage engine for MySQL?

Storage tables are named as table types. The data is stored in the files using multiple techniques such as indexing, locking levels, capabilities and functions.

What is the difference between DELETE TABLE and TRUNCATE TABLE commands in MySQL?

Basically DELETE TABLE is logged operation and every row deleted is logged. Therefore the process is usually slow. TRUNCATE TABLE also deletes rows in a table but it will not log any of the rows deleted. The process is faster in comparison. TRUNCATE TABLE can be rolled back and is functionally similar to the DELETE statement using no WHERE clause.

What are the common MySQL functions?

Common MySQL functions are as follows: • NOWO - function for returning current date and time as single value. • CURRDATEO - function for returning the current date or time. • CONCAT (X, Y) - function to concatenates two string values creating single string output. • DATEDIFF (X, Y) - function to determine difference two dates.

What is the difference between LIKE and REGEXP operators in MySQL?

LIKE is denoted using the % sign. For example:SELECT * FROM user WHERE user name LIKE "%NAME".• On the other hand the use of REGEXP is as follows:SELECT * FROM user WHERE username REGEXP "^NAME";

How and why use it?

SQL Server is free and anyone can download and use it. The application uses SQL (Structured Query Language) and is easy to use

What is SQL Server?

SQL Server is one of the Database Management Systems (DBMS) and is designed by Microsoft. DBMS are computer software applications with the capability of interacting with user, various other applications as well as the database itself. The objective is capturing and analyzing data and manages definition, querying, creation, updating as well as administration of database.

Compare MySQL Vs. SQL Server

Targeted towards: MySQL-->Internet servers & Open Source software SQL Server--> Corporate & Enterprise market; Functionality: MySQL-->Speed SQL Server-->Administration, Graphical data modelling;

How can one restart SQL Server in single user or minimal configuration modes?

The command line SQLSERVER.EXE used with -m will restart SQL Server in single user mode and with -f will start it in minimal configuration mode.

What is the default port for MySQL Server?

The default port for MySQL Server is 3306. Another standard default is port 1433 in TCP/IP for SQL Server.

What are the TRIGGERS that can be used in MySQL tables?

The following TRIGGERS are allowed in MySQL: BEFORE INSERT AFTER INSERT BEFORE UPDATE AFTER UPDATE BEFORE DELETE AFTER DELETE

What is the basic MySQL architecture?

The logical architecture of MySQL is made of 'connection manager', 'query optimizer', and 'pluggable engines'.

What are the limits for using columns to create the Index?

The maximum limits of indexed columns that could be created for any table is 16.

What are types of joins in MySQL?

There are four types of Joins in MySQL. Inner Join returns the rows if there is at least one match in both the tables. Left Join returns all the rows form the left table even if there is no match in the right table. Right Join returns all the rows from the right table even if no matches exist in left table. Full Join would return rows when there is at least one match in the tables.

What is meant by transaction and ACID properties?

Transaction is logical unit of work where either all or none of the steps should be performed. ACID is the abbreviation for Atomicity, Consistency, Isolation, and Durability that are properties of any transaction.

What is the difference between CHAR and VARCHAR?

When the table is created, CHAR is used to define the fixed length of the table and columns. The length value could be in the range of 1-255. VARCHAR command is given to adjust the column and table length as required.

What is the difference between primary key and unique key?

While both are used to enforce uniqueness of the column defined but primary key would create a clustered index whereas unique key would create non-clustered index on the column. Primary key does not allow 'NULL' but unique key allows it.

What are joins in SQL?

n MySQL the Joins are used to query data from two or more tables. The query is made using relationship between certain columns existing in the table. There are four types of Joins in MySQL. Inner Join returns the rows if there is at least one match in both the tables. Left Join returns all the rows form the left table even if there is no match in the right table. Right Join returns all the rows from the right table even if no matches exist in left table. Full Join would return rows when there is at least one match in the tables.

What are the different types of strings in Database columns in MySQL?

Different types of strings that can be used for database columns are SET, BLOB, VARCHAR, TEX, ENUM, and CHAR.

What is the difference between primary key and candidate key?

Primary key in MySQL is use to identify every row of a table in unique manner. For one table there is only one primary key. One of the candidate keys is the primary key and the candidate keys can be used to reference the foreign keys.

What is the syntax for concatenating tables in MySQL?

The syntax for concatenating tables is MySQL is CONCAT (string 1, string 2, string 3)

How the user can get the current SQL version?

The syntax for getting the current version of MySQL is SELECT VERSION ();


Set pelajaran terkait

HESI/Saunders Module 7: Basic Care and Comfort

View Set

Chapter 43 musculoskeletal trauma

View Set