Archive for April, 2007

27
Apr
07

Community Server 2007 – Ready for PrimeTime?

A little history lesson on Community Server, courtesy of Wikipedia:

“Community Server was created in 2004 from the merger of three widely-used open source ASP.NET projects: the .Text blog engine, the nGallery photo gallery, and the ASP.NET Forums. The developers behind those projects (Scott Watermasysk, Jason Alexander, and Rob Howard) joined together as Telligent Systems and along with several other developers created Community Server.”

Version 2007, released in mid-April this year, comes with a more robust and complete feature list, with all the markings of a quality out-of-box solution to launch a blog, forum, social networking site and much more.

On the community server side, CS 2007 comes with public/private communities, Intranet/Extranet scenarios, Email distribution lists and news server integration. Some of the built-in community applications are blogs, forums and a highly manageable and robust photo and file gallery system.

To support the system, CS 2007 comes with a content management interface, ad management, site statistics, content filters, invitations, badges and much more. It’s security capabilities extend to permissions, memberships, moderation, file system control, auditing and event logging.

Search features are extensive, combined with RSS feeds, weighting algorithms and keyword highlighting. You can even customize the theme and style sheets almost instantly.

As an out-of-box solution, you can deploy CS 2007 on clustered environments. The system is architected in ASP.NET, and full source code is available to licensed users to further customize, scale and extend the solution.

For more information on the product and licensing, visit CommunityServer.org. For the hosted solution, visit CommunityServer.com

22
Apr
07

AspDotNetStorefront vs Commerce Server 2007

Below is a table illustrating feature comparisons between AspDotNetStorefront and Commerce Server 2007.

