Using New Data Types in 2008 Andrew Couch UK Access User Group www.ukaug.co.uk ASC associates www.upsizing.co.uk.

Slides:



Advertisements
Similar presentations
Moving from Access Databases to a Visual Studio/SQL Server Solutions Andrew Couch UK Access User Group asc associates
Advertisements

Irwin/McGraw-Hill Copyright © 2000 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS5th Edition.
© 2012 Entrinsik, Inc. Informer Administration Exploring the system menu and functions PRESENTER: Jason Vorenkamp| Informer Software Engineer| March 2012.
ASP.NET Programming with C# and SQL Server First Edition Chapter 8 Manipulating SQL Server Databases with ASP.NET.
Access Lecture 1 Database Overview and Creating Tables Create an Employee Table.
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
Data Types and Field Properties 5.01 Understand database tables used in business.
1 Nassau Community CollegeProf. Vincent Costa Acknowledgements: Introduction to Database Management, All Rights ReservedIntroduction to Database Management.
Data type – determines the type of data and range of values that can be entered in a field.
Introduction To Databases IDIA 618 Fall 2014 Bridget M. Blodgett.
Overview SQL Server 2008 Overview Presented by Tarek Ghazali IT Technical Specialist Microsoft SQL Server MVP, MCTS Microsoft Web Development MCP ITIL.
Module 2 Working with Data Types. Module Overview Using Data Types Working with Character Data Converting Data Types Working with Specialized Data Types.
A Guide to SQL, Eighth Edition Chapter Three Creating Tables.
MICROSOFT ACCESS Pn. Jamilah Binti Yusof. DEFINITION A database is the computer equivalent of an organized list of information. Typically, this information.
Overview of SQL Server Alka Arora.
Irwin/McGraw-Hill Copyright © 2000 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS5th Edition.
Tables. What is a Table? A part of a database Container for data Pieces of data, put together, have a meaning.
Basis Data Terapan Yoannita. SQL Server Data Types Character strings: Data typeDescriptionStorage char(n)Fixed-length character string. Maximum 8,000.
Access 2007 Database Application Managing Business Information Effectively BCIS 1 and 2.
Crystal And Elliott Edward M. Kwang President. Crystal Version Standard - $145 Professional - $350 Developer - $450.
Module 4: Data Objects. Overview Tables are the main objects that store data Indexes, views, stored programs and other objects are the support structures.
ITOM 2308 Introduction to Databases Review Access Database Corporate Case Study ITOM 2308 Class 81.
Irwin/McGraw-Hill Copyright © 2000 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS5th Edition.
Microsoft Access 2013 Design and Create Tables to Store Data Chapter 2.
What is a Database? A Database is…  an organized set of stored information usually on one topic  a collection of records  a way to organize information.
WHAT’S NEW IN SQL SERVER 2008: T-SQL Martin Bell SQL Server MVP.
Discovering Computers Fundamentals Fifth Edition Chapter 9 Database Management.
5/24/01 Leveraging SQL Server 2000 in ColdFusion Applications December 9, 2003 Chris Lomvardias SRA International
SQL Data Definition Language (DDL) Using Microsoft SQL Server 1SDL Data Definition Language (DDL)
Unit 6 Data Storage Design. Key Concepts 1. Database overview 2. SQL review 3. Designing fields 4. Denormalization 5. File organization 6. Object-relational.
11 3 / 12 CHAPTER Databases MIS105 Lec15 Irfan Ahmed Ilyas.
Christopher M. Pascucci.NET Programming: Databases & ADO.NET.
SQL Fundamentals  SQL: Structured Query Language is a simple and powerful language used to create, access, and manipulate data and structure in the database.
Creating and Maintaining Geographic Databases. Outline Definitions Characteristics of DBMS Types of database Relational model SQL Spatial databases.
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.
SQL Server 2005 Implementation and Maintenance Chapter 3: Tables and Views.
Visual Programing SQL Overview Section 1.
IMS 4212: Data Manipulation 1 Dr. Lawrence West, MIS Dept., University of Central Florida Additional Data Manipulation Statements INSERT.
GLOBEX INFOTEK Copyright © 2013 Dr. Emelda Ntinglet-DavisSYSTEMS ANALYSIS AND DESIGN METHODSINTRODUCTORY SESSION EFFECTIVE DATABASE DESIGN for BEGINNERS.
Access Lessons 1, 2 and 3 ©2009 M and K Solutions, LLC – All Rights Reserved.
Copyright © Andrew Couch 2007 All rights reserved. Access Tables Without Keys & Views How To Manage Keys On Access Tables Andrew Couch ASC Associates.
1 Working with MS SQL Server Beginning ASP.NET in C# and VB Chapter 12.
Module 9: Using Advanced Techniques. Considerations for Querying Data Working with Data Types Cursors and Set-Based Queries Dynamic SQL Maintaining Query.
Creating E/R Diagrams with SQL Server Management Studio, Writing SQL Queries D0ncho Minkov Telerik School Academy schoolacademy.telerik.com Technical Trainer.
Notes: **A Row is considered one Record. **A Column is a Field. A Database is…  an organized set of stored information usually on one topic  a collection.
What is your Character Data Type? March 5, 2016 John Deardurff Website:
Get your Oracle data into SQL Server faster!
Creating Database Objects
ASP.NET Programming with C# and SQL Server First Edition
CS320 Web and Internet Programming SQL and MySQL
Managing Tables, Data Integrity, Constraints by Adrienne Watt
Module 2: Creating Data Types and Tables
Lecture 6 Data Model Design (continued)
Data Definition and Data Types
Attributes and Domains
Ouch! Our Data Type Choices Did THAT?
SQL Server 2016 JSON Support FOR Data Warehousing
SQL Implementation & Administration
Migrating a Disk-based Table to a Memory-optimized one in SQL Server
Proper DataType Usage = Guaranteed Better Performance and Accuracy
What is your Character Data Type?
Working with Data Types
CIS16 Application Programming with Visual Basic
PT2520 Unit 5: Physical Design
Data Types Do Matter Start local instance of SQL Start ZoomIt
ICT Database Lesson 2 Designing a Database.
Creating Database Objects
Lecture 2 Lecturer: awdang aziz MS access
Presentation transcript:

