Need help with Data Model for Private Messaging

Sad to say, but it looks like I just really screwed up the design of my Private Messaging (PM) module...  *sigh*
What looked good on paper doesn't seem to be practical in application.
I am hoping some of you Oracle gurus can help me come up with a better design!!
Here is my current design...
member -||-----0<- private_msg_recipient ->0------||- private_msg
MEMBER table
- id
- email
- username
- first_name
PRIVATE_MSG_RECIPIENT table
- id
- member_id_to
- message_id
- flag
- created_on
- updated_on
- read_on
- deleted_on
- purged_on
PRIVATE_MSG table
- id
- member_id_from
- subject
- body
- flag
- sent_on
- updated_on
- sender_deleted_on
- sender_purged_on
***Short explanation of how the application currently works...
- Sender creates a PM and sends it to a Recipient.
- The PM appears in the Sender's "Sent" folder in my website
- The PM also appears in the Recipient's "Incoming" folder.
- If the Recipient deletes the PM, I set "deleted_on" and my code moves the PM from Recipient's "Inbox" to the "Trash" folder.  (Record doesn't actually move!)
- If the Recipient "permanently deletes" the PM from his/her "Trash", I set "purged_on" and my code removes the PM from the Recipient's Message Center.  (Record still in database!)
- If the Sender deletes the PM, I set "sender_deleted_on" and my code moves the PM from the Sender's "Sent" folder to the "Trash" folder.  (Record doesn't actually move!)
- If the Recipient "permanently deletes" the PM from his/her "Trash", I set "sender_purged_on" and my code removes the PM from the Sender's Message Center.  (Record still in database!)
Here are my problems...
1.) I can't store PM's forever.
2.) Because of my design, the Sender really owns the PM, and if I add code to REMOVE the PM from the database once it has a "sender_purged_on" value, then that would in essence remove the PM from the Recipient's Inbox as well!!
In order to remove a PM from the database, I would have to make sure that *both* the Recipient has "purged_on" value and the Sender has a "sender_purged_on" value.  (Lot's of Application Logic for something which should be simple?!)
I am wondering if I need to change my Data Model to something that allows my autonomy when it comes to the Sender and/or the Recipient deleting the PM for good...
One the other hand, I believe I did a good job or normalizing the data.  And my current Data Model is the most efficient when it comes to saving storage space and not having dups.
Maybe I do indeed just need need to write application logic - or a cron job - which checks to make sure that *both* the Sender an Recipient have deleted the PM before it actually flushes it out of my database to free up space?!
Of course, if one party sits on their PM's forever, then I can never clear things out of my database to free up space...
What should I do??
Some expert advice would be welcome!!
Sincerely,
Debbie

rp0428,
I think I am starting to see my evil ways and where I went wrong... 
> Unfortunately his design is just as denormalized as yours
I see that now.  My bad!!
> the last two columns have NOTHING to do with the message itself so do NOT belong in a normalized table.
> And his design:
>
> Same comment - those last two columns also have NOTHING to do with the message itself.
Right.
> The message table should just have columns directly related to the message. It is a list of unique messages: no more, no less.
Right.
> Mark gave you hints to the proper normalized design using an INTERSECT table.
> that table might list: sender, recipient, sender_delete_flag, recipient_delete_flag.
> As mark suggested you could also have one or two DATEs related to when the delete flags were set. I would just make the columns DATE fields.
>
> Once both date columns have a value you can delete the message (or delete all messages older than 30+ days).
>
> When both flags are set you can delete the message itself that references the sender and the message sent.
Okay, how does this revised design look...
MEMBER --||-----0<-- PM_DISTRIBUTION -->0-------||-- PRIVATE_MSG
MEMBER table
- id
- email
- username
- first_name
and so on...
PM_DISTRIBUTION table (Maybe you can think of a better name??)
- id
- private_msg_id
- sender_id
- recipient_id
- sender_flag
- sender_deleted_on
- sender_purged_on
- recipient_flag
- recipient_read_on
- recipient_deleted_on
- recipient_purged_on
PRIVATE_MSG
- id
- subject
- body
- sent_on
Is that what you were describing to me?
Quickly reflecting on this new design...
1.) It should now be in 3rd Normal Form, right?
2.) It should allow the Sender and Recipient to freely and independently "delete" or "purge" a PM with no impact on the other party, right?
Here are a few Potential Issues that I see, though...
a.) What is to stop there from being TWO SENDERS of a PM?
In retrospect, that is why I originally stuck "member_id_from" in the PRIVATE_MSG table!!  The logic being, that a PM only ever has *one* Sender.
I guess I would have to add either Application Logic, or Database Logic, or both to ensure that a given PM never has more than one Sender, right?
b.) If the design above is what you were hinting at, and if it is thus "correct", then is there any conflict with my Business Rule: "Any given User shall only be allowed 100 Messages between his/her Incoming, Sent and Trash folders."
Because the Sender is no longer "tightly bound" to the PRIVATE_MSG, in my scenario above...
Debbie could send 100 PM's, hit her quota, then turn around and delete and purge all 100 Sent PM's and that should in no way impact the 100 PM's sitting in other Users' Inboxes, right??
I think this works like I want...
Sincerely,
Debbie

