Database Reference
In-Depth Information
Figure 5.39
Import data with bcp command.
5. In the command prompt window, enter the following bcp command, and press the
Enter key:
bcp Computer_Store.dbo.EMPLOYEE_IMPORT in Employee.txt -c -T -S
COSC63xx
-T means that the trusted connection is used to connect to SQL Server, and -S refers
to the SQL Server instance on the local machine.
6. he execution result is shown in Figure 5.39.
As you can see, eight rows are imported to the table EMPLOYEE_IMPORT.
5.7 Working with XML Data
he data exchange between application software and a database server is a challenge if the applica-
tion and the database run on computers with diferent platforms, for example, one running on
a Linux machine and the other running on a Windows machine. In the old days, data sent by a
client computer would be converted to the format acceptable by the server computer. In today's
Internet, there are many diferent types of data formats. he task of data conversion is extremely
diicult. he features of XML can make data conversion easier.
A markup language such as hypertext markup language (HTML) can be used to display infor-
mation. For example, HTML can display the content on a web page by using a set of predeined
tags. he set of HTML tags can be used to specify the location, color, and font of the web page
content. HTML can also be used to create some simple form objects. For database applications,
HTML has its limitations. HTML has diiculty transferring database objects since there are no
predeined tags that can handle database objects.
In the early 1990s, a more powerful markup language, XML, was developed to handle data
transactions over the Internet. he World Wide Web Consortium (W3C) established a set of rules
that are used to express data formats and structures. Similar to HTML, XML is also a markup
language. Unlike HTML, it can deine tags for database objects. herefore, XML has a wide range
of application in database development.
When sharing data through the Internet, XML is used to represent the data and structure
of database objects in a common format. XML allows information exchange between database
applications and database servers. hese database applications may be created with heterogeneous
application software, operating systems, and database management systems. he databases may be
hosted by server running on diferent platforms.
Search WWH ::




Custom Search