Comments on using views...

- Great way to reduce joins in your application sql, as long as you don't
mind repeating data in the result set from one-to-many joins.  (However, the
joins must still be processed each time the view is accessed, so the joins
aren't really eliminated.)
- Great way to access data in other databases without the application having
to make connections to multiple databases
- Watch out for performance - don't know if the database product you are
using lets you put indexes on views.  If not, you may need to put additional
indexes on the tables referenced by the view to optimize performance.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, March 07, 2002 11:30 AM
To: JRun-Talk
Subject: Using Views


First, want to thank you all for telling me about, pooling, jrun tags, using
QueryTable, cashing resultset and application variables.  Oh and avoiding
having
many resultsets.  That last part was more difficult to implement not from
the
SQL part, but in the jsp, to avoid duplicate rows.  I used conditions and
looping but the way the data was presented, did not make it easy.  Oh and
Drew,
great book.  Found it extremely helpful and useful.  I actually refer to it
all
the time.

My assignment was to take an access database that was designed in 1994 and
redesign it in JSP and Jrun.  As you can imagine, I had to go through
thousands
of queries, tables and macros to really identify all the elements being
used.
Worse part, the reports done by the application were all wrong because they
were
pulling data from wrong queries and tables.

The first stage of my redesign, I tried to replicate the design and
functionalities of the existing application in JRUN and MS SQL Server.  (Not
to
mention that's how I learned JSP ;).   Anyway, I was able to do that, and
was
able to produce all the reports correctly, all the functionalities etc.. Now
that I understand all the parts of the application and business side, I'm
remodeling the data, and simplifying the processes and making them more
generic
and reusable modules. .

Sorry for the lengthy background... anyway, my question is the following:

I have normalized the tables, and we ended up needing 1/4 of the fields and
tables originally created.   I was planning on using Views to avoid having
too
many joints in each SQL.  I am also planning to catch the resultsets.

Do any of you know the disadvantages of using views?  I like them because
they
are dynamic so it's better than having to create and drop tables every time
we
need to update the database.

Thanks,

Zeina

______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to