1DatabasesMost Visual Basic 2005 applications that you write use data in some form or fashion. Where youretrieve that data from depends on what your a
Stored proceduresA stored procedure in Oracle is functionally equivalent to a stored procedure in SQL Server and stores asingle or group of SQL statem
Each table in your database represents an object about your business, and each column in a table represents an attribute of the object that the table
You’ll also notice that the field names have been defined using Pascal casing. Pascal casing is where thefirst letter of each word is in uppercase, su
❑ The first normal form eliminates repeating groups of data in a table. You create a separate tablefor each set of related data and identify each tabl
Second normal formThe rule for the second normal form dictates that you must create separate tables for sets of values thatapply to multiple records a
Building the Case Study DatabasesIn the rest of this book, you use some sample databases to work through the exercises in the chapters.These sample da
Figure 1-6If you choose to create your own Access database instead of using the sample Access database availablefrom the Wrox Web site, you can follow
Try It Out Creating the ProjectTimeTracker Access Database1.Start Microsoft Access by clicking Start on the taskbar and then clicking Run.2. In the Ru
Table 1-6: Projects Table FieldsField Name Data Type Data Type AttributesProjectID Number Field Size = Replication ID, Required =Yes, Indexed = Yes (N
19. In the Show Table dialog box, select all three tables and click the Add button. Then click theClose button to close the Show Table dialog box.20.
Access DatabasesAccess databases are common and can be found on most computers, especially if the sample databaseswere installed along with Microsoft
SQL Server schemaThe Access schema was small compared to the SQL Server schema shown in Figure 1-8. You will bedoing a limited amount of work on the P
Figure 1-8The steps in the following Try It Out assume that the physical database, ProjectTimeTracker, has beencreated by you or your DBA and that you
4. Click Change next to the Data Source field and in the Change Data Source dialog box, selectMicrosoft SQL Server and then click OK.5. In the Add Con
14. At this point, all of your tables have been created and their primary keys have been set. You needto add the foreign key relationships between you
17. Click the Add button in the Foreign Key Relationships dialog box to add another relationship.In the Properties window, click the Tables and Column
Oracle schemaThe Oracle schema, shown in Figure 1-12, is similar to the SQL Server schema shown in Figure 1-8. Theonly differences between these schem
Figure 1-12GroupsGroupIDGroupNameGroupDescriptionLastUpdateDateNot NullNot NullNullNot NullChar(36)VarChar2(50)ClobDateUsersUserIDLoginNamePasswordFir
Try It Out Creating the ProjectTimeTracker Oracle Database1.Start SQL Plus or your favorite third-party tool for running SQL scripts against an Oracle
Ranking number(3) NOT NULL,LastUpdateDate date NOT NULL );CREATE TABLE TimeSheets (TimeSheetID char(36) NOT NULL,UserID char(36) NOT NULL,WeekEndingDa
(CONSTRAINT PK_TimeSheets PRIMARY KEY (TimeSheetID));ALTER TABLE TimeSheetItems ADD (CONSTRAINT PK_TimeSheetItems PRIMARY KEY (TimeSheetItemID));4. Fi
Name and Last Name. These two fields in a single record describe the name of a single person, as illus-trated in Figure 1-1.Figure 1-1QueriesA query i
SummaryThis chapter has been quite diverse, covering the major components that make up an Access, SQLServer, and Oracle database. If you weren’t alrea
SQL Server is a relational database consisting of many components, each of which contains multipleobjects. In the following sections, you examine the
Object DescriptionUser-Defined Functions A group of SQL statements that can be encapsulated into a subroutine that can be called by views and stored p
do so, you must first delete the row of data containing the foreign key or update the column using aNULL value. Only then are you able to delete the r
Second, stored procedures are similar to procedures and functions in other programming languages, asthey can contain input and output parameters and c
Oracle consists of many components in addition to the database engine, including components that perform data analysis, help you manage XML and image
TablesTables in Oracle perform the same function as they do in SQL Server— they contain information aboutyour business.KeysKeys in Oracle perform the
Comments to this Manuals