Similar Messages

  • Need Help with Dates

    I am printing a calendar and certain events will be helds on certain dates.
    One can edit the event if it has not passed the date. Events in the past can be viewed but not edited.
    When I query the database the date must be formatted dd-MMM-yy
    I am able to get today's date by doing this:
    java.util.Date today = new java.util.Date();
    String formatString = "dd-MMM-yy";
    SimpleDateFormat sdf = new SimpleDateFormat(formatString);
    String today_str = sdf.format(today);
    My code for printing the calendar: I left out some of the table formatting in the JSP page.
    GregorianCalendar d = new GregorianCalendar();
    int today = d.get(Calendar.DAY_OF_MONTH);
    int month = d.get(Calendar.MONTH);
    d.set(Calendar.DAY_OF_MONTH,1);
    int weekday = d.get(Calendar.DAY_OF_WEEK);
    for(int i = Calendar.SUNDAY; i < weekday; i++)
    out.print("<td> </td>");
    do {
    int day = d.get(Calendar.DAY_OF_MONTH);
    out.print("<td>" + day + "</td>");
    String formatString = "dd-MMM-yy";
    SimpleDateFormat sdf = new SimpleDateFormat(formatString);
    //if(event exists on this day
    // Get results
    // print link for viewing
    // if (after today) print link for edit
    if(weekday == Calendar.SATURDAY)
    out.println("</tr><tr valign=top>");
    d.add(Calendar.DAY_OF_MONTH,1);
    weekday = d.get(Calendar.DAY_OF_WEEK);
    } while(d.get(Calendar.MONTH) == month);
    if(weekday != Calendar.SUNDAY)
    System.out.println();
    The part I need help on is this:
    //if(event exists on this day
    // Get results
    // print link for viewing
    // if (after today) print link for edit
    I'm looping through each day of the month to print the days. I have the month, day, year as integers. How can I create a date object out of that and compare it to today's date to test if it's before or after today???
    All the function in the Date class that I think would do this have been deprecated.

    Need Help with Dates
    Here is some information about dates:
    There are many edible palm fruits, and one of the most widespread and favored of these is the data (Phoenix dactylifera). Dates were cultivated in ancient land from Mesopotamia to prehistoric Egypt, possibly as early as 6000 B.C. Then--as now--dates were a staple for the natives of those dry regions. Much later, Arabs spread dates around northern Africa, and dates were introduced into California by the Spaniards in 1765, around Mission San Ignacio.
    The date prefers dry, hot climates, because date fruits are injured at temperatures of 20 degrees F, and the damp climate of the California coast was not favorable for fruit production. In the mid-1800s, the date industry developed in California's hot interior valleys and in Arizona. Now the date industry in the United States is localized mostly in the Coachella Valley, where the sandy soils permit the plants to be deeply irrigated. Today the new varieties, mostly introduced in this century, produce about 40 million pounds of dates per annum, or over 60% of the dates consumed in this country. The rest are imported mainly from Persia. According to one survey, about one million people are engaged entirely in date palm cultivation worldwide.
    Hope that helps.

  • I still need help with the Dictionary for my Nokia...

    I still need help with the Dictionary for my Nokia 6680...
    Here's the error message I get when trying to open dictionary...
    "Dictionary word information missing. Install word database."
    Can someone please provide me a link the where I could download this dictionary for free?
    Thanks!
    DON'T HIT KIDS... THEY HAVE GUNS NOW.

    oops, im sorry, i didnt realised i've already submitted it
    DON'T HIT KIDS... THEY HAVE GUNS NOW.

  • Need help with calculator project for an assignment...

    Hi all, I please need help with my calculator project that I have to do for an assignment.
    Here is the project's specifications that I need to do"
    """Create a console calculator applicaion that:
    * Takes one command line argument: your name and surname. When the
    program starts, display the date and time with a welcome message for the
    user.
    * Display all the available options to the user. Your calculator must include
    the arithmetic operations as well as at least five scientific operations of the
    Math class.
    -Your program must also have the ability to round a number and
    truncate it.
    -When you multiply by 2, you should not use the '*' operator to perform the
    operation.
    -Your program must also be able to reverse the sign of a number.
    * Include sufficient error checking in your program to ensure that the user
    only enters valid input. Make use of the String; Character, and other
    wrapper classes to help you.
    * Your program must be able to do conversions between decimal, octal and
    hex numbers.
    * Make use of a menu. You should give the user the option to end the
    program when entering a certain option.
    * When the program exits, display a message for the user, stating the
    current time, and calculate and display how long the user used your
    program.
    * Make use of helper classes where possible.
    * Use the SDK to run your program."""
    When the program starts, it asks the user for his/her name and surname. I got the program to ask the user again and again for his/her name and surname
    when he/she doesn't insert anything or just press 'enter', but if the user enters a number for the name and surname part, the program continues.
    Now my question is this: How can I restrict the user to only enter 'letters' (and spaces of course) but allow NO numbers for his/her surname??
    Here is the programs code that I've written so far:
    {code}
    import java.io.*;
    import java.util.*;
    import java.text.*;
    public class Project {
         private static String nameSurname = "";     
         private static String num1 = null;
         private static String num2 = null;
         private static String choice1 = null;
         private static double answer = 0;
         private static String more;
         public double Add() {
              answer = (Double.parseDouble(num1) + Double.parseDouble(num2));
              return answer;
         public double Subtract() {
              answer = (Double.parseDouble(num1) - Double.parseDouble(num2));
              return answer;
         public double Multiply() {
              answer = (Double.parseDouble(num1) * Double.parseDouble(num2));
              return answer;
         public double Divide() {
              answer = (Double.parseDouble(num1) / Double.parseDouble(num2));
              return answer;
         public double Modulus() {
              answer = (Double.parseDouble(num1) % Double.parseDouble(num2));
              return answer;
         public double maximumValue() {
              answer = (Math.max(Double.parseDouble(num1), Double.parseDouble(num2)));
              return answer;
         public double minimumValue() {
              answer = (Math.min(Double.parseDouble(num1), Double.parseDouble(num2)));
              return answer;
         public double absoluteNumber1() {
              answer = (Math.abs(Double.parseDouble(num1)));
              return answer;
         public double absoluteNumber2() {
              answer = (Math.abs(Double.parseDouble(num2)));
              return answer;
         public double Squareroot1() {
              answer = (Math.sqrt(Double.parseDouble(num1)));
              return answer;
         public double Squareroot2() {
              answer = (Math.sqrt(Double.parseDouble(num2)));
              return answer;
         public static String octalEquivalent1() {
              int iNum1 = Integer.parseInt(num1);
    String octal1 = Integer.toOctalString(iNum1);
    return octal1;
         public static String octalEquivalent2() {
              int iNum2 = Integer.parseInt(num2);
              String octal2 = Integer.toOctalString(iNum2);
              return octal2;
         public static String hexadecimalEquivalent1() {
              int iNum1 = Integer.parseInt(num1);
              String hex1 = Integer.toHexString(iNum1);
              return hex1;
         public static String hexadecimalEquivalent2() {
              int iNum2 = Integer.parseInt(num2);
              String hex2 = Integer.toHexString(iNum2);
              return hex2;
         public double Round1() {
              answer = Math.round(Double.parseDouble(num1));
              return answer;
         public double Round2() {
              answer = Math.round(Double.parseDouble(num2));
              return answer;
              SimpleDateFormat format1 = new SimpleDateFormat("EEEE, dd MMMM yyyy");
         Date now = new Date();
         SimpleDateFormat format2 = new SimpleDateFormat("hh:mm a");
         static Date timeIn = new Date();
         public static long programRuntime() {
              Date timeInD = timeIn;
              long timeOutD = System.currentTimeMillis();
              long msec = timeOutD - timeInD.getTime();
              float timeHours = msec / 1000;
                   return (long) timeHours;
         DecimalFormat decimals = new DecimalFormat("#0.00");
         public String insertNameAndSurname() throws IOException{
              boolean inputCorrect = false;
                   while (inputCorrect == false) {
                        while (nameSurname == null || nameSurname.length() == 0) {
                             for (int i = 0; i < nameSurname.length(); i++) {
                             if ((nameSurname.charAt(i) > 'a') && (nameSurname.charAt(i) < 'Z')){
                                       inputCorrect = true;
                        else{
                        inputCorrect = false;
                        break;
                        try {
                             BufferedReader inStream = new BufferedReader (new InputStreamReader(System.in));
                             System.out.print("Please enter your name and surname: ");
                             nameSurname = inStream.readLine();
                             inputCorrect = true;
                        }catch (IOException ex) {
                             System.out.println("You did not enter your name and surname, " + nameSurname + " is not a name, please enter your name and surname :");
                             inputCorrect = false;
                        System.out.println("\nA warm welcome " + nameSurname + " ,todays date is: " + format1.format(now));
                        System.out.println("and the time is now exactly " + format2.format(timeIn) + ".");
                        return nameSurname;
              public String inputNumber1() throws IOException {
              boolean inputCorrect = false;
                   while (inputCorrect == false) {
                        try {
                             BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
                             System.out.print("\nPlease enter a number you want to do a calculation with and hit <ENTER>: ");
                             num1 = br.readLine();
                             double number1 = Double.parseDouble(num1);
                             System.out.println("\nThe number you have entered is: " + number1);
                             inputCorrect = true;
                        } catch (NumberFormatException nfe) {
                             System.out.println("\nYou did not enter a valid number: " + "\""+ num1 + "\" is not a number!!");
                             inputCorrect = false;
                        return num1;
         public String calculatorChoice() throws IOException {
              System.out.println("Please select an option of what you would like to do with this number from the menu below and hit <ENTER>: ");
              System.out.println("\n*********************************************");
              System.out.println("---------------------------------------------");
              System.out.println("Please select an option from the list below: ");
              System.out.println("---------------------------------------------");
              System.out.println("1 - Add");
              System.out.println("2 - Subtract");
              System.out.println("3 - Multiply");
              System.out.println("4 - Divide (remainder included)");
              System.out.println("5 - Maximum and minimum value of two numbers");
              System.out.println("6 - Squareroot");
              System.out.println("7 - Absolute value of numbers");
              System.out.println("8 - Octal and Hexadecimal equivalent of numbers");
              System.out.println("9 - Round numbers");
              System.out.println("0 - Exit program");
              System.out.println("**********************************************");
              boolean inputCorrect = false;
                   while (inputCorrect == false) {
                        try {
                             BufferedReader inStream = new BufferedReader (new InputStreamReader(System.in));
                             System.out.print("Please enter your option and hit <ENTER>: ");
                             choice1 = inStream.readLine();
                             int c1 = Integer.parseInt(choice1);
                             System.out.println("\nYou have entered choice number: " + c1);
                             inputCorrect = true;
                        } catch (NumberFormatException nfe) {
                             System.out.println("You did not enter a valid choice number: " + "\""+ choice1 + "\" is not in the list!!");
                             inputCorrect = false;
                        return choice1;
         public String inputNumber2() throws IOException {
              boolean inputCorrect = false;
                   while (inputCorrect == false) {
                        try {
                             BufferedReader br2 = new BufferedReader (new InputStreamReader(System.in));
                             System.out.print("\nPlease enter another number you want to do the calculation with and hit <ENTER>: ");
                             num2 = br2.readLine();
                             double n2 = Double.parseDouble(num2);
                             System.out.println("\nThe second number you have entered is: " + n2);
                             System.out.println("\nYour numbers are: " + num1 + " and " + num2);
                             inputCorrect = true;
                        } catch (NumberFormatException nfe) {
                             System.out.println("You did not enter a valid number: " + "\""+ num2 + "\" is not a number!!");
                             inputCorrect = false;
                        return num2;
         public int Calculator() {
              int choice2 = (int) Double.parseDouble(choice1);
              switch (choice2) {
                        case 1 :
                             Add();
                             System.out.print("The answer of " + num1 + " + " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 2 :
                             Subtract();
                             System.out.print("The answer of " + num1 + " - " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 3 :
                             Multiply();
                             System.out.print("The answer of " + num1 + " * " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 4 :
                             Divide();
                             System.out.print("The answer of " + num1 + " / " + num2 + " is: " + decimals.format(answer));
                             Modulus();
                             System.out.print(" and the remainder is " + decimals.format(answer));
                             break;
                        case 5 :
                             maximumValue();
                             System.out.println("The maximum number between the numbers " + num1 + " and " + num2 + " is: " + decimals.format(answer));
                             minimumValue();
                             System.out.println("The minimum number between the numbers " + num1 + " and " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 6 :
                             Squareroot1();
                             System.out.println("The squareroot of value " + num1 + " is: " + decimals.format(answer));
                             Squareroot2();
                             System.out.println("The squareroot of value " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 7 :
                             absoluteNumber1();
                             System.out.println("The absolute number of " + num1 + " is: " + decimals.format(answer));
                             absoluteNumber2();
                             System.out.println("The absolute number of " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 8 :
                             octalEquivalent1();
                             System.out.println("The octal equivalent of " + num1 + " is: " + octalEquivalent1());
                             octalEquivalent2();
                             System.out.println("The octal equivalent of " + num2 + " is: " + octalEquivalent2());
                             hexadecimalEquivalent1();
                             System.out.println("\nThe hexadecimal equivalent of " + num1 + " is: " + hexadecimalEquivalent1());
                             hexadecimalEquivalent2();
                             System.out.println("The hexadecimal equivalent of " + num2 + " is: " + hexadecimalEquivalent2());
                             break;
                        case 9 :
                             Round1();
                             System.out.println("The rounded number of " + num1 + " is: " + decimals.format(answer));
                             Round2();
                             System.out.println("The rounded number of " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 0 :
                             if (choice2 == 0) {
                                  System.exit(1);
                             break;
                   return choice2;
              public String anotherCalculation() throws IOException {
                   boolean inputCorrect = false;
                   while (inputCorrect == false) {
                             try {                              
                                  BufferedReader br3 = new BufferedReader (new InputStreamReader(System.in));
                                  System.out.print("\nWould you like to do another calculation? Y/N ");
                                  more = br3.readLine();
                                  String s1 = "y";
                                  String s2 = "Y";
                                  if (more.equals(s1) || more.equals(s2)) {
                                       inputCorrect = true;
                                       while (inputCorrect = true){
                                            inputNumber1();
                                            System.out.println("");
                                            calculatorChoice();
                                            System.out.println("");
                                            inputNumber2();
                                            System.out.println("");
                                            Calculator();
                                            System.out.println("");
                                            anotherCalculation();
                                            System.out.println("");
                                            inputCorrect = true;
                                  } else {
                                       System.out.println("\n" + nameSurname + " thank you for using this program, you have used this program for: " + decimals.format(programRuntime()) + " seconds");
                                       System.out.println("the program will now exit, Goodbye.");
                                       System.exit(0);
                             } catch (IOException ex){
                                  System.out.println("You did not enter a valid answer: " + "\""+ more + "\" is not in the list!!");
                                  inputCorrect = false;
              return more;
         public static void main(String[] args) throws IOException {
              Project p1 = new Project();
              p1.insertNameAndSurname();
              System.out.println("");
              p1.inputNumber1();
              System.out.println("");
              p1.calculatorChoice();
              System.out.println("");
              p1.inputNumber2();
              System.out.println("");
              p1.Calculator();
                   System.out.println("");
                   p1.anotherCalculation();
                   System.out.println("");
    {code}
    *Can you please run my code for yourself and have a look at how this program is constructed*
    *and give me ANY feedback on how I can better this code(program) or if I've done anything wrong from your point of view.*
    Your help will be much appreciated.
    Thanks in advance

    Smirre wrote:
    Now my question is this: How can I restrict the user to only enter 'letters' (and spaces of course) but allow NO numbers for his/her surname??You cannot restrict the user. It is a sad fact in programming that the worst bug always sits in front of the Computer.
    What you could do is checking the input string for numbers. If it contains numbers, just reprompt for the Name.
    AND you might want to ask yourself why the heck a calculator needs to know the users Name.

  • Need Help with data type conversion

    Hello People,
    I am new to java, i need some help with data type conversion:
    I have variable(string) storing IP Address
    IPAddr="10.10.103.10"
    I have to call a library function which passes IP Address and does something and returns me a value.
    The problem I have is that external function call in this library excepts IP Address in form of a byte array.
    Here is the syntax for the function I am calling through my program
    int createDevice (byte[] ipAddress).
    now my problem is I don't know how to convert the string  IPAddr variable into a byte[] ipAddress to pass it through method.

    Class InetAddress has a method
    byte[]      getAddress() You can create an instance using the static method getByName() providing the IP address string as argument.

  • Need help with SQL retrieval for previous month till current date

    Hi ,
    Need help generating statistics from previous month from date of enquiry till current date of enquiry.
    and have to display it according to date.
    Date of enquiry : 03/02/2012
    Application Type| 01/01/2012 | 02/01/2012 | 03/01/2012 |...... | 31/01/2012 | 01/02/2012 | 02/02/2012 | 03/02/2012 |
    sample1 20 30 40
    sample 2 40 40 50
    sample 3 50 30 30
    Hope you guys can help me with this.
    Regards

    Hi,
    932472 wrote:
    Scenario
    1)If i run the query at 12 pm on 03/2/2012. the result i will have to display till the current day.
    2)displaying the count of the application made based on the date.
    Application type 01012012 | 02012012 | 03012012 | ..... 01022012| 02022012|03022012
    sample 1 30 40 50 44 30
    sample 2 35 45 55
    sample 3 36 45 55Explain how you get those results from the sample data you posted.
    It would help a lot if you posted the results in \ tags, as described in the forum FAQ. {message{id=9360002}
    SELECT     application_type as Application_type
    ,     COUNT (CASE WHEN created_dt = sysdate-3 THEN 1 END)     AS 01012012 (should be getting dynamically)
    ,     COUNT (CASE WHEN created_dt = sysdate-4 THEN 1 END)     AS 02022012
    ,     COUNT (CASE WHEN created_dt = sysdate-5 THEN 1 END)     AS 03022012
    , COUNT (CASE WHEN created_dt = sysdate-6 THEN 1 END)     AS 04022012
    FROM     table_1
    GROUP BY application_type
    ORDER BY     application_typeThat's the bais idea.
    You can simplify it a little by factoring out the date differences:WITH got_d     AS
         SELECT     qty
         ,     TRUNC ( dt
              - ADD_MONTHS ( TRUNC (SYSDATE, 'MON')
                        , -1
              ) AS d
         FROM table1
         WHERE     dt     >= ADD_MONTHS ( TRUNC (SYSDATE, 'MON')
                        , -1
         AND dt     < TRUNC (SYSDATE) + 1
    SELECT     SUM (CASE WHEN d = 1 THEN qty END)     AS day_1
    ,     SUM (CASE WHEN d = 2 THEN qty END)     AS day_2
    ,     SUM (CASE WHEN d = 62 THEN qty END)     AS day_62
    FROM     got_d
    See the links I mentioned earlier for getting exactly the right number of columns, and dynamic column aliases.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Need help with date range searches for Table Sources in SES

    Hi all,
    I need help, please. I am trying to satisfy a Level 1 client requirement for the ability to search for records in crawled table sources by a date and/or date range. I have performed the following steps, and did not get accurate results from Advanced searching for date. Please help me understand what I am doing wrong, and/or if there is a way to define a date search attribute without creating a LOV for a date column. (My tables have 500,00 rows.)
    I am using SES 10.1.8.3 on Windows 32.
    My Oracle 10g Spatial Table is called REPORTS and this table has the following columns:
    TRACKNUM Varchar2
    TITLE Varchar2
    SUMMARY CLOB
    SYMBOLCODE Varchar2
    Timestamp Date
    OBSDATE Date
    GEOM SDO_GEOMETRY
    I set up the REPORTS table source in SES, using TRACKNUM as the Primary Key (unique and not null), and SUMMARY as the CONTENT Column. In the Table Column Mappings I defined TITLE as String and TITLE.
    Under Global Settings > Search Attributes I defined a new Search Attribute (type Date) called DATE OCCURRED (DD-MON-YY).
    Went back to REPORTS source previously defined and added a new Table Column Mapping - mapping OBSDATE to the newly defined DATE OCCURRED (DD-MON-YY) search attribute.
    I then modified the Schedule for the REPORTS source Crawler Policy to “Process All Documents”.
    Schedule crawls and indexes entire REPORTS table.
    In SES Advanced Search page, I enter my search keyword, select Specific Source Group as REPORTS, select All Match, and used the pick list to select the DATE OCCURRED (DD-MON-YY) Attribute Name, operator of Greater than equal, and entered the Value 01-JAN-07. Then the second attribute name of DATE_OCCURRED (DD-MON-YY), less than equals, 10-JAN-07.
    Search results gave me 38,000 documents, and the first 25 I looked at had dates NOT within the 01-JAN-07 / 10-JAN-07 range. (e.g. OBSDATE= 10-MAR-07, 22-SEP-07, 02-FEB-08, etc.)
    And, none of the results I opened had ANY dates within the SUMMARY CLOB…in case that’s what was being found in the search.
    Can someone help me figure out how to allow my client to search for specific dated records in a db table using a single column for the date? This is a major requirement and they are anxiously awaiting my solution.
    Thanks very much, in advance….

    raford,
    Thanks very much for your reply. However, from what I've read in the SES Admin Document is that (I think) the date format DD/MM/YYYY pertains only to searches on "file system" sources (e.g. Word, Excel, Powerpoint, PDF, etc.). We have 3 file system sources among our 25 total sources. The remaining 22 sources are all TABLE or DATABASE sources. The DBA here has done a great job getting the data standardized using the typical/default Oracle DATE type format in our TABLE sources (DD-MON-YY). Our tables have anywhere from 1500 rows to 2 million rows.
    I tested your theory that the dates we are entering are being changed to Strings behind the scenes and on the Advanced Page, searched for results using OBSDATE equals 01/02/2007 in an attempt to find data that I know for certain to be in the mapped OBSDATE table column as 01-FEB-07. My result set contained data that had an OBSDATE of 03-MAR-07 and none containing 01-FEB-07.
    Here is the big issue...in order for my client to fulfill his primary mission, one of the top 5 requirements is that he/she be able to find specific table rows that are contain a specific date or range of dates.
    thanks very much!

  • Need performance! - Need help with Server Architecture for SSAS on Azure VM

    I would like to build 100% Azure VM base solution. We can install as many as needed.
    I have large amount data in DW. (100GB-1000GB)
    I would like to provide PowerView reports in SharePoints.
    I would like to have report data be as real time as possible. (Min data is updated once in 2 hours)
    These are requirements:
    -SharePoint 2013
    -PowerView
    -SSAS OLAP Cube
    -SQL Server DW&Staging DB (Currently DW&Staging on same server)
    I need help specially what can be done with SSAS to meet requirements? Should be installed to own application server? Possible to install multiple SSAS? SSRS needs own server?
    I appreciate also links to server topology diagrams.
    Kenny_I

    I assume you mean 100GB-1000GB (not 1000TB) right?
    For Sharepoint I would refer to the sizing guide for diagrams and sizing:
    http://technet.microsoft.com/en-us/library/ff758647(v=office.15).aspx
    SSRS (and Power View) will run in the SharePoint farm on a SharePoint app server potentially with other SharePoint services.
    I would definitely put SSAS on a dedicated server for a cube that size. Depending on how well your data compresses, there may not be a VM in Azure with enough RAM to put your model into a Tabular SSAS model. I would prototype it with a subset of data to see
    how well it compresses. You can always use a Multidimensional model as a fallback.
    Depending on how much processing the SSAS model impacts user queries (since it is happening during the day) you could build an SSAS processing server and a separate SSAS query server and run the XMLA Synchronize command to copy the cube incrementally from processing
    to query servers.
    Does that help?
    http://artisconsulting.com/Blogs/GregGalloway

  • Need Help with mysql admin for Mac

    Hello all.
    I am new to cold fusion and databases all together. Infact I
    am doing an online tutorial to get me started, my problem is the
    tutorial really just scratches the surface for the mac side and in
    some cases sorta explains how to do but no visual help and I am
    very visual.
    I am searching for software that is really idiot proof to
    start my knowledge with then make the transition when I learn more
    and more to hard coding. The tutorial suggests Navicat for Mysql
    admin and it is nice but he is setting up basic databases in Access
    which looks really easy and I am trying to follow along with
    navicat but I am just not getting it specifically when it comes to
    setting up relationships between tables. Can I use a software like
    FileMaker Pro and just convert to mysql or is their other software
    that makes it a little more easy to understand how to set up
    relationships like access does.
    I am totally new to this stuff and I am looking for the
    easiest product to use. Thanks again for your help and time.
    Chris

    As for the database part, before you write your first query,
    you should become grounded in the concepts of data modeling. Then
    find a good source (book, books-on-line, etc. ) for the particular
    "flavor" of SQL used by your database of choice, then start writing
    your queries. Data model first (entities, relationships,
    attributes), then SQL.
    Couple of fairly good online tutorials for data modeling.
    Introduction
    to Data Modeling and
    Data Model
    Reference
    Master this and you will save yourself many hours of grief,
    trust me.
    Phil

  • Need help with Toshiba model 42TL515U TV FAN

    I recently had an error message pop up on the tv that says the tv fan went out. The tv has worked perfectly since i purchased it untill now. I'm very unhappy about it since i have taken great care of it the entire time and it is not my fault but toshibas for selling me the tv with a faulty internal fan and OF COURSE it tells me fan went out after my warranty just ended. I need help, answers and customer support because this is rediculous...

    If there truly is a fan in the TL515U you can easily open up the TV, look at the fan specs, and replace it. 
    I bet the fan used in it are the ones used in computers.

  • Need help with data grid...

    I have setup a profile card which displays information about individuals by pulling data from an XML database.
    I have multiple text fields and couple movie clips that display images but i need a datagrid to display stats for each individual.
    The stat information is set as attributes on a array of XML nodes each node is a year.
    Example XML
    <hockey>
         <profile>
              <name>Wayne Gretzky</name>
              <image>pic1</image>
              <dob>Jan 26, 1961</dob>
              <position>Centre</position>
              <height>6'0"</height>
              <weight>185lbs</weight>
              <history>"important information"</history>
              <medal_record>
                        <medal standing ="Silver" Event =" 1981 Canada Cup" sport="Ice Hockey"/>
                        <medal standing ="Gold" Event =" 1984 Canada Cup" sport="Ice Hockey"/>
                        <medal standing ="Gold" Event =" 1987 Canada Cup" sport="Ice Hockey"/>
                        <medal standing ="Gold" Event =" 1991 Canada Cup" sport="Ice Hockey"/>
                        <medal standing ="Silver" Event =" 1996 World Cup of Hockey" sport="Ice Hockey"/>
              </medal_record>
         </profile>
         <profile>
              <name>Wayne Gretzky2</name>
              <image>pic2</image>
              <dob>Jan 26, 1962</dob>
              <position>Right Wing</position>
              <height>6'1"</height>
              <weight>205lbs</weight>
              <history>"important information"</history>
              <medal_record>
                        <medal standing ="Gold" Event =" 1981 Canada Cup" sport="Ice Hockey"/>
                        <medal standing ="Bronze" Event =" 1984 Canada Cup" sport="Ice Hockey"/>
                        <medal standing ="Silver" Event =" 1987 Canada Cup" sport="Ice Hockey"/>
                        <medal standing ="Silver" Event =" 1991 Canada Cup" sport="Ice Hockey"/>
                        <medal standing ="Gold" Event =" 1996 World Cup of Hockey" sport="Ice Hockey"/>
              </medal_record>
         </profile>
    </hockey>
    The red information is what i need to get displayed by the Data Grid for each profile.
    Standing
    Event
    Sport
    Gold
    1981 Canada Cup
    Ice Hockey
    Bronze
    1984 Canada Cup
    Ice Hockey
    The swf has buttons to cycle through the profiles which loads the new information from the XML.
    If you have a good understanding of how the dataGRIDs work please let me know if you can help as this is the last problem holding me from finishing this.
    Thanks in advance.

    Update... I got the data pulling in but it doesnt change as the profile changes with the rest of the data.

  • Need help with data filtering on groups/application roles

    Hello,
    I have a situation where I have to apply security on objects (reports, prompts etc) and dimension members (Essbase cube). So the idea is like this:
    Report 1: access to three users (U1, U2, U3), but for dimension Company they have separate rights:
    U1: Company A, Companies A.1-A.7 (children of A) and Companies A.1.1-A.1.9 (children of A.1);
    U2: Company A.1 and Companies A.1.1-A.1.9;
         U3: Company A.1.1
    same for Report 2, but users must have access to different companyes, like Company B, B1...
    In WebLogic Console I created three groups (G1-G3) and placed each user to a group (U1-> G1, U2 ->G2, U3->G3). Then in WebLogic EM I created three application roles (R1-R3) and added for each, corresponding user (R1-> U1, R2->U2, R3-> U3).
    My approach was to use application roles like this:
    R1: include User1 and filter data on repository by application role to each generation of the cube ("Data_Source_Name"."Dimension_Name"."Generation2,Dimension"='Company A',"Data_Source_Name"."Dimension_Name"."Generation3,Dimension"='Company A.1', "Data_Source_Name"."Dimension_Name"."Generation4,Dimension"='Company A.1.1')
    R2: include User2 and filter data on repository by application role to each generation of the cube ("Data_Source_Name"."Dimension_Name"."Generation3,Dimension"='Company A.1', "Data_Source_Name"."Dimension_Name"."Generation4,Dimension"='Company A.1.1')
    R3: include User3 and filter data on repository by application role to each generation of the cube ("Data_Source_Name"."Dimension_Name"."Generation4,Dimension"='Company A.1.1').
    I've noticed that, by default, each role inherites BIConsumer and "localmachineusers" application roles, so I set in repository these both roles to filter data as the role 3 (the lowest level of acces), in order for my roles (Roles 1 to 3) to have the highest privileges.
    In repository I cannot see any of my users (U1-U3), but just the application roles they are in.
    For Report 1 I set the access to Roles 1-3 and when I am logged on as U3 this report should display only the data for Company A.1.1, but it doesn't (displays data also for Company A, Companies A.1-A.7).
    In fact it seems, that the data isn't filtered at all, which drives me to the conclusion that my data filter is override by another role, maybe ?
    Could you please give me a clue about what I am missing here ?
    Thank you.

    Amith,
    Please bear this with me - see my comments below (search for petresion_Comments):
    So, we have three users who have access to a report called Report1. But the data that they see in the report needs to be different. The report has a dimension company, and each user needs to see different companies data. So the filtering needs to be done on company dimension.
    petresion_Comment: That's my case to solve.
    Now the groups in weblogic has no purpose in OBIEE 11g unless you are using an LDAP authenticator who has groups defined in the active directory. By this I mean the network people are maintaining the users and group relation necessary for OBIEE. So keeping the weblogic groups apart for a minute, lets deal with users and roles only.
    The three users are assigned to three different roles R1, R2 and R3. By default, all the roles inherit the BIconsumer role, and localmachineusers role you mentioned is not an OTB role. This is something that is probably causing the data filtering to fail. Do a test like create a user in weblogic, assign him only to the localmachineusers role, and go to analytics, and check your roles and groups by going under my account. Make sure this role is not inheriting any other roles like BIAdministrator, BIauthor etc. So in conclusion, when one of your users login, they should inherit only their custom Role (R1 for instance), BIConsumer, Authenticated User, and your custom role localmachineusers.
    petresion_Comment: That is what I checked on the first time (few days ago) and is exactly as you say (BIConsumer, localmachinerole and Role1).
    Do not apply any data filters on the BIConsumer role. This is not a good practice because the filters get applied to every single user that logs into the system.
    petresion_Comment: I know that, but appliyng filters on BIConsumer role I tried to make sure that its privileges doesn't overrides any of my Roles (1,2 or 3). I will remove the filter on BIConsumer.
    Now create the data filters on your custom roles (R1, R2, R3). Save the RPD. Deploy the Rpd through Enterprise Manager.
    petresion_Comment: Only difference in my case is that I stopped BI services, applied changes to rpd in Offline mode and then restarted BI services.But also tried as you mentioned (by the book in fact) and same result. The problem is the same, my roles(1,2,3) don't filter the companies at all.
    Once you are done with all the work above, you should login into analytics as user1. After logging in go to my account, roles and groups, and make sure you see the R1 in the list of groups. Now run the report, and your filters should get applied no matter what. If they are still not getting applied, grab the physical sql and see if the filters are existing in the where condition.
    petresion_Comment: Where can I capture the physical SQL (probably an MDX sent to the Essbase cube ?) ?
    One other reason could be, one of the roles that are assigned to the user1 by default, is overriding the filters. Like for example, if a user is assigned to BIAdmin role, and no matter if you assign him to a different role that has 100's of filters, he will still see all of the data.
    petresion_Comment: As I said before, each of my users are members of their roles, BIComsumer and localmachinerole, so no other privileges (no BIAdmin role).
    Thank you for the patience.
    John

  • Need help with correction inscript for duplication on regular basis

    Hi,
    I am using Oracle 10.2.0.4 on Win 2008 R2. We have Archive mode enabled and no rman catalog is used. I have a requirement where i have to duplicate prod sevrer on regular basis to development server.
    I have created few batch files so that the entire process in automated. Stored all the scripts in c:\script\clone\ directory.+
    I have taken the backup copy of password and spfile from prod server and copied to the development server in same location.
    These are the scripts i run in order:
    *1_clone.bat*
    set ORACLE_SID=orcl
    sqlplus / as sysdba @c:\script\clone\2_test.bat
    *2_test.bat*
    shutdown immediate
    startup nomount
    host rman target sys/oracle@live nocatalog auxiliary / @c:\script\clone\3_rman.rcv
    *3_rman.rcv*
    run {
    allocate auxiliary channel d1 type disk;
    duplicate target database to ORCL NOFILENAMECHECK;
    exit
    When the duplication process in about to finish, i get below error:
    contents of memory script:
    shutdown clone;
    startup clone nomount;
    executing Memory Script
    RMAN-03002: failure of duplicate DB command at 07/31/2012 08:02:21
    RMAN-03015: error occured in stored script memory script
    RMAN-06136: Oracle error from auxiliary database: ORA-01013: user requested cancel of current operation
    Recovery Manager complete
    SQL>
    When i press exit, this window closes and i can run the alter database open resetlogs;+ command from a new sql prompt. I check online and some suggest there might be a window open with system user connected. Please suggest any changes in the script.
    Best Regards,

    Hello;
    Having another session with system user will cause rman to throw this error. For example another session used to start up database in nomount mode still being active.
    Duriing the cloning process the rman session needs to be exclusively connected to the auxiliary instance (no other session are allowed).
    Duplicate post
    request for help with rman cloning script
    Best Regards
    mseberg
    Edited by: mseberg on Jul 31, 2012 5:02 AM

  • Not exactly iweb - need help with a graphic for my site

    This doesn't fit anywhere so dumping it here. I drew by hand a graphic I want to use with iweb to put on my site as my site's logo. Main problem is that getting the background transparent isn't working well as when it was scanned the scanner didn't back the background "pure" white. I have tried adjusting the whitepoint and setting the color depth down, but still no good. I don't know a ton about graphic program use. I have an older copy of graphic converter that came on this powerbook when i got it. I would be fine having the graphic loose the marker look and have solid fill colors - just I am not good enough with computer drawing tools to do it on the computer! So I either need to get a volunteer to help me out, or some help with some detailed instructions to get this to work out... (also I am broke so no cost/shareware is only option here)
    many thanks!!!!
    I can get you a scanned jpg of the pic if needed.

    THANK YOU/___sbsstatic___/migration-images/migration-img-not-avail.png so the tolerance makes it not care so much about the gradations in color? what else is tolerence good for?
    I have a cleaner copy now after someone suggested GIMP, so played with it last night - though couldn't figure out transparency - that was clear on converter- just not cooperative till these wonderful directions.
    So now I know how to do it without messing with the pic, and with messing with it - both good lessons and got a bit brighter color out of the deal.
    many thanks for the straightforward and clear directions, they worked perfectly/___sbsstatic___/migration-images/migration-img-not-avail.png extra strars for you/___sbsstatic___/migration-images/migration-img-not-avail.png

  • Need help with XI certif for technical consultant

    Hi XI experts ,
    I am trying for certif for Development Consultant SAP NetWeaver u201904 - Exchange Infrastructure & Integration Technology -  C_TBIT44_04 .
    Can somebody please give me some sample questions and answers?
    I really will appreciate such help since I donu2019t have any idea what kind of questions are at the exam!
    I only have heard it is not an easy exam to take.?Is this true?
    Also any shared experienced will be appreciate it. If you have, please give me more hands on information , not just course numbers and syllabus.
    Looking forward to receive info from you. Please use emal contcts in my Business Card.
    Thanks in advance all!
    Jim

    HI,
    Yes its true ...any SAP certification is never ever be the easy stuff...that could be easily achievable....
    You need to be well prepare for the Certification. There are many SDN links available for sample questions. you can just search on SDN as well as on Internet.
    https://www.sdn.sap.com/irj/sdn/developerareas/xi?rid=/webcontent/uuid/a680445e-0501-0010-1c94-a8c4a60619f8
    1. SAP XI Certification - Important Topics
    2. Regarding XI Certification Material.
    3. Xi sample Certification questions
    XI certification passing used to be normally 65%. It may vary based on the runtime exam rules.
    There are marks as well as no of questions allocated for every section, so you may refer below link
    you can go to the following site and check the information.
    https://service.sap.com/%7Esapidp/011000358700005902252004E
    https://service.sap.com/~sapidp/011000358700003595762004E
    SAP XI Certification - Important Topics All about XI certification
    Thanks
    Swarup

Maybe you are looking for

  • Issue with infotype treatment

    I'm trying to update flag 'ITXEX' of table PA0016 in method IN_UPDATE of my BADI and via PA30. The problem is the following: When i click save, in_update method is fired and the flag is updated in table PA0016, but if the next thing i do is display t

  • I have used GCs in the past and then used a credit card but my GC money has disappeared. Where is it?

    I live in the UK. In the past I used stored credit to buy games, movies, music etc from Itunes. I wanted to buy a game that I couldn't afford with my stored credit so I used my card. Now I have removed my credit card details but I do not know where m

  • Exporting Universes Issue

    Hi, We upgraded all the BusinessObjects XI 3.1 to the last Package. I have created Universes and also Webi Reports. Yesterday i had to make some modifications into the universe (Is all created using derived tables and SQL) and suddenly the exportatio

  • IDOC for sending material data including classification data?

    Hi everyone, I'm just looking for an IDOC to send to an external system all data of certain materials but including classification system data, variant configuration data... I have checked MATMAS0x but I am not sure if those IDOCs match with my requi

  • Cursor in plsql

    Hi, I wrote this: declare asterisk emp.stars%type; sal number; empno emp.employee_id%type := &x; begin select nvl(round(salary/1000, 0), 0) into sal from emp where employee_id = empno; for i in 1..sal loop asterisk := asterisk ||' *'; end loop; dbms_