Which of the Following Statements Can Be Used to View the Structure of the Orders Table?

What is Structured Query Language (SQL)?

Structured Query Language (SQL) is a standardized programming language that is used to manage relational databases and perform various operations on the information in them. Initially created in the 1970s, SQL is regularly used non but by database administrators, merely also past developers writing data integration scripts and data analysts looking to prepare and run analytical queries.

The term SQL is pronounced ess-kew-ell or sequel.

SQL is used for the following:

  • modifying database tabular array and index structures;
  • calculation, updating and deleting rows of data; and
  • retrieving subsets of information from within relational database direction systems (RDBMSes) -- this information can be used for transaction processing, analytics applications and other applications that require communicating with a relational database.

SQL queries and other operations take the form of commands written every bit statements and are aggregated into programs that enable users to add, change or retrieve information from database tables.

A table is the most basic unit of a database and consists of rows and columns of information. A single table holds records, and each record is stored in a row of the tabular array. Tables are the most used blazon of database objects, or structures that hold or reference information in a relational database. Other types of database objects include the following:

  • Views are logical representations of data assembled from i or more than database tables.
  • Indexes are lookup tables that help speed up database lookup functions.
  • Reports consist of data retrieved from one or more tables, normally a subset of that data that is selected based on search criteria.

Each column in a table corresponds to a category of data -- for example, client name or address -- while each row contains a data value for the intersecting column.

Relational databases are relational because they are composed of tables that relate to each other. For example, a SQL database used for client service tin can have one table for customer names and addresses and other tables that hold information near specific purchases, product codes and client contacts. A tabular array used to rail customer contacts usually uses a unique customer identifier chosen a primal or primary fundamental to reference the customer's tape in a separate table used to store client data, such as name and contact information.

SQL became the de facto standard programming language for relational databases after they emerged in the late 1970s and early 1980s.

Relational vs. nonrelational databases
The SQL query language tin can be used for relational or nonrelational databases, but information technology offers advantages for relational databases.

SQL standard and proprietary extensions

An official SQL standard was adopted by the American National Standards Institute (ANSI) in 1986, with the International Organization for Standardization (ISO) adopting the standard in 1987. New versions of the SQL standard are published every few years, the most contempo in 2016.

ISO/IEC 9075 is the ISO SQL standard developed jointly by ISO and the International Electrotechnical Commission. The standard way of referring to an ISO standard version is to use the standards organizations -- ISO/IEC -- followed by the ISO standard number, a colon and the publication yr. The current ISO standard for SQL is ISO/IEC 9075:2016.

Both proprietary and open up source RDBMSes built around SQL are available for employ by organizations. SQL-compliant database server products include the following:

  • Microsoft SQL Server
  • Oracle Database
  • IBM Db2
  • SAP HANA
  • SAP Adaptive Server
  • Oracle MySQL
  • open source PostgreSQL

Some versions of SQL include proprietary extensions to the standard language for procedural programming and other functions. For example, Microsoft offers a ready of extensions called Transact-SQL, while Oracle's extended version of the standard is Procedural Language for SQL. Commercial vendors offer proprietary extensions to differentiate their product offerings by giving customers additional features and functions. Equally a upshot, the different variants of extended SQL offered by vendors are not fully compatible with 1 another.

SQL commands and syntax

SQL is, fundamentally, a programming linguistic communication designed for accessing, modifying and extracting data from relational databases. As a programming linguistic communication, SQL has commands and a syntax for issuing those commands.

SQL commands are divided into several different types, including the following:

  • Data Definition Language ( DDL ) commands are also chosen data definition commands because they are used to define information tables.
  • Data Manipulation Language (DML) commands are used to dispense data in existing tables by calculation, irresolute or removing data. Different DDL commands that define how data is stored, DML commands operate in the tables defined with DDL commands.
  • Data Query Linguistic communication consists of just one command, SELECT, used to get specific information from tables. This control is sometimes grouped with the DML commands.
  • Data Control Language commands are used to grant or revoke user access privileges.
  • Transaction Control Language commands are used to modify the state of some data -- for example, to COMMIT transaction changes or to ROLLBACK transaction changes.

