Administer > Manage WebSphere Commerce features > Marketing > Collaborative filtering > WebSphere Commerce Recommendation Engine powered by LikeMinds > Background LikeMinds utilities
Create the LikeMinds database schema
LikeMinds Personalization Server collaborative filtering technology complements the existing WebSphere Commerce personalization offering. It consists of a client component, a WebSphere Application Server application, and a database.
LikeMinds Personalization Server uses collaborative filtering technology to provide personalization solutions. It builds user profiles using implicit user behavior such as:
- Product purchases
- Items added or removed from a shopping cart
- Navigation history
WebSphere Commerce installs the client component of the LikeMinds Personalization Server on the WebSphere Commerce machine, by default, but configure the LikeMinds application manually. LikeMinds configuration entails the following tasks:
- Create the LikeMinds database schema
- Configure WebSphere Commerce to interact with LikeMinds
- Configure Likeminds
Procedure
- Create a separate database for the LikeMinds data. You can use either DB2 or Oracle, and the database can be located on the same server as WebSphere Commerce, or on a separate server.
- Log in using the db2 user created by WebSphere Commerce.
- Change the current user to the db2 user created by WebSphere Commerce. For example on AIX, issue the following command: su - db2user, where db2user is the db2 user ID. If you choose to create the LikeMinds database schema using a different db2 administrator ID, grant the ID permissions to access the SQL files used in the steps below. One option is to update the permissions using the following command:
chmod -R 755 /usr/WebSphere/CommerceServer70/likeminds
- Create a new database using the following command:
db2 create DB LM
- Connect to the database using the following command:
db2 connect to LM user userID using userPassword
- Create the necessary additional LikeMinds schema using the following command:
db2 -tvf WC_INSTALL/likeminds/schema/db2/lm_Table.sql
db2 -tvf WC_INSTALL\likeminds\schema\db2\lm_Table.sql
- Populate the database with some initial data using the following command:
db2 -tvf WC_INSTALL/likeminds/schema/db2/lm_Data.sql
db2 -tvf WC_INSTALL\likeminds\schema\db2\lm_Data.sql
- Populate the database with some initial configuration data using the following command:
db2 -tvf WC_INSTALL/likeminds/config/lm_Props.sql
db2 -tvf WC_INSTALL\likeminds\config\lm_Props.sql
- Close the database connection using the following command:
db2 TERMINATE
- Create a user profile for LikeMinds. The new user profile name should be the same as the schema name you are going to create for LikeMinds. For example, to create a user profile with the name LM, use the following command:
CRTUSRPRF USRPRF(LM) PASSWORD(password) GRPPRF(QEJBSVR) LANGID(ENU) CNTRYID(US) CCSID(37)
- Logon using the new user profile you created in step 1. On the command line, enter the following command to start an SQL session:
STRSQL
- Issue the following command in the SQL session to create a new schema:
create schema SchemaNamewhere SchemaName is the name of the new schema. Use LM as the schema name.
- Change the current user to the db2 user.
- Start a QSH session by issuing the following command on the command line:
STRQSH
- Create the necessary additional LikeMinds schema using the following command:
db2 -v -t -r DB_name -u UserID -p password -f WC_INSTALL/likeminds/schema/db2/lm_Table.sql SchemaNamewhere:
- DB_name
- The target relational database as displayed in the relational database directory.
To obtain this, use the WRKRDBDIRE command.
- UserID
- The user ID created in step 1.
- password
- The password corresponding to the UserID created in step 1.
- SchemaName
- The name of the schema used in step 3.
- Populate the database with some initial data using the following command:
db2 -v -t -r DB_name -u UserID -p password -f WC_INSTALL/likeminds/schema/db2/lm_Data.sql SchemaNamewhere:
- DB_name
- The target relational database as displayed in the relational database directory.
To obtain this, use the WRKRDBDIRE command.
- UserID
- The user ID created in step 1.
- password
- The password corresponding to the UserID created in step 1.
- SchemaName
- The name of the schema used in step 3.
- Populate the database with some initial configuration data using the following command:
db2 -v -t -r DB_name -u UserID -p password -f WC_INSTALL/likeminds/config/lm_Props.sql SchemaNamewhere:
- DB_name
- The target relational database as displayed in the relational database directory.
To obtain this, use the WRKRDBDIRE command.
- UserID
- The user ID created in step 1.
- password
- The password corresponding to the UserID created in step 1.
- SchemaName
- The name of the schema used in step 3.
- Adjust the authority of the LikeMinds schema library to ensure adequate security, using the following command:
CHGAUT OBJ('/qsys.lib/lm.lib') USER(*PUBLIC) DTAAUT(*EXCLUDE) OBJAUT(*NONE) CHGAUT OBJ('/qsys.lib/lm.lib/*') USER(*PUBLIC) DTAAUT(*EXCLUDE) OBJAUT(*NONE) CHGAUT OBJ('/qsys.lib/lm.lib') USER(WC_instance) DTAAUT(*RWX) OBJAUT(*ALL) CHGAUT OBJ('/qsys.lib/lm.lib/*') USER(WC_instance) DTAAUT(*RWX) OBJAUT(*ALL)
- Create a new oracle user for LikeMinds. Please refer to Oracle document about how to create a new Oracle user.
- Connect to the database using the following command:
sqlplus userID/userPassword@OracleSID
- Create the necessary additional LikeMinds schema using the following command:
start WC_INSTALL\likeminds\schema\oracle\lm_Table.sql
- Populate the database with some initial data using the following command:
start WC_INSTALL\likeminds\schema\oracle\lm_Data.sql
- Populate the database with some initial configuration data using the following command:
start WC_INSTALL\likeminds\config\lm_Props.sql
- Close the database connection using the following command:
quit