Tables Lesson 6. Skills Matrix Tables Tables store data. Tables are relational –They store data organized as row and columns. –Data can be retrieved.

Slides:



Advertisements
Similar presentations
Yukon – What is New Rajesh Gala. Yukon – What is new.NET Framework Programming Data Types Exception Handling Batches Databases Database Engine Administration.
Advertisements

Chapter 10: Designing Databases
Project Management Database and SQL Server Katmai New Features Qingsong Yao
Client/Server Databases and the Oracle 10g Relational Database
Chapter 11 Data Management Layer Design
Modern Systems Analysis and Design Third Edition
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
1 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management.
Working with SQL and PL/SQL/ Session 1 / 1 of 27 SQL Server Architecture.
Service Broker Lesson 11. Skills Matrix Service Broker Service Broker, provides a solution to common problems with message delivery and consistency that.
1 Chapter Overview Understanding Backup Terms, Media, and Devices Backing Up Databases, Files, Filegroups, and Transaction Logs Restoring a User Database.
Session 7 Creating and Managing Databases. RDBMS and Data Management/ Session 7/2 of 27 Session Objectives Describe the system and user-defined databases.
LESSON 17 PREPARED BY MANJU. database A database is a collection of related information Access is the Microsoft Office database program that enables you.
Overview of SQL Server Alka Arora.
Chapter 4 SQL. SQL server Microsoft SQL Server is a client/server database management system. Microsoft SQL Server is a client/server database management.
Chapter 6 Physical Database Design. Introduction The purpose of physical database design is to translate the logical description of data into the technical.
Database Lecture # 1 By Ubaid Ullah.
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 9.1.
ASP.NET Programming with C# and SQL Server First Edition
Module 3: Managing Database Files. Overview Introduction to Data Structures Creating Databases Managing Databases Placing Database Files and Logs Optimizing.
Database Technical Session By: Prof. Adarsh Patel.
Chapter 9 Designing Databases Modern Systems Analysis and Design Sixth Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
Physical Database Design Chapter 6. Physical Design and implementation 1.Translate global logical data model for target DBMS  1.1Design base relations.
Databases Lesson 5.
File System Management File system management encompasses the provision of a way to store your data in a computer, as well as a way for you to find and.
Lecture2: Database Environment Prepared by L. Nouf Almujally & Aisha AlArfaj 1 Ref. Chapter2 College of Computer and Information Sciences - Information.
SQL Server Indexes Indexes. Overview Indexes are used to help speed search results in a database. A careful use of indexes can greatly improve search.
Introduction to Databases Trisha Cummings. What is a database? A database is a tool for collecting and organizing information. Databases can store information.
Key Applications Module Lesson 21 — Access Essentials
Views Lesson 7.
Copyright 2006 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Third Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
ITGS Databases.
Indexes / Session 2/ 1 of 36 Session 2 Module 3: Types of Indexes Module 4: Maintaining Indexes.
Data Types Lesson 4. Skills Matrix Table A table stores your data. Tables are relational in that they are organized as rows and columns (a matrix). Each.
Methodology – Physical Database Design for Relational Databases.
Database Management Supplement 1. 2 I. The Hierarchy of Data Database File (Entity, Table) Record (info for a specific entity, Row) Field (Attribute,
Lesson 2: Designing a Database and Creating Tables.
SQLintersection Putting the "Squeeze" on Large Tables Improve Performance and Save Space with Data Compression Justin Randall Tuesday,
Physical Database Design Purpose- translate the logical description of data into the technical specifications for storing and retrieving data Goal - create.
Constraints Lesson 8. Skills Matrix Constraints Domain Integrity: A domain refers to a column in a table. Domain integrity includes data types, rules,
The Relational Model. 2 Relational Model Terminology u A relation is a table with columns and rows. –Only applies to logical structure of the database,
Chapter 10 Designing Databases. Objectives:  Define key database design terms.  Explain the role of database design in the IS development process. 
Session 1 Module 1: Introduction to Data Integrity
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Chapter 9 Designing Databases 9.1.
Introduction to Core Database Concepts Getting started with Databases and Structure Query Language (SQL)
October 15-18, 2013 Charlotte, NC Accelerating Database Performance Using Compression Joseph D’Antoni, Solutions Architect Anexinet.
1 Access Lesson 1 Understanding Access Fundamentals Microsoft Office 2010 Fundamentals Story / Walls.
SQL Basics Review Reviewing what we’ve learned so far…….
In this session, you will learn to: Manage databases Manage tables Objectives.
Decision Analysis Fall Term 2015 Marymount University School of Business Administration Professor Suydam Week 10 Access Basics – Tutorial B; Introduction.
Data Integrity & Indexes / Session 1/ 1 of 37 Session 1 Module 1: Introduction to Data Integrity Module 2: Introduction to Indexes.
SQL IMPLEMENTATION & ADMINISTRATION Indexing & Views.
Understanding Core Database Concepts Lesson 1. Objectives.
Introduction to Partitioning in SQL Server
Logical Database Design and the Rational Model
Understanding Data Storage
Client/Server Databases and the Oracle 10g Relational Database
Indexes By Adrienne Watt.
GO! with Microsoft Office 2016
Physical Database Design
GO! with Microsoft Access 2016
Modern Systems Analysis and Design Third Edition
Access Lesson 1 Understanding Access Fundamentals
Chapter 9 Designing Databases
Table Partitioning Intro and make that a sliding window too!
Databases.
Table Partitioning Intro and make that a sliding window too!
Copyright © 2018, 2015, 20 Pearson Education, Inc. All Rights Reserved Database Concepts Eighth Edition Chapter # 2 The Relational Model.
Table Partitioning Intro and make that a sliding window too!
Understanding Core Database Concepts
Presentation transcript:

Tables Lesson 6

Skills Matrix

Tables Tables store data. Tables are relational –They store data organized as row and columns. –Data can be retrieved efficiently because the RDBMS can locate a specific field (the intersection of a row and column) without having the read the entire table (as in a flat- file database system).

Creating Tables 1.Open SQL Server Management Studio. In Object Explorer, expand Server  Databases  MSSQL_Training. 2.Right-click the Tables icon and select New Table to open the Table Designer. Tables are often created using SQL scripts containing CREATE TABLE commands.

Options when Creating Tables Indexes: Specifies the type of data indexing initially created. Collation: Individual columns of textual data may have a different collation setting than that of the server instance or the database. Compression: A table option that can control optional ROW or PAGE type data compression.

Options when Creating Tables Constraint: Table and column level constraints may be specified. Sparse: Individual columns may be defined as SPARSE in order to conserve storage space for columns often containing a high percentage of NULL data.

Data Compression SQL Server 2008 includes two new data compression features for reducing the disk space requirements – Row Compression and Page Compression. Only one type of compression can be specified at a time on the same object. Compression can be used on both regular tables and nonclustered indexes. The space savings will, as with all forms of data compression, depend upon the nature of the data being compressed.

Data Compression Data Compression is available only in the Enterprise, Developer, or Evaluation Editions of SQL Server 2008.

Data Compression A new stored procedure named sp_estimate_data_compression_savings has been provided with SQL Server 2008 to provide estimated space savings without having to actually compress a table first. This stored procedure needs a table or index name and either ‘ROW’ or ‘PAGE’ as a compression method.

Data Compression Both row based and page based compression are enabled via either the CREATE TABLE, CREATE INDEX, ALTER TABLE, or ALTER INDEX commands. ALTER TABLE mytable REBUILD WITH (DATA_COMPRESSION = ROW); ALTER TABLE mytable REBUILD WITH (DATA_COMPRESSION = PAGE);

Row Compression Row Compression compresses all columns in all rows in a table (or index). Involves compressing each row individually. Row compression is preferred over page compression when the data to be compressed has a higher percentage of unique data as compared to repetitive data.

Page Compression Page Compression also compresses all columns in all rows in a table however the method of compression spans multiple rows thus involving an entire page of data. The purpose of page compression is to reduce the amount of redundant data stored in a page regardless of which row it is in. Thus page compression is preferred over row compression when the data on a page to be compressed has a higher percentage of repetitive data as compared to unique data.

Sparse Columns SQL Server 2008 includes a new storage space savings feature known as sparse columns. Normally, even if a column often has NULL data, space must be allocated for the column. Using a sparse column option for a fixed length column potentially alters the fixed space allocation.

Sparse Columns When the majority of the rows in a table have null data for a particular column, then that column is a probable candidate for use as a sparse column. Defining a column as sparse can actually increase the space used if the majority of the rows have data in the column. Sparse columns also require some additional processing overhead so like most things, using sparse columns is a tradeoff and you should use your best judgment depending upon the data.

Sparse Columns You require Enterprise, Developer, or Evaluation Edition of SQL Server 2008 to use sparse columns.

Partitioning Tables Tables in SQL Server can range from small, having only a single record, to huge, with millions of records. These large tables can be difficult for users to work with simply because of their size. To make them smaller without losing any data, you can partition your tables. Partitioning tables and views across multiple servers results in a federation of servers.

Partition Function To partition this table, you first need to decide on a partition column and a range of values for the column. In a table of order data, you probably have an order date column, which becomes an excellent candidate. Now you can use the partition column and range to create a partition function, which SQL Server uses to allocate the data across the partitions.

Partition Scheme After you figure out how to divide the table, you next need to decide where to keep the partitioned data physically. You can keep archived data on one hard disk and current data on another disk by storing the partitions in separate filegroups, which can be assigned to different disks.

Summary You learned you must sit down and plan before you create tables. –You need to decide what the tables should contain, making them as specific as possible. –Use Microsoft’s Visio or even pencil and paper. You also learned that tables consist of entities (which contain a specific type of data) and rows (an entity in the table that spans all columns). Each of the columns in the table has a specific data type that restricts the data it can hold.

Summary You learned the mechanics of creating tables in the database using both Transact-SQL and Management Studio. You learned the basics of data compression and implementing sparse columns. –Depending upon the data, either no compression, row compression, or page compression should be chosen. You then learned you can spread the contents of a table over multiple resources, creating ultimately a federation of servers.

Summary for Certification Examination Partitioning tables allows you to break a table into multiple pieces stored in separate files on multiple disks across multiple servers. –To partition a table, you need to select a column, create a partition function, and then create a partition scheme. –The partition function can be a LEFT or RIGHT range, so make sure you know how and why to choose.

Summary for Certification Examination A table collects records and attributes (rows and columns) that SQL Server uses to store and organize data.