Relational databases function efficiently due the fact that information is not stored more times than is necessary. In this video, database expert Adam Wilbert shows how to link tables together using relationships in order to protect the data from incomplete entries and to be able to retrieve records quickly and easily.
- [Instructor] Because we're using primary…key columns in our data tables to uniquely…identify each individual record…we can use this information in other data tables…to make relationships between them.…By formalizing the connections between…data tables we can take advantage…of the inter-connected nature of the information…that we're storing.…Let's supposed that we want to make…a new table to collect information about our orders.…And we want to make sure that we know…the customer that is placing each order.…We can use the customer id number…in the Orders table so that we have an easy…way to refer back to the individual…that made the purchase.…In order to do this we're going to…make a new table to collect information about our orders.…
On the Tables folder inside of the MyDatabase database…I'll right-click and choose Table.…The first column is going to be…our order ids.…For the column name I'll type in OrderID.…For the data type I'll choose INT.…Next, I want the order id to be…the primary key for the table.…I'll come up to the toolbar and press…
This course introduces the most important features of SQL Server 2016, and is designed to act as the student's very first look at how the server operates. Adam Wilbert shows how to install a local copy of SQL Server; demonstrates the working environment, SQL Server Management Studio; and walks students through their first hour creating tables, defining relationships, and writing and running queries with Transact-SQL commands. Everything you need to accomplish to create your first database is covered in just 80 minutes. Start watching to get up and running with this professional-grade database management system.
- What is SQL Server?
- Configuring the server
- Creating a new database and data tables
- Joining tables with keys
- Creating a SELECT statement
- Writing an UPDATE statement
- Adding data with the INSERT statement