How to Create a Table with Multiple Foreign Keys and Not Get Confused

Total: 1 Average: 5

Understanding Table Relations

SQL server adds foreign keys to implement relations between tables in a relational database. A table can have one-to-one, one-to-many, or many-to-many relations with another table, depending upon the type of data you want to store.

A one-to-one relationship is simple and rarely used. Each record in a particular table relates to exactly one record in another table.

CodingSight - How to Create a Table with Multiple Foreign Keys and Not Get Confused
Read More

Moving SQL Server Table to Different Filegroup

Total: 1 Average: 5

Introduction

A table is a logical structure. When you create a table, you typically would not care which drives it sits on at the storage layer. However, if you are a database administrator, this knowledge may become essential if you need to move certain database portions to alternative storage or volume. Then, you might want definite tables to be on a particular volume or set of disks.

Filegroups in SQL Server offer that abstraction layer allowing us to control the physical location of our logical structures – tables, indexes, etc.

Read More