Datasheet
Oracle schema
The Oracle schema, shown in Figure 1-12, is similar to the SQL Server schema shown in Figure 1-8. The
only differences between these schemas are the data types. Every database vendor has its own imple-
mentation for data types and the differences are usually subtle. Therefore, there’s no need to cover the
details of the schema again. Refer to Appendix A for a complete data type conversion between the differ-
ent databases.
However, I do want to point out the data type used for primary keys in this schema. Oracle, like SQL
Server, has a data type that supports Guids. Unfortunately, Oracle’s implementation of this data type
does not support the Guids you are used to seeing in Windows. The RAW(16) data type in Oracle sup-
ports Guids without the dashes, and Oracle even has a built-in function to generate Guids,
Sys_Guid.
This function also generates Guids without the dashes.
Because you will be generating the Guids from your program and will be porting the data from the
Access database to either a SQL Server or Oracle database in Chapter 8, I chose to implement the pri-
mary key as a Char(36) data type in Oracle. This will enable you to port the data from Access to Oracle
without any special considerations or the need to massage the data during the porting.
The steps in the following Try It Out assume that the physical database, ProjectTimeTracker, has been
created by you or your DBA. Visual Studio 2005 does not support creating tables in an Oracle database
in the designer as you did for SQL Server.
To that end, the process that you’ll use for creating the tables, primary keys, and foreign key relation-
ships will be performed through a SQL script. Therefore, you need to use your Oracle client tools—
namely, iSQL Plus* or any other third-party tools that you normally use to run SQL scripts against
Oracle.
25
Databases
04_58894x ch01.qxd 10/13/05 5:54 PM Page 25