WebSphere Commerce EnterpriseWebSphere Commerce Professional

Creating 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 you must configure the LikeMinds application manually. LikeMinds configuration entails the following tasks:
  1. Creating the LikeMinds database schema
  2. Configuring WebSphere Commerce to interact with LikeMinds
  3. Configuring Likeminds

Procedure

  • DB2 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.
    1. Windows Log in using the db2 user created by WebSphere Commerce.
    2. SolarisLinuxAIX 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, you must 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
      
    3. Create a new database using the following command:
      
      db2 create DB LM
      
    4. Connect to the database using the following command:
      
      db2 connect to LM user userID using userPassword
      
    5. Create the necessary additional LikeMinds schema using the following command: SolarisLinuxAIX
      
      db2 -tvf WC_installdir/likeminds/schema/db2/lm_Table.sql 
      
      Windows
      
      db2 -tvf WC_installdir\likeminds\schema\db2\lm_Table.sql 
      
    6. Populate the database with some initial data using the following command: SolarisLinuxAIX
      
      db2 -tvf WC_installdir/likeminds/schema/db2/lm_Data.sql
      
      Windows
      
      db2 -tvf WC_installdir\likeminds\schema\db2\lm_Data.sql
      
    7. Populate the database with some initial configuration data using the following command: SolarisLinuxAIX
      
      db2 -tvf WC_installdir/likeminds/config/lm_Props.sql
      
      Windows
      
      db2 -tvf WC_installdir\likeminds\config\lm_Props.sql
      
    8. Close the database connection using the following command:
      
      db2 TERMINATE
      
  • For IBM i OS operating system
    1. 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)                 
      
    2. 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
      
    3. Issue the following command in the SQL session to create a new schema:
      
      create schema SchemaName
      
      where SchemaName is the name of the new schema. Use LM as the schema name.
    4. Change the current user to the db2 user.
    5. Start a QSH session by issuing the following command on the command line:
      
      STRQSH
      
    6. Create the necessary additional LikeMinds schema using the following command:
      
      db2 -v -t -r DB_name -u UserID -p password 
        -f WC_installdir/likeminds/schema/db2/lm_Table.sql SchemaName
      
      where:
      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.
    7. Populate the database with some initial data using the following command:
      
      db2 -v -t -r DB_name -u UserID -p password -f  
        WC_installdir/likeminds/schema/db2/lm_Data.sql SchemaName
      
      where:
      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.
    8. Populate the database with some initial configuration data using the following command:
      
      db2 -v -t -r DB_name -u UserID -p password -f  
        WC_installdir/likeminds/config/lm_Props.sql SchemaName
      
      where:
      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.
    9. 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_name) DTAAUT(*RWX) OBJAUT(*ALL)  
      CHGAUT OBJ('/qsys.lib/lm.lib/*') USER(WC_instance_name) DTAAUT(*RWX) OBJAUT(*ALL)  
      
  • Oracle
    1. Create a new oracle user for LikeMinds. See Oracle documentation about how to create a new Oracle user.
    2. Connect to the database using the following command:
      sqlplus userID/userPassword@OracleSID
      
    3. Create the necessary additional LikeMinds schema using the following command:
      
      start WC_installdir\likeminds\schema\oracle\lm_Table.sql
      
    4. Populate the database with some initial data using the following command:
      
      start WC_installdir\likeminds\schema\oracle\lm_Data.sql
      
    5. Populate the database with some initial configuration data using the following command:
      
      start WC_installdir\likeminds\config\lm_Props.sql
      
    6. Close the database connection using the following command:
      
      quit