SQL syntax, the fix of rules for how SQL statements are written and formatted, is similar to other programming languages. Some components of SQL syntax include the post-obit:

  • SQL statements start with a SQL command and end with a semicolon (;), for example:
                    SELECT * FROM customers;              
    This SELECT statement extracts all of the contents of a table chosen customers.
  • SQL statements are example-insensitive, meaning that they can exist written using lowercase, uppercase or a combination. Notwithstanding, it is customary to write out SQL keywords -- commands or control operators -- in all-caps and table/column names in lowercase. Words in the statement tin can be treated as case-sensitive using quotes, and then the following 2 statements produce identical results.
                    SELECT * FROM customers;                
    select * from CUSTOMERS;
    These two statements are different:
                    SELECT * FROM customers;
    SELECT * FROM "Customers";
  • SQL statements are terminated only past the semicolon, meaning that more than complex statements tin be rendered across multiple lines, like this one:
                    SELECT proper name, phone, age
    FROM customers;
    This command selects the contents of the columns name, telephone and age in the tabular array customers.
  • SQL statements can comprise programme catamenia controls, pregnant that a argument can comprise table and row selection -- as in the previous instance -- and then operate on the information contained in those columns. For example, the post-obit command selects the name, telephone number and birthdate for all customers whose age is over 21:
                    SELECT proper noun, phone, age
    FROM customers
    WHERE age > 21;

Virtually SQL implementations include support for issuing statements at the command line, through a graphical user interface, past using SQL programs or through application programming interfaces to admission SQL databases using other programming languages.

Usually used SQL commands with examples

Most SQL commands are used with operators to modify or reduce the scope of information operated on past the statement. Some commonly used SQL commands, along with examples of SQL statements using those commands, follow.

SQL SELECT. The SELECT command is used to get some or all information in a table. SELECT tin can be used with operators to narrow downwardly the amount of data selected:

            SELECT championship, author, pub_date
FROM itemize
WHERE pub_date = 2021;

This example could be used by a publisher to select the championship, author and publication date columns from a tabular array named catalog.

SQL CREATE. The CREATE command is used to create a new SQL database or SQL tabular array. Nigh versions of SQL create a new database past creating a new directory, in which tables and other database objects are stored as files.

The post-obit CREATE DATABASE statement creates a new SQL database named Human_Resources:

            CREATE DATABASE Human_Resources;          

The CREATE TABLE command is used create a table in SQL. The following statement creates a table named Employees that has iii columns: employee_ID, last_name and first_name, with the starting time column storing integer (int) information and the other columns storing variable character information of type varchar and a maximum of 255 characters.

            CREATE TABLE Employees (
    employee_ID int,
    last_name varchar(255),
    first_name varchar(255)
);

SQL DELETE. The DELETE control removes rows from a named tabular array. In this example, all records of employees with the last name Smithee are deleted:

            DELETE FROM Employees WHERE last_name='Smithee';          

This statement returns the number of rows deleted when it finishes running.

SQL INSERT INTO. The INSERT INTO command is used to add records into a database table. The following statement adds a new tape into the Employees table:

            INSERT INTO Employees (
    last_name,
    first_name
)
VALUES (
    'Alan',
    'Smithee'
);

SQL UPDATE. The UPDATE control is used to make changes to rows or records in a specific table. For case, the following statement updates all records that include a last_name value of Smithee by changing the name to Smith:

            UPDATE Employees
Set up last_name = 'Smith',
WHERE last_name = 'Smithee';

SQL statements can use loops, variables and other components of a programming linguistic communication to update records based on different criteria.

SQL-on-Hadoop tools

SQL-on-Hadoop query engines are a newer offshoot of SQL that enable organizations with big data architectures built around Hadoop data stores to use SQL as a querying language and enable database professionals to use a familiar query linguistic communication instead of having to use more circuitous and less familiar languages -- in particular, the MapReduce programming environment for developing batch processing applications.

More than a dozen SQL-on-Hadoop tools are bachelor from Hadoop distribution providers and other vendors; many of them are open source software or commercial versions. In add-on, the Apache Spark processing engine, which is often used in conjunction with Hadoop, includes a Spark SQL module that similarly supports SQL-based programming.