Using New Data Types in 2008 Andrew Couch UK Access User Group ASC associates

Flow of Presentation Data types and products Share Point : Access & SQL Server SQL Server : Access & Visual Studio SQL Server New Data Types Updating Data & Multi-user Issues Summary

Why are we interested in Data Types? What we do with data  Exchange Converting and exchanging data between products  Applications that present data Linking applications to back-end data sources  Applications that maintain data updating data with applications linked to back-end data source

Which Products will we consider? Products  Access Application and data source  SQL Server data source and application components, also report services  Share Point Application and data source (SQL Server)  Visual Studio Application

What Data Types do the Products support? Access (2007) GUID Multi-value fields Share Point (2003) see next slide SQL Server (2008) Visual Studio (2005/8) n prefix for Unicode

Share Point (2003)

Share Point under the hood Data is held in the AllUserData table which has a generic set of fields, nvarchar1,nvarchar Text1,Text

Access to Share Point Data Types; MOSS

Access (2007) & Share Point Attachments (share point lists) Multi-value fields (share point lists)

Share Point a Data/Object Model; WSS us/library/ms aspx us/library/ms aspx

Access to SQL Server Data Type Mappings Yes/No (boolean) : bit  Access True -1, SQL Server True 1; also SQL Server boolean is tri-state 0, 1 and NULL Text : varchar or nvarchar or char or nchar Date/Time : datetime Currency : money Autonumber : int (identity property) OLE Object : image, varbinary, filestream Memo : text or varchar(max) Number : various mappings

Access Yes/No Data

Yes/No (without a default) Translated To SQL Server

Access Memo and OLE Data Types

Access Using SQL Server IMAGE and TEXT Data Types

Visual Studio Editing Records in DetailsView; issues with Text Data Type

Visual Studio and Image/OLE Data issues with Image Data Type

Access & SQL server Varchar(max) and Varbinary(max)

Visual Studio DetailsView now works for Updates when using Varchar(max)

