KEMBAR78
MS Sql Server: Feeding Data Into Database | PPTX
5SQL SERVER: FEEDINGDATA INTO THE DATABASE
ETL is everythingWhat is ETL?ETL Stands for: Extract – Transform – LoadETL is the set of processes which are done in-order to generate the data what is to be stored in a database/used for analysis
ETL is everythingETL ExplainedLet us consider Tom who wishes to create a database of famous pop albums. The Process that he undertakes under an ETL model will be as follows:Extract DataTransformDataInformation from Album DVDsData WarehouseLoad DataA Data warehouse is defines as a data repository from which retrieval is very quick InternetBooksInfo from friends
Migrating a DatabaseAn Important feature in Database systems is the migration of a databaseIt is defined as the process of porting data from one platform/application in one format to another of a same/different formatThe Process of migration is quite simple:Understand a database and its propertiesUnderstand the differences between the source and the destination systemMake the pre-migration changes in the source dataMigrate from source to destination via automation/manual entryMake the post-migration changes in the destination data
Migrating a DatabaseIllustration: Consider  that a school ‘Hermione Internationals’  upgrades its management system from a Foxpro DBMS to SQL Server 2008 system. The Database contain the same data(student information) but the format and organization of stored-data will differ.Extract values from DBFeed data into DBIntegrate DB into ApplicationIsolate DB
Inserting into a DatabaseAfter creating the structure of a database, the next step is to insert values into it. The Insertion of values must be done with care. The Important things which are to had in mind are:The Data type of value that is inserted should match with the data type of the fieldThe Size of the value inserted must fall within the size which is designated for a particular field while designing of the table.
Inserting into DatabaseThe SQL command to insert into the database is the insert into commandSyntax:insert into <table_name> values (<values>,..)For example, consider a database  maintained by a kid named ‘Jessy’. The database contains information about the cartoons that she watches on Tv.Table name: cartoon
Inserting into DatabaseNow suppose Jessy starts watching a new show ‘Laughs and Gags’ on Pogo Channel, she needs to insert this into her databaseSQL Command:insert into cartoon values(‘Laughs and Gags’,’Pogo’,’4PM: Weekends’, null);Jessy has just started watching the series and can decide on the rating after some-time only. Hence, the field is left as NULL The Order in which the values are given is the order in which they were designed
Updating a DatabaseNow, suppose Jessy has become a fan of ‘Laughs and Gags’ show and wants to give it a rating of 100, she musupdate her database. The SQL syntax for updation is:Syntax:update <table_Name> set <field_Name>=<new_Value> where <condition>For example, consider the database  maintained by ‘Jessy’. Null
Updating a DatabaseSQL Command:Update cartoon set rating=100 	where cartoonName = ‘Laughs and Gags’The Where clause: Where is used to specify a condition for the Query
 For string matching, use the ‘like’ keyword. Here, wild card characters(% and _)% -character represents a group(or single) of characters _ -character represents a single characterIllustration:To Update cartoons whose names start with the letter ‘a’ must be given as Update cartoon set rating=100 	where cartoonName = ‘a%’
Updating a DatabaseIllustration:To Update cartoons whose names start with the letter ‘a’ and the name must of 3 characters in length:Update cartoon set rating=100 	where cartoonName = ‘a__’
Summary5. Feeding data into a database  ETL Process

MS Sql Server: Feeding Data Into Database

  • 1.
    5SQL SERVER: FEEDINGDATAINTO THE DATABASE
  • 2.
    ETL is everythingWhatis ETL?ETL Stands for: Extract – Transform – LoadETL is the set of processes which are done in-order to generate the data what is to be stored in a database/used for analysis
  • 3.
    ETL is everythingETLExplainedLet us consider Tom who wishes to create a database of famous pop albums. The Process that he undertakes under an ETL model will be as follows:Extract DataTransformDataInformation from Album DVDsData WarehouseLoad DataA Data warehouse is defines as a data repository from which retrieval is very quick InternetBooksInfo from friends
  • 4.
    Migrating a DatabaseAnImportant feature in Database systems is the migration of a databaseIt is defined as the process of porting data from one platform/application in one format to another of a same/different formatThe Process of migration is quite simple:Understand a database and its propertiesUnderstand the differences between the source and the destination systemMake the pre-migration changes in the source dataMigrate from source to destination via automation/manual entryMake the post-migration changes in the destination data
  • 5.
    Migrating a DatabaseIllustration:Consider that a school ‘Hermione Internationals’ upgrades its management system from a Foxpro DBMS to SQL Server 2008 system. The Database contain the same data(student information) but the format and organization of stored-data will differ.Extract values from DBFeed data into DBIntegrate DB into ApplicationIsolate DB
  • 6.
    Inserting into aDatabaseAfter creating the structure of a database, the next step is to insert values into it. The Insertion of values must be done with care. The Important things which are to had in mind are:The Data type of value that is inserted should match with the data type of the fieldThe Size of the value inserted must fall within the size which is designated for a particular field while designing of the table.
  • 7.
    Inserting into DatabaseTheSQL command to insert into the database is the insert into commandSyntax:insert into <table_name> values (<values>,..)For example, consider a database maintained by a kid named ‘Jessy’. The database contains information about the cartoons that she watches on Tv.Table name: cartoon
  • 8.
    Inserting into DatabaseNowsuppose Jessy starts watching a new show ‘Laughs and Gags’ on Pogo Channel, she needs to insert this into her databaseSQL Command:insert into cartoon values(‘Laughs and Gags’,’Pogo’,’4PM: Weekends’, null);Jessy has just started watching the series and can decide on the rating after some-time only. Hence, the field is left as NULL The Order in which the values are given is the order in which they were designed
  • 9.
    Updating a DatabaseNow,suppose Jessy has become a fan of ‘Laughs and Gags’ show and wants to give it a rating of 100, she musupdate her database. The SQL syntax for updation is:Syntax:update <table_Name> set <field_Name>=<new_Value> where <condition>For example, consider the database maintained by ‘Jessy’. Null
  • 10.
    Updating a DatabaseSQLCommand:Update cartoon set rating=100 where cartoonName = ‘Laughs and Gags’The Where clause: Where is used to specify a condition for the Query
  • 11.
    For stringmatching, use the ‘like’ keyword. Here, wild card characters(% and _)% -character represents a group(or single) of characters _ -character represents a single characterIllustration:To Update cartoons whose names start with the letter ‘a’ must be given as Update cartoon set rating=100 where cartoonName = ‘a%’
  • 12.
    Updating a DatabaseIllustration:ToUpdate cartoons whose names start with the letter ‘a’ and the name must of 3 characters in length:Update cartoon set rating=100 where cartoonName = ‘a__’
  • 13.
    Summary5. Feeding datainto a database ETL Process
  • 14.
    Migrating adatabase
  • 15.
    Inserting valuesinto a database table
  • 16.
    Updating adatabase tableVisit more self help tutorialsPick a tutorial of your choice and browse through it at your own pace.The tutorials section is free, self-guiding and will not involve any additional support.Visit us at www.dataminingtools.net