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.

The DBMSs covered are MySQL, SQL Server, PostgreSQL, and Oracle Database.

Continue reading “SQL CREATE DATABASE Syntax – Listed by DBMS”

What is a Database Schema?

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 schema contains schema objects, which could be tablescolumns, data types, views, stored procedures, relationships, primary keys, foreign keys, etc.

A database schema can be represented in a visual diagram, which shows the database objects and their relationship with each other.

Screenshot of a database schema.
A basic schema diagram representing a small three-table database.

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.

Continue reading “What is a Database Schema?”

Is it Pronounced “S-Q-L” or “Sequel”?

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.

Continue reading “Is it Pronounced “S-Q-L” or “Sequel”?”

Microsoft Access vs SQL Server

This article looks at some of the differences between Microsoft Access and SQL Server.

Both Access and SQL Server are developed by Microsoft. Both are relational database management systems. And both have a large presence in organisations across the world.

But between Access and SQL Server, there are some significant differences.

Continue reading “Microsoft Access vs SQL Server”

A Technical Comparison: Microsoft Access 2016 vs SQL Server 2016

Microsoft Access and SQL Server are two relational database management systems from Microsoft. Each has its own strengths and weaknesses. There are many cases where Access is the ideal tool for the job. There are other times where a more sophisticated solution like SQL Server is more appropriate.

When trying to decide which one to use, a side-by-side comparison of the technical specifications of each system can help greatly. Below is a side-by-side comparison of some of the technical limitations of each system.

Continue reading “A Technical Comparison: Microsoft Access 2016 vs SQL Server 2016”

What is SQL Server?

SQL Server is a relational database management system (RDBMS) developed by Microsoft. It is Microsoft’s enterprise level RDBMS offering, and is a more sophisticated and robust system than Access, which has traditionally been a desktop system.

SQL Server’s main competitors are Oracle Database, MySQL (now owned by Oracle), PostgreSQL, and IBM’s DB2.

SQL Server is a client-server based system, which means that it operates as a server, typically containing many databases, with multiple clients accessing the databases from across a network. These clients are often other applications (such as a website or CRM system). This is in contrast to desktop systems, where the database will often (but not necessarily) reside on the user’s computer.

Continue reading “What is SQL Server?”

How to Create a Table in SQL Server using a Query

To create a table in SQL Server using a query:

  1. In the SQL Server Management Studio, click the New Query button on the toolbar
  2. Type or paste a CREATE TABLE script (example below)
  3. Click the ! Execute button on the toolbar

Here’s an example:

Screenshot of SSMS with the New Query button highlighted.
Clicking the “New Query” button on the SSMS toolbar opens a new query. Clicking “Execute” runs the query.

Continue reading “How to Create a Table in SQL Server using a Query”

How to Use the Query Designer in SQL Server

To use the Query Designer in SQL Server:

  1. Open a new query by clicking New Query on the toolbar
  2. Open the Query Designer by selecting Query > Design Query in Editor... from the top menu
  3. Add the tables you want to run the query against
  4. Build the criteria for your query then click OK

The query will appear in the query window. To run the query, click ! Execute or press F5

Below are screenshots for the above steps.

Continue reading “How to Use the Query Designer in SQL Server”

How to Create a View in SQL Server

To create a view in SQL Server:

  1. Open a new query by clicking the New Query button in the SSMS toolbar
  2. Type or paste a CREATE VIEW statement (example below)
  3. Run the script

The view will now be created in the database. You will be able to see it under the Views node in the Object Explorer.

You can now use SELECT statements against the view in future queries.

Below are screenshots of the above steps.

Continue reading “How to Create a View in SQL Server”