Visual Studio, Images and OLE still a problem with Varbinary(max) some people would suggest that image data should not directly held in the database and instead a text link is used to point to an external image file which works around this issue

Mini-summary Access to SQL Server  MEMO to VARCHAR(max) or TEXT, probably TEXT safer bet but VARCHAR(max) more flexible  OLE to IMAGE or VARBINARY(max), FILESTREAM ? Visual Studio  VARCHAR(max) a better choice  OLE/IMAGE data doesn’t work for bound controls

SQL Server (2005) XML data type  office requires program code using new SQL Native Client drivers to manipulate this varchar(max), nvarchar(max)  advantages for programmers as can use as a variable (not possible with older text data type) varbinary(max)

Date & Time Data IBM DB2  DATE, TIME and TIMESTAMP date range to Oracle  DATE (includes time), TIMESTAMP, date range January BC to SQL Server (2000/2005)  DATETIME, SMALLDATETIME, date range to for DATETIME, when no date given defaults to 1st January 1900 Access – DATE/TIME  date range to ,when no date given defaults to 30th December 1899 and hides date SQL Server (2008)  DATE, TIME,DATETIME2, DATETIMEOFFSET range :00:00: to :59:59:

Access allowing Updates to new Date and Time Data Types

Searching some limitations where fields are strings

Controlling Time Precision

SQL Server (2008) Filestream  Unstructured large object data DATE and TIME  Dates from 01/01/0001 to 31/12/9999  Times accurate to 00:00:00: DATETIME2 and DATEOFFSET  New combined date and time data types with higher accuracy, Combines above, offset type includes time-zone data HIERARCHYID  Optimised for data hierarchies (special functions) GEORGRAPHY and GEOMETRY .NET-based spatial data  First deals with round-earth co-ordinates, second uses a flat-earth style of co-ordinates  Special functions

Geography It comes as no surprise that this renders in a binary type format and you can’t edit it Stored procedures and pass through queries to the rescue!

With a little Magic

Geography Methods

Timestamps & Multiple Users SQL Server Overwrite data when changed Optimistic row versioning Timestamp checking Visual Studio does not utilise timestamps on bound controls the new LINQ will support timestamp concurrency

Access Row Versioning & Timestamps Row Versioning SQLExecDirect: UPDATE "dbo"."authors" SET "au_fname"=? WHERE "au_id" = ? AND "au_lname" = ? AND "au_fname" = ? AND "phone" = ? AND "address" = ? AND "city" = ? AND "state" = ? AND "zip" = ? AND "contract" = ? Timestamps SQLExecDirect: UPDATE "dbo"."authors" SET "au_fname"=? WHERE "au_id" = ? AND "ts" = ? Timestamps improve efficiency and remove potential problems with rounding errors in numerical data

Example Visual Studio Update handling Null Values UpdateCommand = "UPDATE [Customers] SET [CustomerID] [CompanyName] [ContactName] [ContactTitle] [Address] [City] [Region] [PostalCode] [Country] [Phone] [Fax] WHERE [CustomerID] AND [CompanyName] AND COALESCE([ContactName],'') = AND COALESCE([ContactTitle],'') = AND COALESCE([Address],'') = AND COALESCE([City],'') = AND COALESCE([Region],'') = AND COALESCE([PostalCode],'') = AND COALESCE([Country],'') = AND COALESCE([Phone],'') = AND COALESCE([Fax],'') =

Summary We have a diverse set of data types in the different products Need to test data types for product compatibility, don’t forget different versions and drivers can have an impact Access and Share Point very good compatibility Access and SQL Server good compatibility Share Point data easily exported and linked MOSS but WSS more difficult Please, Please can I have a nice tree presentation for XML data, then I may be tempted to use it!!!!!! SQL Server 2008 new data types hold great promise, and it will possible to do a lot with then in Office 2007

ASC Associates Software consultancy specialising in Access, SQL Server and.net applications Migration Upsizing SQL Tool  MUST upsizes Access databases to SQL Server  MUST+SQL converts Access queries to views and stored procedures  MUST+Web converts Access forms to web forms in Visual Studio projects