Google maps are queried based on Oracle. How does Google store maps in Oracle?
Here we use the dbms_lob package to briefly understand the process.
1) create a t table:
- 00:32:04 hr @ ORCL (^ ω ^)Create TableT (a varchar2 (20), B blob );
-
- The table has been created.
2) Write a stored procedure:
- CREATE OR REPLACE PROCEDUREThink (p_1 VARCHAR2, p_2 VARCHAR2, p_3 varchar2)
- AS
- V_f BFILE;
- V_ B blob;
- BEGIN
- INSERT INTOTValues(P_1, EMPTY_BLOB ())RETURNBIntoV_ B;
-
-
- V_f: = BFILENAME (p_2, p_3 );
- DBMS_LOB.FILEOPEN (v_f, DBMS_LOB.FILE_READONLY );
- DBMS_LOB.LOADFROMFILE (v_ B, v_f, DBMS_LOB.GETLENGTH (v_f ));
- DBMS_LOB.FILECLOSE (v_f );
- Commit;
- End;
Check whether our process is correct: select * from user_errors
3) The sys user creates a directory object and authorizes:
- 00:44:12 sys @ ORCL (^ ω ^)CreateDirectory dirAs 'C: \ Users \ Administrator \';
-
- The directory has been created.
-
- 00:45:21 sys @ ORCL (^ ω ^)Grant All OnDirectory dirToHr;
4) execute the Stored Procedure
- Begin
- Think ('This is my pic 1','Dir','Psu.jpg');
- End;
5) query (based on pl/SQL query)
Select*FromT
The query results are as follows:
Of course, Google cannot use pl/SQL to show its images. It may be an app developed by java or another app.