<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1019134" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1019134</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/searching-using-php#comment-1114653</link>
    <description> &lt;p&gt;thanks - I&#039;ll check it out.&lt;/p&gt;
 </description>
     <pubDate>Tue, 24 Sep 2002 05:44:48 +0000</pubDate>
 <dc:creator>Kristen</dc:creator>
 <guid isPermaLink="false">comment 1114653 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/searching-using-php#comment-1114652</link>
    <description> &lt;p&gt;you can actually download search scripts (free) from hotscripts.com I got some the other day but havent had time to try them yet. Some search flat files, some databases, some index, some dont ...&lt;/p&gt;
&lt;p&gt;sorry can&#039;t be more help&lt;/p&gt;
 </description>
     <pubDate>Tue, 24 Sep 2002 05:40:52 +0000</pubDate>
 <dc:creator>Busy</dc:creator>
 <guid isPermaLink="false">comment 1114652 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/searching-using-php#comment-1114650</link>
    <description> &lt;p&gt;forgot to mention - the database has been changed since the original specifications and now most of the important search fields are within the same table.  Might make things easier.&lt;/p&gt;
 </description>
     <pubDate>Tue, 24 Sep 2002 05:31:15 +0000</pubDate>
 <dc:creator>Kristen</dc:creator>
 <guid isPermaLink="false">comment 1114650 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/searching-using-php#comment-1114608</link>
    <description> &lt;p&gt;Me again.&lt;/p&gt;
&lt;p&gt;It&#039;s coming down to the crunch for this assignment and I&#039;m willing to pay one of you guys for some serious help.  I&#039;ve had a death in the family and am just not up to figuring it all out and at this stage study is taking a backseat.&lt;/p&gt;
&lt;p&gt;Basically, I need the database created.  I have the exact specifications for it, as we have it running in oracle as well and will just be putting that same db into mySQL.  So all that needs to be done there is take the tables.sql and create them in mySQL.  Then there is the search feature.  Basically I&#039;d like just a simple form where the user can input their search object (e.g. John) and then choose from a drop-down menu the field to search (e.g. sender).  Then the result will display all emails with John in the sender field within the db.  If possible!&lt;/p&gt;
&lt;p&gt;please email if you can help.&lt;/p&gt;
 </description>
     <pubDate>Mon, 23 Sep 2002 04:23:21 +0000</pubDate>
 <dc:creator>Kristen</dc:creator>
 <guid isPermaLink="false">comment 1114608 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/searching-using-php#comment-1113775</link>
    <description> &lt;p&gt;You can try some of the examples in this thread.  I have no idea how your DB looks, so I can&#039;t say exactly what you need.&lt;/p&gt;
 </description>
     <pubDate>Mon, 09 Sep 2002 04:28:00 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1113775 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/searching-using-php#comment-1113772</link>
    <description> &lt;p&gt;Heh, it&#039;s actually a student Oracle account at my university - so we didn&#039;t buy it!&lt;/p&gt;
&lt;p&gt;Okay so I need to just specify the fields in the search itself?&lt;/p&gt;
 </description>
     <pubDate>Mon, 09 Sep 2002 04:20:43 +0000</pubDate>
 <dc:creator>Kristen</dc:creator>
 <guid isPermaLink="false">comment 1113772 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/searching-using-php#comment-1113771</link>
    <description> &lt;p&gt;Oracle?  Wow.  Would love to get me a copy of that... just a tad bit too expensive though. &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/wink.png&quot; title=&quot;Wink&quot; alt=&quot;Wink&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;mySQL currently doens&#039;t have foreign key support.  All you can do is index them.  You&#039;ll specify which fields to join on in your queries.  I believe that foreign key integrity is on the features list for future versions.&lt;/p&gt;
 </description>
     <pubDate>Mon, 09 Sep 2002 04:18:01 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1113771 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/searching-using-php#comment-1113763</link>
    <description> &lt;p&gt;The database was written for oracle by a someone else, and yes, it is normalized.&lt;/p&gt;
&lt;p&gt;I was given the oracle sql syntax and have to change it to work in mySQL.  I haven&#039;t the first clue how to do this, but I did manage to create the appropriate tables and their rows etc.  I don&#039;t know how to link up the foreign keys etc and can&#039;t work it out from the mysql.com information.  Basically I just have 5 separate tables at this point, so any help in getting them to work together would be greatly appreciated!&lt;/p&gt;
&lt;p&gt;Also, I&#039;m not sure how to get the dropdown working to submit a request.&lt;/p&gt;
&lt;p&gt;I hate asking for so much help but I&#039;m really in a jam with this - I need to have it done by next week and have a lot of other things going on right now as well (my cat is very sick) and am just having trouble working it out on my own.&lt;/p&gt;
&lt;p&gt;any help would be greatly appreciated!&lt;br /&gt;
-Kristen.&lt;/p&gt;
 </description>
     <pubDate>Mon, 09 Sep 2002 01:19:39 +0000</pubDate>
 <dc:creator>Kristen</dc:creator>
 <guid isPermaLink="false">comment 1113763 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/searching-using-php#comment-1113605</link>
    <description> &lt;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;p&gt;Quote: &lt;em&gt;Originally posted by zollet &lt;/em&gt;&lt;br /&gt;
