Download presentation
Presentation is loading. Please wait.
1
09-02-2008, MS-Access, QBE, Access/Oracle
CS8630 Database Administration Dr. Mario Guimaraes Class Will Start Momentarily…
2
Install/Launch Oracle:Another Interface
To run one command at a time, Choose Go to Database Home Page from Start Menu (see very first picture above). Start Menu -> Programs -> Oracle 10g Express -> Go to Database Home Page An alternative to using the SQL command prompt is go to the Database Home page from the Start Menu. Select Start Menu, then Programs, then Oracle 10g Express then Database Home Page
3
Oracle Express Home Page
Select the SQL command (third icon below)
4
Sql Command interface
5
TOAD
6
TO CHECK if ALL TABLES were created From the oracle prompt, type in
View user_tables TO CHECK if ALL TABLES were created From the oracle prompt, type in SQL>select table_name from user_tables; You will see the tables customers, orders, products and agents
7
MS-Access and QBE
8
Launch MS-Access, Create a new File
9
Select Blank Database
10
Creating a Table
11
Defining Datatatypes
12
Defining Relationship
13
Editing Relationships
14
Creating a Form
15
Inserting Pictures
16
Database Utilities
17
Query-by-Example (QBE)
Visual approach for accessing information in a database through use of query templates. Example values are entered into template to represent what access to database is to achieve, such as the answer to a query. Originally developed by IBM in 1970s [Zloof] and has proved so popular that QBE (or similar) is now provided by most DBMSs. When user constructs a QBE - in background, DBMS creates an equivalent SQL statement.
18
New DB - .MDB file
19
Introduction to Microsoft Access
20
SQL View (MS-Access Query)
21
New Query
22
Projection
23
Restriction
24
Restriction w/ multiple criteria
25
Join
26
Totals (Aggregate Functions)
27
Projecting Expressions
28
Specifying Criteria
29
Find Unmatched Query (Outer Join)
30
Creating a Table
31
Defining Datatatypes
32
Defining Relationship
33
Editing Relationships
34
Creating a Form
35
Inserting Pictures
36
Database Utilities
37
Connect MS-Access & Oracle
Do a search and find odbcad32.exe (ODBC Data Source program) or Control Panel -> Administrative Tools -> Data Sources (ODBC) Then follow the instructions at Click on the System DSN panel above (second one from the left) and the add button on the right of A Create New Data Source window appears as shown in Next slide.
38
Select Driver Select the Microsoft ODBC for Oracle driver and click the Finish button
39
Define Server A Microsoft ODBC for Oracle Setup window will appear as shown in Figure 3 below (from . For Data Source Name you can choose any name (OracleAccess, for example). For Server Name you choose the Oracle instance (or the service name in a multi-user environment). The other two parameters are optional. User Name is the Oracle user, but you should leave it blank, that way you can login as any user. Click okay and click okay again to save the ODBC Data source and exit.
40
Get External Data Launch MS-Access and select File Menu -> Get External Data -> Link (if you select import, you are simply copying the oracle tables to MS-Access)
41
Select File type
42
Select Data Source When the Select DataSource window appears (Figure 6), select the Machine Data Source tab and then select the Data Source you created.
43
Select PK When you click the okay button, you will get a login window. Type in your Oracle user name and Password (Server name is the database instance name and should already come typed for you). You then should get a screen with tables which you can select. Select the tables you want link to next slide. Click OK button
44
Link Tables When you click the okay button (in previous slide), you will get a login window. Type in your Oracle user name and Password (Server name is the database instance name and should already come typed for you). You then should get a screen with tables which you can select. Select the tables you want link to (slide below).
45
Select PK After you select the tables, make sure you also select the field you want to define as a primary key. Otherwise you will only be able to view data (and not modify).
46
See Linked Tables You will then be able to access the oracle tables as if they were MS-Access tables. However, since you chose the Link Option (not the import), you are actually modifying the Oracle Database.
47
Import/Export
48
Georgia Oracle User Group
49
End of Lecture End Of Today’s Lecture.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.