Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20
  1. #11

    sakto si brad fixyourself... Im into database also.. sauna ra ko ni gamit ana equi join...


    "TSQL - the best"

  2. #12
    Quote Originally Posted by fixyourself View Post
    @Dodiebax

    bout your food for thought.




    That depends on what you are trying to do, your equi-join is like an inner join statement, RIGHT and LEFT joins have their purpose also.

    There are things your equi-join can't do, so please do take off the warning. Those JOIN statements are useful..

    lol..
    I agree with this, there are cases that the other mentioned joins are more efficient and effective compared to equi-joins. So it's a case to case scenario. But I'm not brushing off what dodie mentioned that JOINs perform differently.

    For TS: here is a good link for SQL basics: SQL Joins

  3. #13
    dugay na ni nga trade. I'm sure nga na solve na sa TS ang iyang problema.

    My advice to you TS, mas maayo nga mogamit ka ug stored procedure sa imo database coding.
    Imo lang tawagon ang stored procedure sa VB application nimo. Daghan kaayo ang advantage using stored procedure.

  4. #14
    agree ko kang fixyourself. naa purpose ang mga type of joins. sometimes naa query nga applicable using left outer join, inner join, cross join, union, union all.

  5. #15
    how to make an erro trapping mga expert dinhi.. nga once na ni sa sulod database 1234 then na mo accidentaly enter sad mo 1234 dli cya mo dawat duplication of numbers?

  6. #16

    Default Re: How to use select join

    Quote Originally Posted by skeptic_rob View Post
    how to make an erro trapping mga expert dinhi.. nga once na ni sa sulod database 1234 then na mo accidentaly enter sad mo 1234 dli cya mo dawat duplication of numbers?
    Daghan ways para ani
    pwed ka magQuery if existing na ba na xa sa database before inserting.

    pwed pud nimo iSet ang kana nga field to unique para ang database na ang bahala moIdentify if unique ba na nga data or dili. iCatch lang ang error nga iReturn sa database.

  7. #17

    Default Re: How to use select join

    Quote Originally Posted by dodie View Post
    Hi, my work is with database department

    I can help you explain basics of join. Usually we call it equi-join.
    When you join multiple tables. It could be: 1 is to 1, 1 is to many, or many is to 1.

    The standard of equi-join number of tables minus 1:
    For example if you have 6 tables, you should perform equi-join in 5 conditions. You can perform more than 5 conditions if want it to be more strict.

    Example of 3 tables, with 2 equi-join conditions.
    this EQUI-JOIN serving employee table as the center point.
    Code:
    SELECT emp.employee_id, dept.department_id , comp.company_id
    FROM 
    company as comp,
    employee as emp,
    department as dept
    WHERE comp.company_id = emp.company_id -- equi join company ID
    AND  dept.deptartment_id= emp.department_id -- equi join department ID


    I happened to stumble on this post and a bit worried about the company this guy is working on. Is he really in the database department?

    Consider my query here:
    I am trying to access all employees that belongs that are coming from certain company name ‘acme corporation’
    and from ‘database department’

    So it would be

    Code:
    SELECT employee.name, department.name, company.name
    FROM company
    LEFT JOIN department
    ON department.department_id = company.company_id
    LEFT JOIN employee
    ON employee.department_id = department.department_id
    WHERE company.name = ’acme company’ 
    AND department.name = ‘database department’
    There database goes like this. The query database starts with company table and filters out the company that is not ‘acme corporation’ (the total expected records ratio of the overall total records is presume close to 1/N: N = no of companies in the company table). Imagine the total number of records from department and especially the employee table has been stripped out by the initial phase of the query.

    NOW, back to you “RECOMMENDED” query. The database is doing a full table scan on each of the involved tables and do a matches on the corresponding columns of each table, before it filters the record that does not qualify the filter. That is zoo horrible. Are you really in you database department. Well, what kind of shitty applications you’ve been building out there?

    You are doing a full table scan here! For christ sake!!!
    If it would be applied to hundred or thousand of records, it wouldn’t hurt that much but Imagine your query strategy will be applied to real world application which deals with millions or billions of records(in your case, you shouldn’t have to be in it, coz obviously you are not ready for that)!!

    Why don’t you do your homework first, before you would tacklessly tell anybody of what you know, for which you are not aware of which is a stupid one!

  8. #18

    Default Re: How to use select join

    Quote Originally Posted by eclipsegenesis View Post
    I happened to stumble on this post and a bit worried about the company this guy is working on. Is he really in the database department?

    Consider my query here:
    I am trying to access all employees that belongs that are coming from certain company name ‘acme corporation’
    and from ‘database department’

    So it would be

    Code:
    SELECT employee.name, department.name, company.name
    FROM company
    LEFT JOIN department
    ON department.department_id = company.company_id
    LEFT JOIN employee
    ON employee.department_id = department.department_id
    WHERE company.name = ’acme company’ 
    AND department.name = ‘database department’
    There database goes like this. The query database starts with company table and filters out the company that is not ‘acme corporation’ (the total expected records ratio of the overall total records is presume close to 1/N: N = no of companies in the company table). Imagine the total number of records from department and especially the employee table has been stripped out by the initial phase of the query.

    NOW, back to you “RECOMMENDED” query. The database is doing a full table scan on each of the involved tables and do a matches on the corresponding columns of each table, before it filters the record that does not qualify the filter. That is zoo horrible. Are you really in you database department. Well, what kind of shitty applications you’ve been building out there?

    You are doing a full table scan here! For christ sake!!!
    If it would be applied to hundred or thousand of records, it wouldn’t hurt that much but Imagine your query strategy will be applied to real world application which deals with millions or billions of records(in your case, you shouldn’t have to be in it, coz obviously you are not ready for that)!!

    Why don’t you do your homework first, before you would tacklessly tell anybody of what you know, for which you are not aware of which is a stupid one!
    First of all, this OBVIOUSLY looks like someones schoolwork being asked on an online forum.

    Second, the guy who recommended his query knew that. There is no need to worry about real world applications here. Everyone has to go through the basics. Granted, everyone should start learning good programming practices but that is beside the point.

    The question asked was, "How do you use join in VB?", not "How do you optimize when searching for so and so". In this context, his code was sufficient.

    And lastly, Please, do not attack someone in a language that you are not comfortable with. It makes you look like a tool.

    This is a forum where everyone should be respecting each other and your post felt like it merited a proper reply. I felt that the attack was uncalled for. After all, are we not all Bisaya? Are we not all Bisaya programmers? We should be pulling each other up, not pushing down.

    Instead of barging in here and bitching about his code, why didn't you just put in some constructive criticism? Did you feel that you one upped him after that little speech you made? Did you get your ego boost? Why don't you do us all a favor and crawl back into the hole that you came from?

    tl;dr- This is someone's homework, there was no real world application here. You're an idiot for thinking otherwise. Your English is horrible. Do not attack someone because you think you're better than him. You, obviously, are not.

    So, calm, the f*ck, down. Hilas2x ka lng buanga ka.

  9. #19

    Default Re: How to use select join

    what eclipsegenesis said was well..you know what i mean. Though eclipsegenesis was too harsh about how he criticized the code, I think he may have a point. I think he was just enraged with the incorrect information is being posted right there. First of, dodie posted a warning on the other types of joins, which is really incorrect. He is teaching, the one asking, false information. I mean if he really knows that, he wouldn't have said something unnecessary for the other types of joins.

    Though it's just someone's schoolwork, it would be nice for that someone to know about it from someone who's in the industry, right? They can learn more from us this way. So what if it's not for a real world application? I mean, the earlier they start with the good practices, the better it is, right?

    And yeah..for one thing..the "english" attack was also uncalled for. We're programmers, not english teachers.

    But I agree, it was rather TOO harsh.

    Quote Originally Posted by kamahak View Post
    First of all, this OBVIOUSLY looks like someones schoolwork being asked on an online forum.

    Second, the guy who recommended his query knew that. There is no need to worry about real world applications here. Everyone has to go through the basics. Granted, everyone should start learning good programming practices but that is beside the point.

    The question asked was, "How do you use join in VB?", not "How do you optimize when searching for so and so". In this context, his code was sufficient.

    And lastly, Please, do not attack someone in a language that you are not comfortable with. It makes you look like a tool.

    This is a forum where everyone should be respecting each other and your post felt like it merited a proper reply. I felt that the attack was uncalled for. After all, are we not all Bisaya? Are we not all Bisaya programmers? We should be pulling each other up, not pushing down.

    Instead of barging in here and bitching about his code, why didn't you just put in some constructive criticism? Did you feel that you one upped him after that little speech you made? Did you get your ego boost? Why don't you do us all a favor and crawl back into the hole that you came from?

    tl;dr- This is someone's homework, there was no real world application here. You're an idiot for thinking otherwise. Your English is horrible. Do not attack someone because you think you're better than him. You, obviously, are not.

    So, calm, the f*ck, down. Hilas2x ka lng buanga ka.

  10. #20

    Default Re: How to use select join

    Quote Originally Posted by maiyan View Post
    I think he was just enraged with the incorrect information is being posted right there.
    This is exactly what ticked me off. Why get enraged over such a trivial thing? Why lash out on someone you think doesn't know what he's doing? Does a teacher bitch at the kid who she thinks is too dumb to be in her class?

    No, you teach the kid how to better himself. Kahibaw ba mo mao ni ang problema sa ato society karon? daghan ra kaayo ug mga feeling maayo nya kusug kaayo mamira ug lain taw. Hai nko, mahimo mn ta aning tiguwang dautan diri oi. Haha.

    Mao ra toh. Bow.

  11.    Advertisement

Page 2 of 2 FirstFirst 12

Similar Threads

 
  1. how to use a vonage broadband phone with globe dsl?
    By king_coy in forum Networking & Internet
    Replies: 6
    Last Post: 05-22-2006, 09:09 PM
  2. VIVO (video in, video out) HOW TO USE?
    By weedmeister in forum Computer Hardware
    Replies: 6
    Last Post: 05-08-2006, 08:56 AM
  3. how to use ADODC in Visual Basic
    By arbie_mon in forum Software & Games (Old)
    Replies: 0
    Last Post: 05-05-2006, 02:59 PM
  4. how to use RAID function
    By jamamp;jem in forum Computer Hardware
    Replies: 18
    Last Post: 01-05-2006, 03:52 PM
  5. i dont know how to use my video card
    By doki in forum Computer Hardware
    Replies: 3
    Last Post: 12-21-2005, 10:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top