Not all SQL-on-Hadoop tools support all of the functionality offered in relational implementations of SQL. But SQL-on-Hadoop tools are a regular component of Hadoop deployments, as companies expect to get developers and information analysts with SQL skills involved in programming big data applications.

SQL security

SQL servers are subject field to almost of the same vulnerabilities every bit whatever other enterprise application, including weak authentication, insecure blueprint, misconfiguration and other application security issues. However, SQL injection, get-go reported in 1998, continues to boss security issues for SQL systems.

SQL injection attacks usually exploit weaknesses in systems where data submissions are not scanned and sanitized to remove potentially malicious code incorporated or injected into information.

The best-known example of a SQL injection exploit is documented in the "Little Bobby Tables" comic by Randall Munroe, in which a SQL injection is perpetrated past a mom who filled out a SQL form with her son'south name followed past malicious SQL code.

In the comic, the son's proper noun is entered as the post-obit:

            Robert'); DROP TABLE Students; --          

Following the valid data (Robert), the name continues with characters that SQL servers interpret as ending the information -- single quote, close parenthesis and semicolon -- followed by the Drib Table command.

Use of best practices for database security tin can assist protect an organization'southward most valuable digital assets.

History of SQL

With roots going back to the early 1970s, SQL continues to make key milestones in history equally one of the most successful ideas in calculating history.

  • 1970. "A Relational Model of Information for Large Shared Data Banks" by Eastward.F. Codd publishes in Communications of the ACM, laying the basis for RDBMSes.
  • 1974. IBM researchers publish an commodity introducing Structured Query Language, first chosen SEQUEL or Structured English Query Language. The name was changed for trademark purposes.
  • 1977. Relational Software Inc., the company that eventually became Oracle, begins edifice a commercial RDBMS.
  • 1979. Oracle ships first commercially available RDBMS for Digital Equipment Corp.'s minicomputer systems.
  • 1982. IBM ships SQL/Data Organization, a SQL RDBMS for IBM mainframes.
  • 1985. IBM ships Database 2, a SQL RDBMS for IBM'southward Multiple Virtual Storage mainframe operating system.
  • 1986. An ANSI committee and then ISO adopt SQL as a standard.
  • 1989. Commencement revision of the ISO SQL standard, SQL-89, publishes.
  • 1992. Get-go major revision of ISQ SQL standard, SQL-92, publishes.
  • 1999. First version to exist named in accord with ISO naming standards, ISO/IEC SQL:1999, adds programming functionality and support for Coffee.
  • 2003. ISO/IEC SQL:2003 adds support for a predefined data type for Extensible Markup Language (XML) objects.
  • 2006. ISO/IEC SQL:2006 expands XML-related functionality.
  • 2008. ISO/IEC SQL:2008 adds support for partitioned JOINs, a method for linking 2 or more tables that treats the joined tables as a single table.
  • 2011. ISO/IEC SQL:2011 improves back up for relational databases containing time-related data.
  • 2016. ISO/IEC SQL:2016 adds optional new features, including JavaScript Object Notation-related changes, support for polymorphic table functions and row pattern matching.

SQL skills and related careers

SQL skills can boost many careers, not just those of database administrators, data warehouse architects, database programmers and others whose roles directly use SQL.

Some other roles that can benefit from SQL experience include the following:

  • Data scientists working with thousands of tables spread across thousands of databases demand stiff SQL skills.
  • Business intelligence analysts also must have potent SQL skills for working with data warehouses and structured databases.
  • Information analysts are expected to have experience with SQL.
  • Cloud engineers are expected to be practiced in SQL.

SQL skills can be helpful in a surprisingly broad range of disciplines. For example, journalists who reported in 2022 on offshore tax dodgers and money laundering had to learn SQL to help them understand the significance of the millions of emails and files that were leaked.

Given its longevity and importance to and so many different applications, learning SQL tin can be an important career goal. One first step is understanding the divergence betwixt SQL DML and DDL commands .

brownbeirme.blogspot.com

Source: https://searchdatamanagement.techtarget.com/definition/SQL

0 Response to "Which of the Following Statements Can Be Used to View the Structure of the Orders Table?"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel