Database Reference
In-Depth Information
C H A P T E R 3
Creating Database and Tables
When developing applications, you'll often be required to create a database and add tables to it, rather
than just using an existing database and table objects. This chapter is about creating a fresh database
and then creating the tables that it contains.
In this chapter, I'll cover the following:
Launching SQL Server Management Studio
Types of SQL Server databases
The architecture of a SQL Server database
Creating a database in a simple way
Creating a database with your own settings
Creating tables
Launching SQL Server Management Studio
SQL Server Management Studio (SSMS) has been the main development tool for SQL Server since 2005.
You can use SSMS to implement, develop, and administer databases. Of course, because this topic is for
application developers, our focus will be on development.
As mentioned in Chapter 1, it is important to have your SQL Server services up and running (in
other words, started) before you can successfully connect with Database Engine in SSMS and begin
creating your own database and tables.
To launch SSMS, select All Programs Microsoft SQL Server 2012 SQL Server Management Studio.
Make sure that the Connect to Server dialog has the correct vales, and then click Connect. This should
launch SQL Server Management Studio.
Types of SQL Server Databases
SQL Server has two types of databases: system databases and user databases.
System databases are those that come preinstalled with all SQL Server versions
and support the SQL Server database system when you're performing tasks such
as creating, maintaining, and administering databases. They are located under the
System Databases folder and are named master, model, msdb, and tempdb, as
shown in Figure 3-1.
 
Search WWH ::




Custom Search