Essentially my job would be to develop web programs utilizing a database as after sales. What I've been doing till now's,
Basded on the advantages of the customer,

  • I draw a fundamental sketch of the items the tables are ,the way they seem like
  • fields in individuals tables plus some one-to-one or many-to-one or many-to-many relations

Although I'm not perfect at this stuff, I attempt to determine the way the relations ought to be from the past projects which i done. But you will find still some doubts relating to this i believe.

When the client asks he wants a specific data, I attempt to attain it through either an immediate SQL query or thought the scritp (generally PHP), should i be not able to determine a question whatsoever for your particular request.

Now, here comes my question.

In line with the associations which i determined while developing tables, what are the restrictions as to the a client can request? What i'm saying to express by this really is, the customer will request he wants list all of the indidual items, their counts, connected category, all of the counts of
category, the items in every category and also the their prices, amount of all of the category prices and also the total prices the like so on.

Case a good example of one request to describe my situation.

Now, if there's any request that may potentially take more time time for that exection, can the developer satisfy this request by wearing down the request? Should i simply tell him why break lower necessary? Let's say he feels that i'm incompetent at doing the work in one shot?

Is every are convinced that he requests have to be in single query? or maybe there is any have to itake the aid of PHP to proces one loop and in line with the values which i get, I put some conditions to use rules the client wants?

What's the better method of doing this type of job?

Any sights?

Thanks.

Generally this will rely on the Database used.

Most queries could be completed in just one choose, but this shoudl never prevent you searching at Sights/Sub Chooses/ Saved Methods.

You need to have the ability to handle much of your queries in this way, and so i would recomend:

Dont allow the output figure out how you design the database, this may lead you lower the incorrect road. You have to saved data within the most stabilized fasion appropriate towards the application.

Plenty of questions!

In line with the associations which i determined while developing tables, what are the restrictions as to the a client can request?

A customer can request for anything really. Clients aren't always rationale. It's a part of your work to assist the customer consider their demands.

What i'm saying to express with this is, the client will request he wants list all the indidual items, their counts, connected category, all of the counts of category, the items in every category and also the their prices, amount of all of the category prices and also the total prices the like so on.

Many of these queries seem possible with SQL. To list out individual items make use of the Choose statement. To obtain a count use COUNT. To obtain connected groups use JOINS. Use SUM to obtain total prices.

Now, if there's any request that may potentially take more time time for that exection, can the developer satisfy this request by wearing down the request? Should i simply tell him exactly why is this break lower necessary?

Yes - wearing down the request might help a customer understand their demands.

Let's say he feels that i'm incompetent at doing it in one shot?

Convince him otherwise. You wouldn't want him thinking you are stupid if you wish to keep his business. :)

Is every are convinced that he requests need to stay in single query? or will there be any have to itake the aid of PHP to proces one loop and in line with the values which i get, I put some conditions to use rules the client wants?

Really is dependent in your level of skill. Knowing SQL good enough you will get much of your data in a single query. Discover nearly as good then you definitely might perform a couple of queries after which loop of these in php. Typically it's faster to get it done all in SQL.

What's the better method of doing this type of job?

Are you currently having your own business? If that's the case, sometimes you just need experience to determine the easiest way. (and posting to stackoverflow :)