Difference between revisions of "DD Class14"

esse quam videri
Jump to: navigation, search
(homework)
(LINQ)
Line 1: Line 1:
 
[[Category:Data Design]]
 
[[Category:Data Design]]
 
==LINQ==
 
 
c# 3.0 got some new features and key words
 
 
'''var'''
 
:is a implicitly typed local variable. it is strong typed you don't need to declare the type when you declare the variable.
 
 
''Anonymous Types'''
 
:allows creation of structural types without declaring an name first http://msdn.microsoft.com/en-us/library/bb397696.aspx
 
 
'''Lambda Expressions''' =>
 
: similar to anonymous methods. don't need to be declared first and don't need to specify return type http://msdn.microsoft.com/en-us/library/bb397687.aspx
 
 
new keywords http://msdn.microsoft.com/en-us/library/bb310804.aspx
 
 
http://iam.colum.edu/dd/classsource/LINQBlog/LINQTest.aspx
 
 
http://msdn.microsoft.com/en-us/library/bb397933.aspx
 
  
 
==xml and objects==
 
==xml and objects==

Revision as of 16:56, 30 November 2009


xml and objects

All data objects in .Net are make up of xml and and xml schema. The xml is available by calling

DataSet.WriteXml

and

DataSet.WriteXmlSchema

http://iam.colum.edu/dd/classsource/class14/class.aspx -source

This makes it easy to store objects in a database or send them from on machine to another.

Backup and Restore

The data files can be detached from the server

DataBaseTakeOffline.png

Once a database is detached the data files my be copied to another server. You need to have access to the file system on the data server to do this.

the database may also be backed up and restored using the Management Studio.

Export

You can backup the work you did on your database by generating an sql script for you database.

GenerateScript.png

this will start the wizard to generate sql script

GenerateScriptWizard.png

notice that the generated script does not contain any data.

You can export the data to an access database.

Start by making an empty access database.

file new blank database.

Save the empty database. Now use the use the import/export wizard from Server Management Studio

SqlImportExportManager.png

Choose the source

SqlImportExportManager2.png

Select the emptry access as the destination

SqlImportExport3.png

Select the data you want to export. Access uses some different data types and has different max sizes but most fields will fit.

Don't smpke crack and carefully review what you are about to do the run the package.

SqlImportExport4.png

homework

finish final project

study for final exam. The exam will be in two parts

  1. SQL and .NET questions
  2. Practical section you will need to build a page or two that connect in variious ways the a sql db.

Data Design Final Review