&lt;strong&gt;Correct me if I&#039;m wrong here, but what I don&#039;t like about a normalized database is the fact that... Well, let’s say you have 100 artists and 1000 songs. If you do a query, it will compare the 100 artists to the 1000 songs which is about 100,000 comparisons where a non-normalized database would have given you the same result by going through only 1000 rows. &lt;/strong&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;let the software developers worry about optimized implementation, and know they do a damned good job.&lt;/p&gt;
&lt;p&gt;i&#039;m by no means an expert, but what i would imagine happens is something as follows:&lt;br /&gt;
- database parses the query and determines you&#039;re joining the tables &#039;artists&#039; and &#039;songs&#039; presumably on &#039;artistid&#039;.&lt;br /&gt;
- artists.artistid is a primary key and songs.artistid is indexed, or at better be otherwise you have some reading to do&lt;br /&gt;
- database iterates through the &#039;artists&#039; table matching any criteria specified in the where clause,  using indexes if possible&lt;br /&gt;
- when a match in the &#039;artists&#039; table is found, the &#039;songs&#039; database is used searched for join criteria, returning valid results and caching non-valid ones in memory&lt;br /&gt;
- since non-valid results are in memory there are no more disk seeks necessary in the &#039;songs&#039; table after the first iteration.&lt;br /&gt;
and, if you properly index your tables the database will know exactly where to seek.&lt;/p&gt;
&lt;p&gt;dont doubt that optimization techniques are far beyond my knowledge or understanding, just know normalization IS good, and expected if youre getting paid to do this.&lt;/p&gt;
&lt;p&gt;There are cases where normalization really is not a good choice.  I&#039;ll use VBulletin for an example, although horribly implemented and completely ineffective they had the right idea.   VB has a user table and a thread table, with primary/foreign keys being user.userid/thread.userid.  user (obviously) has a username field, but, so does thread (or maybe it&#039;s called &#039;author&#039;).  anyways, i presume this was to avoid a join when displaying a list of threads and their authors.  considering threads is probably the most hit table in a vb forum it was a good idea, but they join anyway for other frivilous crap.  anyways, the point is there is an in-between, although there are purists who would argue with me. &lt;/p&gt;
&lt;p&gt;Even though there are exceptions, those are just that, exceptions to the rule.  IF YOU EVER WANT TO MAKE A LIVING DEVELOPING APPLICATIONS LEARN HOW TO, WHY TO, WHEN TO, AND WHAT TO NORMALIZE, AND DO IT!!! My god, i&#039;ve downloaded freeware scripts before that made me want to barf, crap like this (a fictional example):&lt;/p&gt;
&lt;p&gt;TABLE CARS&lt;br /&gt;
name&lt;br /&gt;
password&lt;br /&gt;
email&lt;br /&gt;
make&lt;br /&gt;
model&lt;br /&gt;
year&lt;br /&gt;
color&lt;/p&gt;
&lt;p&gt;TABLE MUSIC&lt;br /&gt;
name&lt;br /&gt;
password&lt;br /&gt;
email&lt;br /&gt;
likesrock&lt;br /&gt;
likescountry&lt;br /&gt;
likesbritneyspears&lt;br /&gt;
likesbluesclues&lt;br /&gt;
likesamericanidol&lt;br /&gt;
bandname1&lt;br /&gt;
bandname2&lt;br /&gt;
bandname3&lt;br /&gt;
singer1&lt;br /&gt;
singer2&lt;br /&gt;
singer3&lt;br /&gt;
favoriteguysinger&lt;br /&gt;
favoritegirlsinger&lt;br /&gt;
favoriteguydrummer&lt;br /&gt;
...&lt;/p&gt;
&lt;p&gt;and to think the same people who wrote databases like this wrote the install scripts that asked for the root password to my database (note: never ever give your root password to mysql (or *nix or ANYTHING for that matter) to any program. it&#039;s not meant for that.)&lt;/p&gt;
&lt;p&gt;anyways, &#039;normalization&#039; isn&#039;t just a fad that&#039;s hip today and gone tomorrow.  people dont do it because it&#039;s fun.  people do it because that&#039;s the right way to do it.  i could try to further explain exactly why that&#039;s the correct way, but i&#039;d only be repeating thousands of documents at your local Google store.&lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;
 </description>
     <pubDate>Thu, 05 Sep 2002 06:59:03 +0000</pubDate>
 <dc:creator>ROB</dc:creator>
 <guid isPermaLink="false">comment 1113605 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/server-side-scripting/searching-using-php#comment-1113604</link>
    <description> &lt;p&gt;Well, ideally you would have a primary key with each table and you would have indexed the foreign keys.  This makes searching much easier.&lt;/p&gt;
&lt;p&gt;I haven&#039;t tested this, but it seems logical that it&#039;s easier to search an indexed numeric (int) field rather than a text (varchar) field (indexed or not).&lt;/p&gt;
&lt;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;p&gt;Quote: &lt;em&gt;Originally posted by zollet &lt;/em&gt;&lt;br /&gt;
&lt;strong&gt;Yeah, but I don&#039;t see how that is harder to update..&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;UPDATE table SET artist_name = &#039;Ozzy&#039; WHERE artist_name LIKE &#039;Black Sabbath&#039;;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Not necessarily easier, but faster.  A normalized DB would only change one record.  A non-normalized DB would change many records.&lt;/p&gt;
 </description>
     <pubDate>Thu, 05 Sep 2002 05:32:54 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1113604 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
