If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Which indexing scheme to choose from ??

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-13-11, 09:31
learnerkid learnerkid is offline
Registered User
 
Join Date: Apr 2011
Posts: 17
Exclamation Which indexing scheme to choose from ??



Hi ,

I have got following scenario

Customer ( with acctno,branchno,etc 10 subfields)
Branch ( branchname,town ,etc 8 subfields)
Employee ( empname,empaddr, 6 subfields)
Customer (Custname,custaddr,6 subfields )

So can any one suggest exactly which type of indexing scheme I should choose for above scenario and why it would be usefull , I am confused after seeing all indexing schemes which one to choose ??
Reply With Quote
  #2 (permalink)  
Old 04-13-11, 09:37
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,525
Quote:
Originally Posted by learnerkid View Post
eek eek mad mad
i echo that sentiment

first of all, indexes are absolutely useless (in fact, worse) for storing data

indexes are only useful for optimizing retrieval queries, and you haven't shown us any retrieval queries

secondly, you have only one (apparent) foreign key in your four tables -- several don't seem to be related at all!!

also, you have two tables with the same name, a definite no-no in database design


helps?

__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 04-13-11, 10:06
learnerkid learnerkid is offline
Registered User
 
Join Date: Apr 2011
Posts: 17
Hi ,

I have got following scenario ( corrected one )

Account ( with acctno,acctype,etc 10 subfields)
Branch ( branchname,town ,etc 8 subfields)
Employee ( empname,empaddr, 6 subfields)
Customer (Custname,custaddr,6 subfields )

So can any one suggest exactly which type of indexing scheme I should choose for above scenario and why it would be usefull , I am confused after seeing all indexing schemes which one to choose ??

Note:: I have corrected the requirement but I have to implement a indexing schema pls suggest ??
Reply With Quote
  #4 (permalink)  
Old 04-13-11, 10:11
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,525
Quote:
Originally Posted by learnerkid View Post
... but I have to implement a indexing schema pls suggest ??
i suggest you read my previous reply, regarding queries

indexing schemes cannot be designed in a vacuum

if your homework assignment did not mention queries, you're taking a very poor course
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #5 (permalink)  
Old 04-13-11, 10:18
learnerkid learnerkid is offline
Registered User
 
Join Date: Apr 2011
Posts: 17
Hi ,

I was trying to learn concepts of Indexing on my own along with how to implement it for certain scenarios one of these was above banking one where i have to suitably choose index schema for bank operating in a single country , which schema to choose was really confusing , I respect your answer for the question !! ,Please Can I whether ask is it impossible to choose indexing schema for above scenario if we keep other factors which are off course better options than indexing apart ?
Reply With Quote
  #6 (permalink)  
Old 04-13-11, 10:22
shammat shammat is offline
Registered User
 
Join Date: Nov 2003
Posts: 2,407
Quote:
Originally Posted by learnerkid View Post
Please Can I whether ask is it impossible to choose indexing schema for above scenario if we keep other factors which are off course better options than indexing apart ?
If you don't have any queries, you don't need indexes.

Indexes are only there to support SELECT, DELETE or UPDATE statements.

If you don't know which statements you are going to execute, you can't say which indexes you need.
Reply With Quote
  #7 (permalink)  
Old 04-13-11, 13:59
learnerkid learnerkid is offline
Registered User
 
Join Date: Apr 2011
Posts: 17
I want to just decribe how particular Index schema suits the banking scenario described above it just clarifies your index understanding but I am confused which of them is quite suitable for it regarding perfomance wise , time wise etc !!
Reply With Quote
  #8 (permalink)  
Old 04-13-11, 14:07
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,525
i'm not sure if you're listening, because we've told you several times

an indexing scheme without reference to the queries that it has to support is useless

if you don't post the queries, we don't tell you the indexing scheme

got it now?
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On