{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

P2 - EECS 484 W11 Project 2 Querying Facebook Database with...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
1 EECS 484 W11 Project 2 Querying Facebook Database with Java and JDBC Due on February 16, 2011 by 10:30AM Overview Project 1 focused primarily on database design. In Project 2, you will focus on writing SQL queries. In addition, you will embed your SQL queries into Java (using JDBC) to implement a “Facebook Oracle,” a standalone program that answers several queries about the Facebook database. For this project, you will use our “official” schema, rather than the schema you designed in Project 1. You will have access to both your personal Facebook data (if you choose), and our public fake data. 1. Tables For this project, your schema will consist of the following twelve tables: 1. <prefix>.<DataType>_USERS 2. <prefix>.<DataType>_FRIENDS 3. <prefix>.<DataType>_CITIES 4. <prefix>.<DataType>_PROGRAMS 5. <prefix>.<DataType>_USER_CURRENT_CITY 6. <prefix>.<DataType>_USER_HOMETOWN_CITY 7. <prefix>.<DataType>_EDUCATION 8. <prefix>.<DataType>_USER_EVENTS 9. <prefix>.<DataType>_PHOTOS 10. <prefix>.<DataType>_ALBUMS 11. <prefix>.<DataType>_TAGS 12. <prefix>.<DataType>_PARTICIPANTS Public Fake Data: <DataType> should be replaced with “PUBLIC” to access the fake data tables. The public fake data tables are stored in the GSI's account (heedokim). Therefore, you should use the GSI's account name (HEEDOKIM) as <prefix> to access the public tables. For example, to access the public USERS table, you should refer to the table name as HEEDOKIM.PUBLIC_USERS.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2 Personal Facebook Data: To use your own Facebook data, you should first store it in our official schema instead of your schema from Project 1. We provide you .sql files, which you can execute in sqlplus to load your data to our official schema. However, these .sql files assume that you have already downloaded your Facebook data from Project 1 into the following five tables: USER_INFORMATION ARE_FRIENDS PHOTO_INFORMATION TAG_INFORMATION EVENT_INFORMATION If you don't already have your Facebook data stored in these five tables, you can use the following link from Project 1 to download and store your data in these tables: http://apps.facebook.com/eecs_facebookdata/ We provide you the following .sql files, which you can execute in sqlplus to load your data into our official schema. - CreateTablePrivate.sql : You can execute this file to create our official database schema consisting of 12 tables: SQL> @CreateTablePrivate; - PopDataPrivate.sql : You can execute this file to load your Facebook data to the tables that are created in the previous step: SQL> @PopDataPrivate.sql; - grantAccessPrivate.sql : You can grant access to select for all the 12 tables that are created by “CreateTablePrivate.sql” so JDBC can access your tables. SQL> @grantAccessPrivate.sql;
Background image of page 2
3 We also provide you an “SQL” script that you can use to drop your tables: - DropTablesPrivate.sql : You can execute this file to drop the 12 tables created by “CreateTablePrivate.sql”: SQL> @DropTablesPrivate.sql; Your personal Facebook data is stored in your own Oracle account. Therefore, you should use your own Oracle account name as <prefix> to access your personal Facebook tables. Also, you should replace <DataType> with “PERSONAL”. For example, to access your personal USERS
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}