This article contains the SQL ALTER DATABASE syntax, as implemented by various database management systems (DBMSs). The syntax is listed exactly as each vendor has listed it on their website. Click on the applicable link to view more detail about the syntax for a particular vendor.
This article contains the SQL CREATE TABLE syntax, as implemented by various database management systems (DBMSs). The syntax is listed exactly as each vendor has listed it on their website. Click on the applicable link to view more detail about the syntax for a particular vendor.
This article contains the SQL CREATE DATABASE syntax, as implemented by various database management systems (DBMSs). The syntax is listed exactly as each vendor has listed it on their website. Click on the applicable link to view more detail about the syntax for a particular vendor.
Different database management systems define schema in their own way. This can make it difficult for database developers to work out exactly what a schema is – especially when switching between different DBMSs.
This article provides definitions used by the three leading database systems.
In database terms, a schema (pronounced “skee-muh” or “skee-mah”) is the organisation and structure of a database. Both schemas and schemata can be used as plural forms.
A database schema can be represented in a visual diagram, which shows the database objects and their relationship with each other.
Above is a simple example of a schema diagram. It shows three tables, along with their data types, relationships between the tables, as well as their primary keys and foreign keys.
Ever since its early days, there’s confusion over how to pronounce SQL. If you’ve ever worked in a large team of SQL developers, you might’ve heard some developers pronouncing it as “S-Q-L” or “ess-que-ell” [ ˈɛs kjuː ˈɛl ] and others using “sequel” [ ˈsiːkwəl ].
And the confusion extends itself to commercial and open source products too. Any mispronunciation will extend itself to products such as SQL Server and MySQL, not to mention product tools and features such as MySQL Workbench, mysqladmin, mysqldump, and Access’s SQL view, to name a few.
SQL is the standard language for querying data inside a relational database management system (RDBMS). It is supported by all of the major database systems, such as Microsoft Access, SQL Server, MySQL, Oracle, PostgreSQL, DB2, etc.
SQL is a relatively easy language to learn when compared to most programming languages. It is based on SQL “statements” that, at times, can resemble natural language.
For example:
SELECT CustomerName
FROM Customers
WHERE CustomerId = 1
The above SQL statement is asking the database to:
“Select the value of the CustomerNamecolumnfrom the Customerstablewhere the CustomerId column’s value equals1“.