FEATURE/VERSION MATRIX STANDARD PRO ML CS 2007 Standard
General
Features
Pricing Model, Reseller discounts available Per
Site
Per
Site
Per
Site
Per CPU
Store management done by admin control panel on web site Yes Yes Yes Windows
MMCs
Products Allowed Unlimited Unlimited Yes
Designed for Stores up to 100,000 Products
5
Million SKUs per catalog
Source code included (C# or VB.NET)   Yes Yes C Sharp
Starter Site and Windows-based MMCs for Admin. Site can be developed using
any .NET language.
Product Categorization Features
Unlimited Number Categories & Departments Yes Yes Yes Yes
Categories and Departments can also be fully nested to
any level desired (e.g. sub-categories, sub-departments)
  Yes Yes Yes
Supports cross-matrix of products by category and
department. E.g. a product can be mapped to the shoe category, in the women’s
department
  Yes Yes Yes
Disable buy buttons for specific products   Yes Yes Customizable
Set Site to Wholesale Only (Prices not shown to general
site customers)
    Yes Customizable
Shipping
Features
Custom/Configurable Shipping No Zip
Code customization
Yes Yes Yes
Use Real Time Shippinh Rates   Yes Yes Included
as part of SDKs from carriers
Admin defined shipping methods (e.g. Ground, Next Day,
2nd Day, Priority, etc)
Yes Yes Yes Yes
Real Time Shipping carriers can vary based on Domestic
or International shipping address
    Yes Yes
Filter Real Time Rates You Want To Allow For Users To
Select
  Yes Yes Customizable
Add Shipping & Handling Extra Fee To Orders   Yes Yes Customizable
Shipping Tracking #’s e-mailed to Customers   Yes Yes Customizable
Support for Download Products   Yes Yes Customizable
Batch Shipping Order Printing/Tracking Integration with
UPS WorldShip, Endicia for USPS, and FedEx Shipping Mgr.
    Yes Integration
Support
Multiple ship-to addresses per order (a customer on one
order can ship some items to address A, and other items to address B)
    Yes Yes
Mark Customer Levels as free shipping (or tax exempt)     Yes Customizable
Bulk Product
Import Features
From Xml File   Yes Yes Yes
From Excel File     Yes Customizable
Gift
Registry Features
Gift Registry Supported     Yes Multiple
baskets per user and named baskets to support gift registry scenarios
Wish
List Features
Customer Add To Wish List Supported (Persists over
Customer Visits also)
  Yes Yes Multiple
baskets per user and named baskets to support wish list scenarios
MaxMind
Integration
Integration of invaluable industry leading MaxMind fraud
prevention/scoring technologies. Requires separate service agreement with
MaxMind.com also. It prevents about 10 fraud orders per week (!) on our own
production site, so we are very very pleased with this service, and the price
is very reasonable.
    Yes Customizable
using Web Services provided by MaxMind
Multi-Lingual
Features
Multi-Lingual Support     Yes Multi-Lingual
catalogs, ads, discounts, direct mail
Multi-Currency Support     Yes Yes
Search
Engine Features
EVERY product, category, and department page can have
their own custom search engine meta tags (title, keywords, description, no
script blocks, etc)…
  Yes Yes Customizable
Static Product & Category Pages: Designed to allow
search engines to fully crawl and index EVERY product & category page
in  your store. This can have a dramatic increase in site traffic from
search engines.
  Yes Yes Customizable
Google Xml Site Maps Supported: a direct Google search
engine submission method sanctioned by Google
  Yes Yes Customizable
Yahoo! Xml Site Maps Supported: a direct Yahoo! search
engine submission method sanctioned by Yahoo!
  Yes Yes Customizable
Product
Capabilities & Features
Support for 3 images sizes: icon, medium, large Yes Yes Yes Yes
Supports multiple images per product (icon, medium, and
large)
  Yes Yes Yes
Support for swatch color image changing   Yes Yes Customizable
Automatic image watermarking for protection     Yes Customizable
Image Galleries Supported   Yes Yes Customizable
Restrict product quantities to preset values (e.g. 5,
10, 15, 20, 25, …)
  Yes Yes Customizable
w/ Pipelines
Enforce product minimum order quantities (i.e. must
order at least 10, etc).
  Yes Yes Customizable
w/ Pipelines
Recurring products can have varying intervals (days,
weeks, months, years)
  Yes Yes Customizable
Downloadable products supported, with automatic e-mail
to customer with download instructions
  Yes Yes Customizable
Text options on products (e.g. require initials for
monogrammed products, require text name for product customization, etc)
  Yes Yes Customizable
Sort products in any order desired (you can force
popular products to the top of the pages)
  Yes Yes Yes
Fully dynamic site map (optimized for search engines)   Yes Yes Customizable
Unlimited number of variants per each product Yes Yes Yes Yes
Each variant can have a different price Yes Yes Yes Yes
Each variant can have different attributes (e.g. size, color,
etc)
Yes Yes Yes Yes
Each variant can require a text option input (e.g. monogram)   Yes Yes Yes
Each variant can have a separate SKU modifier, and
price, description, etc
Yes Yes Yes Yes
Tell store to use Image Filename Override for pictures
(medium pics)
    Yes Customizable
Support for sale prices Yes Yes Yes Yes
Vary product prices for each customer level (e.g.
wholesale/retail)
Yes Yes Yes Yes
Phone Order Entry Module   Yes Yes Customizable
Product Descriptions can include HTML formatting Yes Yes Yes Yes
Support for Kits (build to order products).   Yes Yes Yes
Support for Packs.   Yes Yes Customizable
Password Protected Products   Yes Yes Customizable
Disable buy buttons by product   Yes Yes Customizable
 Set Site to Wholesale Only
(Prices not shown to general site customers)
    Yes Customizable
Inventory
Features
Inventory Tracking   Yes Yes Yes
Limit orders to quantity on hand inventory, or allow
customers to place orders for items out of stock (admin configurable)
  Yes Yes Yes
Manage Inventory by variant or attribute (e.g. size,
color, etc)
Yes Yes Yes Yes
Show inventory on hand status on product page to
customer (optional)
  Yes Yes Customizable
Coupon
Features
Order Based Coupons (apply to entire order) Yes Yes Yes Yes
Product Specific Coupons (apply to only specified
product)
    Yes Yes
Coupon discounts by amount or percent Yes Yes Yes Yes
Coupons can offer free shipping Yes Yes Yes Yes
Coupons can offer tax exception Yes Yes Yes Yes
Coupons have start date   Yes
(pending)
Yes
(pending)
Yes
Coupons have expiration date Yes Yes Yes Yes
Coupons can be marked as use once per customer, use once
by only one customer, use N times, etc.
  Yes Yes Yes
Skinning
& Page Layout Customization
Completely customize the layout & appearance of any
category, section, manufacturer, or product page using XmlPackages (XML/XSL
rendering engine)
  Yes Yes Customizable
User defined skin replacement tokens, topic tokens,
AppConfig tokens, etc. (e.g. skin Regular Expression token parser)
  Yes Yes Customizable
Design skins in Dreamweaver or FrontPage Yes Yes Yes N/A
Web form controls can be used within skin template user
control
    Yes N/A
Integrated support for ComponentArt horizontal menu,
vertical menu, site map, and tree view navigational controls
  Yes Yes N/A
Skin Based UI Customization: Store site styles and web
design can be completely customized by external HTML skin template and style
sheets.
Yes Yes Yes N/A
Change skins in real-time. You can conceivably have 100+
skins for a single store if you need to.
Yes Yes Yes N/A
You can link to the cart "pages" from your
existing site pages, or use the storefront to run your entire site
Yes Yes Yes Customizable
Add page header/footer HTML blocks to cart page, and all
checkout and order confirmation pages, to provide special notes/text specific
to your store or business
  Yes Yes Customizable
Use custom receipt formats & templates   Yes Yes Customizable
Use custom "your order has shipped" e-mail
formats and templates
  Yes Yes Customizable
Automatic e-mail notification to customer with receipt   Yes Yes Yes
Receipt can be fully customized   Yes Yes Yes
Automatic e-mail notification to store admin of new
order received
  Yes Yes Yes
Notification to Cell Phone of new order received   Yes Yes Customizable
Mini-Cart (optional small box on every page showing cart
summary contents and checkout link)
  Yes Yes Customizable
Customer
Accounts
Customer can view Order History   Yes Yes Yes
Customer has address book   Yes Yes Yes
Customer can easily re-order any prior order     Yes Customizable
Integrated .NET Forms Authentication   Yes Yes Yes
Multiple billing/shipping addresses per customer
(similar to Amazon.com style checkout)
  Yes Yes Yes
Recurring orders (e.g. for auto ship products, monthly
subscription fees, monthly service type products, etc)
  Yes Yes Customizable
Skip account creation on checkout     Yes Yes
"One Page" Checkout     Yes
(pending)
Customizable
Payment
Methods Supported (types of payment)
Credit Cards (Accept Credit Cards in Real Time: Cards
can be processed & verified in real-time, or you can delay processing
until a later time)
Yes Yes Yes Yes
Check By Mail Yes Yes Yes Customizable
e-Checks (Authorize.net and Itransact gateways) Yes Yes Yes Customizable
C.O.D.   Yes Yes Customizable
Purchase Order   Yes Yes Yes
PayPal Yes Yes Yes Can be
integrated using SDK
PayPal Express Checkout   Yes Yes Can be
integrated using SDK
Request For Quote   Yes Yes Customizable
MicroPay   Yes Yes Customizable
 Gift Cards     Yes Yes
Support for Verified By Visa/MasterCard Secure
initiatives.
  Yes Yes Can be
integrated using SDK
Payment
Gateways Supported
MANUAL Gateway (just collects order & payment
information for offline processing)
Yes Yes Yes Yes
Authorize.net Gateway Yes Yes Yes Support
for most payment gateways through pipeline components and/or .NET SDKs
Transaction
Features
Integrates with your own merchant account Yes Yes Yes Yes
Store can be set to authorize only, or auth-capture
credit card mode. You can then capture payment at shipment if desired
  Yes Yes Customizable
Void & Refund supported   Yes Yes Customizable
Partial Refund and Add-Hoc Charges Supported     Yes Customizable
Mark Transactions As Fraud     Yes Customizable
Ban Fraud Users from Site     Yes Customizable
Support for CVV2 (credit card security code) entry and
checking (fraud prevention)
  Yes Yes Customizable
Address Verification codes reported to administrator
with order
  Yes Yes Customizable
Credit card numbers never displayed on site, but
remembered for user in an encrypted state (shown as ****1111 on site)
  Yes Yes Yes
Disable storing of credit cards if desired (recommended)   Yes Yes Customizable
Force billing address to be the same as shipping address   Yes Yes Customizable
Set a minimum order total threshold for proceed to
checkout
  Yes Yes Customizable
Misc
Features
Customer Subscriptions for protected content   Yes Yes Customizable
Password Protected HTML Pages   Yes Yes Customizable
General Site Disclaimer Message (Agree Before Entering)
supported
    Yes Customizable
Can set a minimum order total threshold for proceed to
checkout
  Yes Yes Customizable
Can set minimum order product quantities before allowing
checkout
  Yes Yes Customizable
Order options supported (e.g. gift wrapping, ship in
unmarked box, etc). Additionally, each order option can have a price
associated with it. User can optionally select order options during checkout.
  Yes Yes Customizable
Order Export to Xml   Yes Yes Customizable
Customer Record Export to Xml   Yes Yes Customizable
Customer e-mail lists to XML (i.e. produce list of all
registered customer e-mails for your mailing manager)
  Yes Yes Customizable
Product & Site Photo Galleries: Create  photo
galleries of products, activities or other important corporate or store fun
events. Showing prospective customers more than just a "store
facade" is VITAL in creating brand loyalty
  Yes Yes Customizable
Recent Products Page   Yes Yes Customizable
Best-Seller Products Page   Yes Yes Customizable
Shopping cart can persist over visits Yes Yes Yes Yes
Shopping cart can be told to age in N days   Yes Yes Yes
Built in support for the most common display formats:
grid, table expanded, table condensed, simple form, right variant bars, and
you can completely customize the product pages by altering the output code
HTML
Yes Yes Yes Yes
Store News Items Supported (editable via Admin Site):
Add real-time news announcements, and items to the site. Inform customers
about important new items, or promotions
Yes Yes Yes Customizable
Order notes can be entered by customer with special
instructions
  Yes Yes Yes
Each cart item can also have notes entered by the
customer
    Yes Customizable
Can require customer to agree to Terms and Conditions
block (user defined) before proceeding with payment
  Yes Yes Customizable
Support for subscription products. Each product can add
N months to a customer subscription. Administration control panel allows
override of subscription expiration date
  Yes Yes Customizable
External Product HTML description files supported (e.g.
product descriptions can be stored in external HTML files)
Yes Yes Yes  
Hide products, categories or departments (publish or
un-publish capability)
Yes Yes Yes Customizable
Integrated Product Search Yes Yes Yes Customizable
Advanced Product Search Page (by category, section,
manufacturer, price range, SKU, etc)
  Yes Yes Customizable
Full Export to QuickBooks   Yes Yes Customizable
Quantity discounts on products   Yes Yes Customizable
E-Mail Product To A Friend: Product pages can be
e-mailed to friends by site visitors
  Yes Yes Customizable
Tax
Features
Apply Tax by State Yes Yes Yes Yes
Apply Tax by ZipCode   Yes Yes Yes
 Apply Tax by Country     Yes Yes
Tax can be applied to shipping costs   Yes Yes Customizable
Individual Products can be marked Taxable or tax-exempt Yes Yes Yes Customizable
Customer Levels can be tax-exempt   Yes Yes Customizable
Pricing
Feed Support Features
Froogle Feed (now called GoogleBase) Supported -w-
automatic generation and FTP upload to your Froogle account
  Yes Yes Customizable
Add other product feeds (e.g. ShopZilla, shopper.com,
etc)
  Yes Yes Customizable
Upsell
Product Features
Related Products   Yes Yes Yes
Show Upsell Products Directly On Cart Page     Yes Customizable
Product prices can be set to "Call for Price’   Yes Yes Yes
Product prices can be hidden until product added to cart   Yes Yes Customizable
Products can require that other products are added to
the cart (e.g. Product X requires Product Y)
  Yes Yes Yes
Affiliate
Tracking Features
Affiliate sign-up/account pages provided in store and
admin site
  Yes Yes Customizable
Customers can be tracked to affiliates   Yes Yes Customizable
Orders can be tracked to affiliates   Yes Yes Customizable
Products visible on the site can be filtered by
affiliate source id
  Yes Yes Customizable
Real-Time skin changing based on
URL/invocation/affiliate id
  Yes Yes Customizable
Customer
Level Features
Unlimited number of customer levels (e.g. wholesale,
retail, or gold, silver, platinum, etc..)
  Yes Yes Yes
Customers can be tracked to customer levels   Yes Yes Yes
Customer levels can have special product pricing, can
offer percent discounts, free shipping, tax exception, etc.
  Yes Yes Yes
Products visible on the site can be filtered by customer
level
  Yes Yes Yes
Operational
Features
Manage your store via easy to use Administration control
panel web site
Yes Yes Yes Windows-based
management consoles
Customer Service Web Administration: Comprehensive
administrative reports, including revenue trends & graphs, visitor trends
& graphs, customer order percentages, affiliate revenue reports, tax
reports, etc. You can also search for order by almost any customer record
criteria to assist with customer support calls
Yes Yes Yes SQL
Server Analytics and Reporting (built-in standard reports)
Built In Customer Mailing Manager: Send e-mails or HTML
newsletters to registered customers. Design your newsletter in FrontPage or
DreamWeaver and send to registered customers, or send to only customer with
orders
Yes Yes Yes Yes
Administrators can edit customer profiles, delete
customers, update their address books, billing information, etc.
Yes Yes Yes Yes
Administrator can edit/enter service notes visible by
customer regarding order status, special notes, etc
  Yes Yes Customizable
Product
Ratings & Reviews
Customers can review & rate products (if enabled)   Yes Yes Customizable
User Polls (find out what your customers are thinking!)   Yes Yes Customizable
Administrator can moderate comments   Yes Yes Customizable
Profanity checking provided on comment entry   Yes Yes Customizable
Security
Features
PABP VISA/MasterCard Final Certification Approval In
Progress for v7.0.
Yes Yes Yes N/A
PABP release fully tested in PCI compliant environment
for VISA/MasterCard Certification
Yes Yes Yes N/A
Supports SSL Encryption for secure ordering. Cart
automatically switches into secure mode appropriately. Supports any brand SSL
certificate.
Yes Yes Yes Yes
IP Address Tracking: For safety and auditing, IP
addresses are logged (PABP)
Yes Yes Yes Yes
AVS (Address Verification) reporting from gateways in
all orders
Yes Yes Yes Yes
Integrated MaxMind Geolocation Fraud Detection Metrics   Yes Yes Customizable
Require periodic password changes (PABP) Yes Yes Yes Customizable
Password Salting + Hashing (PABP) Yes Yes Yes Customizable
Store Admin can lock out any customer account for
security/fraud reasons (PABP)
Yes Yes Yes Yes
Any order can be marked as fraud for later forensics
(PABP)
Yes Yes Yes Customizable
CAPTCHA Image login protection (protects against
automated BOT login attacks (PABP)
Yes Yes Yes Customizable
Comprehensive 1 Year Aged Read Only Security Log built
into admin site. Viewable only by admin Super User. (PABP)
Yes Yes Yes Customizable
Give individual admin operations permissions to view
full credit cards or not (PABP)
Yes Yes Yes Customizable
Allow Customers to individually select if they want
their credit card information stored (overrides by store admin possible)
(PABP)
Yes Yes Yes Yes
All Password Change Operations Logged (PABP) Yes Yes Yes Customizable
RegEx AppConfig control over strength of passwords
required for store logins and admin logins (PABP)
Yes Yes Yes Customizable
Support for dynamic encryption key changes via admin
site (PABP)
Yes Yes Yes Customizable
Store Admin specified encryption salting so every order
record contains a separate encryption key (PABP)
Yes Yes Yes Customizable
Encrypted database connection strings in web.config
files (PABP)
Yes Yes Yes Customizable
Secured password protected Store Administrator Control
Panel
Yes
(Web)
Yes
(Web)
Yes
(Web)
Yes
Integrated .net security roles and support   Yes Yes Yes
15
Apr
07

ColdFusion Coding Guideline and Best Practices

Last year I put together this coding guideline document for ColdFusion developers. It covers the following topics:

  • Style: Naming, Comments & Layout
  • Structure: Application, Component, Tag etc
  • Good Practice
  • Globalization

CLICK HERE to download the guideline in PDF format.

15
Apr
07

ColdFusion Interview Questions – Part II

1. Which path is used in the template attribute in the tag?

A. physical path
B. calling template relative path
C. web document root relative path
D. any directory under Cfusion\CustomTags

The correct answer is B.

2. Which of the following would be the last one to capture an exception?

A. <CFCATCH>
B. <CFERROR TYPE=”Request”>
C. <CFERROR TYPE=”Exception”>
D. site-wide error handler specified in the ColdFusion Administrator

The correct answer is D.

3. Of these tags with errors, which could NOT be caught with a block?

A. <CFSET X = 5 / 0>
B. <CFEST X = 5 / 0>
C. <CFSET X = “Y” + 1>
D. <CFINCLUDE TEMPLATE=”file.cfm”> where file.cfm is NOT found

The correct answer is B.

4. If you have the following variable definition in the Application.cfm file, what is the scope of the variable after it is created?

<CFSET x = “foo”>

A. Variables (local)
B. Application
C. Session
D. Request

The correct answer is A.

5. What is the purpose of the GetAuthUser() function?

A. To log in a specified user
B. To return the name of a logged in user who is requesting the page on which the function is used
C. To retrieve user details from a specified data source
D. To assign roles to the user who is requesting the page on which the function is used

The correct answer is B.

6. Which of the following variable types requires the use of the scope when referencing the variable? (Choose two)

A. request
B. form
C. local
D. application
E. URL

The correct answer is A and D.

7. Which function is necessary when using CACHEDWITHIN attribute with the <CFQUERY> tag?

A. CreateDateTime()
B. ParseDateTime()
C. CreateTimeSpan()

The correct answer is C.

8. What is missing from the following <CFQUERY> tag’s SELECT statement if you want to return the count?

<CFQUERY NAME=”test” DATASOURCE=”test”>
SELECT Count(*)
FROM TestTable
</CFQUERY>

A. SELECT Count(CountVar)
B. SELECT Count(*) AS CountVar
C. SELECT Count(*) INTO CountVar
D. SELECT Count(*) <CFQUERYPARAM NAME=”CountVar”>

The correct answer is B.

9. Which of the following ANSI standard WHERE clauses will return all rows where City begins with the letter ‘S’?

A. WHERE City LIKE “S”
B. WHERE City = ‘S*’
C. WHERE City LIKE ‘S_’
D. WHERE City LIKE ‘S%’

The correct answer is D.

10. Which one of the following tags is used for server-side validation? (Choose one.)

A. input type =”text”
B. input type=”hidden”
C. input value=”hidden”
D. input value=”text”

The correct answer is B.

11. When will the cookie created by the following tag expire?

<CFCOOKIE name=”bgcolor” value= “bgcolor”>

A. never
B. after one day
C. when the last browser window is closed
D. after the timeout period for session variables has elapsed

The correct answer is C.

15
Apr
07

ColdFusion Interview Questions – Part I

How would you loop through a SQL result set stored in the CF variable named my “results” and output the result set columns named “cola” and “colb” in an html table?

<table>
<cfoutput query=”results”>
<tr>
<td>#cola#</td>
<td>#colb#</td>
</tr>
</cfoutput>
</table>

Given the url http://localhost/test.cfm?printmesg=yes How would you write an if statement which would echo the message “hello world!” if the url parameter printmesg equals “yes”.

<cfif isDefined(“url.printmesg”) and url.printmesg IS “yes”>
hellol world!
</cfif>

When is it appropriate to use <cfparam> versus <cfset>?

<cfparam> allows you to set a default parameter if that variable does not have a value bound to it.
<cfset> merely sets the value of a given variable.

Given the datasource named “mydb” and a SQL stored procedure named “mystoredproc” which takes the following two parameters one VARCHAR param and one INTEGER parameter respectively, how would you declare this using the cold fusion tags <cfstoredproc>, <cfprocparam>, and <cfprocresult>?

<cfset param1 = “this is my test string”>
<cfset param2 = 1>

<cfstoredproc datasource=”mydb” procedure=”mystoredproc”>
<cfprocparam type=”IN” cfsqltype=”CF_SQL_VARCHAR” dbvarname=”@parama”
value=”#param1#”>
<cfprocparam type=”IN” cfsqltype=”CF_SQL_INTEGER” dbvarname=”@paramb”
value=”#param1#”>
<cfprocresult name=”myprocresult”>
</cfstoredproc>

How do you call a module named “testmod.cfm” with the parameters param1=”yes” and param2=5?

<cfmodule template=”testmod.cfm”
param1=”yes”
param2=5>

When is it appropriate to use <cfinclude> versus <cfmodule>?

Given two tables:

movie
——————
| id |
|—————-|
| title |
| rating |
| length |
| country |
——————

actor
——————
| id |
|—————-|
| movie_id |
| name |
——————

How would you write a SQL statement to find the names of all the actors associated with a movie titled “fight club”?

SELECT actor.name
FROM movie INNER JOIN actor ON movie.id = actor.movie_id
WHERE movie.title = ‘Fight Club’

movie
——————
| id |
|—————-|
| title |
| rating |
| length |
| country |
——————

director
——————
| id |
|—————-|
| movie_id |
| name |
——————

How would you write a LEFT JOIN statement to return a result set of movie.title’s and director.name’s?

SELECT
movie.title,
director.name
FROM movie LEFT JOIN director ON movie.id = director.movie_id

If there are no indices defined on any of the columns in the above two tables, which columns would you index to speed up the LEFT JOIN query?

movie_id

How would you write a simple stored procedure in TSQL which takes a movie_id and returns all the directors associated with it?

SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO

CREATE procedure [dbo].getDirector (
@movie_id INT
)

SELECT name FROM directors WHERE movie_id = @movie_id

SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO

What are the advantages and disadvantages of using stored procedures versus calling SQL inline in Cold Fusion?

Stored procedures abstract database logic from server side code. They also offer performance benefits in pushing application logic to the database side.

The disadvantage is that if they are poorly written then they can hinder database performance and make development a little more obfuscated.

How would you format some text using css to be verdana and bold?

.myfontclass {
font-family: Verdana;
font-weight: bold;
}

What is the difference between absolute and relative div positioning?

Absolute is from the absolute 0,0 position in the top left corner of the browser window. Relative is relative from the positioning of where the div is declared within the html body.

How would you declare an inline css to format the table with a background color of “yellow” and give the table cell a right margin of 10 pixels?

<style>
table {
background-color: yellow;
}
td {
margin: 0 10px 0 0;
}
</style>

<table>
<tr>
<td>Hello world</td>
</tr>
</table>




Share This


Bookmark and Share

About Me

Technical architect and project manager, with more than 10 years of progressive experience in ERP, e-Commerce, Internet/Web platforms and solution/enterprise architecture. Trained in SAP and Microsoft platforms, with formal educational background in Computer Science, Software Architecture/Engineering and Relational Databases. Association for Computing Machinery (ACM) Chapter Chair/Member, and Institute of Electrical and Electronics Engineers (IEEE) Member. Hands-on experience with SAP Financials/Operations, SAP Netweaver, SAP EAF, Legacy and External Interfaces, Microsoft Commerce Server, Microsoft SQL Server, XML, .NET, Web Services and SOA.

View Patrick Rayes's profile on LinkedIn

Blog Stats

  • 18,315 hits

del.icio.us

Flickr Photos

car from scraps

pacman door buzzer

crack for cats

More Photos

Twitter