Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
SQL Server 2014 Development Essentials

You're reading from   SQL Server 2014 Development Essentials Design, implement, and deliver a successful database solution with Microsoft SQL Server 2014.

Arrow left icon
Product type Paperback
Published in Jul 2014
Publisher
ISBN-13 9781782172550
Length 214 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Basit A. Masood-Al-Farooq Basit A. Masood-Al-Farooq
Author Profile Icon Basit A. Masood-Al-Farooq
Basit A. Masood-Al-Farooq
Arrow right icon
View More author details
Toc

Table of Contents (8) Chapters Close

Preface 1. Microsoft SQL Server Database Design Principles FREE CHAPTER 2. Understanding DDL and DCL Statements in SQL Server 3. Data Retrieval Using Transact-SQL Statements 4. Data Modification with SQL Server Transact-SQL Statements 5. Understanding Advanced Database Programming Objects and Error Handling 6. Performance Basics Index

Table design

As mentioned earlier, you complete the table and data design activities during the conceptual and logical design phases of the database design. During the conceptual design phase, you identify specific data needs and determine how to present the data in the database solution, which is based on the information you collected in the requirement gathering phase. You then use the information from the conceptual design phase in the logical design phase to design and organize your data structure. In the logical design phase, you also identify the requirements for database objects to store and organize the data.

Often, one of the most time-consuming and important tasks in the physical design phase is the table design. During the physical design phase, you identify the following:

  • Entities and attributes
  • Relationships between entities

Tables

You use tables to store and organize data in the database. A table contains columns and rows. For example, the following is an example of how a Customer table might look. Each row in the Customer table represents an individual customer. The column contains information that describes the data for the individual customer. Each column has a data type, which identifies a format in which the data is stored in that column. Some data types can have a fixed length, which means that the size does not depend on the data stored in it. You also have data types with variable lengths, which means their length changes to fit the data they possess.

Tables

Entities

Entities are business objects that your database contains, and they are used to logically separate the data in the database. An entities list, which you need to create, is used to determine the tables as part of the physical design phase. You create a separate table in the database for each entity (such as customers, employees, orders, and the payroll). Entities are characterized by attributes. For example, you declare each individual attribute of an entity (such as an individual customer, an individual order, an individual employee, or an individual payroll record) as a row in the table.

Attributes

An attribute is a property of an entity. For example, the employee entity has attributes such as the employee ID, first name, last name, birthday, social security number, address, country, and so on. Some attributes are unique values. For example, each customer in a Customer table has a unique customer number. Attributes are used to organize specific data within the entity.

You have been reading a chapter from
SQL Server 2014 Development Essentials
Published in: Jul 2014
Publisher:
ISBN-13: 9781782172550
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime