1. 	Which of the following statements about BFILEs are true? (Choose three.) 				
			
	They are stored outside the database (*)
		
	The data can be text or multimedia (*)
			
	SQL statements such as SELECT can be used to access them
			
	They can be read and modified using Oracle tools
	
			
	They can be accessed using DBMS_LOB (*)
2. 	BFILEs can have normal object privileges (such as SELECT or UPDATE) granted on them. True or False? 				
			
	True
			
	False (*)
3. 	Which of the following will create an Oracle directory object and allow everyone to use it? 	
					
			
	CREATE DIRECTORY sample_dir AS '/u01/filesdir';
GRANT READ ON sample_dir TO PUBLIC;
	
			
	CREATE DIRECTORY sample_dir AS '/u01/filesdir';
GRANT READ ON DIRECTORY sample_dir TO PUBLIC;

(*)
			
	CREATE DIRECTORY sample_dir FOR '/u01/filesdir';
GRANT READ ON sample_dir TO PUBLIC;

		
	CREATE DIRECTORY sample_dir FOR '/u01/filesdir';
GRANT READ ON DIRECTORY sample_dir TO PUBLIC;

			
	CREATE DIRECTORY sample_dir LOCATION '/u01/filesdir';
GRANT READ ON DIRECTORY sample_dir TO PUBLIC; 

4. 	Which data dictionary view allows a non-DBA to see the Oracle directories which he or she is allowed to use? 	
					
			
	ALL_BFILES
			
	USER_DIRECTORIES
			
	ALL_DIRECTORIES (*)
			
	USER_DIRECTORY
		
	None of the above

5. 	An Oracle directory object called MOVIE_DIR has been created. It points to an Operating System location which contains a movie file named 'eight_mile.avi'. Which of the following will successfully load the BFILE locator value into the variable v_locator? 	
					
			
	DECLARE
    v_locator BFILE;
BEGIN
    v_locator := BFILENAME('eight_mile.avi','MOVIE_DIR');
END;

			
	DECLARE
    v_locator BFILE;
BEGIN
    v_locator := DBMS_LOB.GETLENGTH('MOVIE_DIR','eight_mile.avi');
END;

			
	DECLARE
    v_locator BFILE;
BEGIN
    v_locator := DBMS_LOB.FILEGETNAME('MOVIE_DIR','eight_mile.avi');
END;

			
	DECLARE
    v_locator BFILE;
BEGIN
    v_locator := BFILENAME('MOVIE_DIR','eight_mile.avi');
END;

(*)
			
	DECLARE
    v_locator BFILE;
BEGIN
    v_locator := DBMS_LOB.FILEGETNAME('eight_mile.avi','MOVIE_DIR');
END; 

6. 	The bigemp table contains a BFILE column named favorite_movie which has been populated with locator values. The following code retrieves and displays the BFILE locator value for a single employee. What must be added at Line A to complete the code?

DECLARE
    v_locator BFILE;
    v_directory VARCHAR2(30);
    v_filename VARCHAR2(50);
BEGIN
    SELECT favorite_movie INTO v_locator
    FROM bigemp WHERE employee_id = 100;
    -- Line A
    DBMS_OUTPUT.PUT_LINE(v_directory||' '||v_filename);
END;

					
			
	DBMS_LOB.FILEGETNAME(v_locator, v_directory, v_filename); (*)
			
	v_filename := DBMS_LOB.FILEGETNAME(v_locator, v_directory);
			
	DBMS_LOB.FILEGETNAME(v_locator, v_filename);
			
	DBMS_LOB.FILEOPEN(v_locator);