Wednesday, November 7, 2012

ls command howto


Output from ls -la Command

picard@spnode15$ ls -la

total 1600
drwx---s-x  11 picard   STAFF       1536 Jun 26 14:49 .
dr-xr-sr-x1300 bin      bin        20480 Jun 26 12:06 ..
-rw-------   1 picard   STAFF        948 Jun 06 09:46 .addressbook
-rw-------   1 picard   STAFF       3368 Jun 06 09:46 .addressbook.lu
-rw-------   1 picard   STAFF        193 Apr 02 10:06 .article
-rw-------   1 picard   STAFF       1035 May 20 12:30 .bash_history
drwx---S--   2 picard   STAFF        512 Jun 23 13:56 .mailpgp
-rw-------   1 picard   STAFF     128654 Jun 10 19:19 .newsrc
drwx------   4 picard   STAFF        512 May 29 07:01 .pgp
-rw-------   1 picard   STAFF      10196 Jun 26 14:33 .pinerc
-rwxr-xr-x   1 picard   STAFF       1047 May 27 14:15 .plan
-rw-------   1 picard   STAFF         35 Jun 17 09:23 .profile
-rw-------   1 picard   STAFF        371 Sep 08 1995  .signature
-rw-------   1 picard   STAFF      81691 Jun 20 10:34 3dtree.jpg
-rw-------   1 picard   STAFF      31156 Jan 03 10:19 HTMLBgnrGuide.txt
drwx---s-x   2 picard   STAFF        512 Apr 01 13:26 News
-rw-------   1 picard   STAFF      11760 Jul 23 1995  TUTORIAL
-rw-------   1 picard   STAFF        234 Feb 02 08:18 baen.txt
drwx---s-x   2 picard   STAFF        512 Mar 12 06:57 bin
-rw-------   1 picard   STAFF         71 Jul 31 1995  calendar
-rw-------   1 picard   STAFF     338912 May 02 1995  command.memos
-rw-------   1 picard   STAFF        747 Jun 24 13:12 dead.letter
-rw-------   1 picard   STAFF      10506 Jun 01 12:42 info.listserv
-rw-------   1 picard   STAFF     698675 Nov 01 1995  jim.kirk.letters
-rw-------   1 picard   STAFF        122 Jun 24 13:28 junk
drwx------   2 picard   STAFF       1536 Jun 25 12:40 mail
-rw-r-----   1 picard   STAFF       1397 May 28 12:50 mj.ultra
drwx---s-x   2 picard   STAFF        512 May 26 21:09 pine
-rw-------   1 picard   STAFF       1716 Jul 23 1995  print.txt
drwxr-sr-x   6 picard   STAFF       1024 Mar 27 10:54 public_html
drwx---s-x   3 picard   STAFF        512 Mar 31 07:24 rexx
drwx---s-x   2 picard   STAFF        512 Aug 08 1995  temp
-rwx--x--x   1 picard   STAFF        368 May 28 14:10 unpgp

picard@spnode15$

Let's look at this listing, and see what it tells us. At first glance, the left-most column looks like utter nonsense; drwxr--blah-blah-blah. What's going on here?

File Type. The first position/character in this column describes what type of entry each horizontal line represents. The first character will usually be either a - or a d. Symbols in the first (left most) position on the line represent:

-

    = Regular File
d

    = Directory

You can tell, just by looking at the output from ls -l which entries are files and which are directories.

Permissions. The rest of the first column (after the - or d) indicates access permissions which have been set either explicitly, by you, using the chmod command (which we'll look at later) or automatically, by the system, when the file (or directory) was created. We'll discuss this part of the listing in more detail when we get to the chmod command, which deals with setting file access permissions.

Directory Entries (and Hard-Link Count). The next column (immediately to the right of the access permissions) is a number which tells how many directory entries are under that item. For a regular file, this will typically be 1. For a directory, this will always be at least 2. The reason for this is that every directory always contains pointers to both itself, and its parent directory. You can see these two entries as the first two items in our example listing in Figure 12: the entries for . and .. (i.e. one period, and two periods). The single period . ), is the pointer to the current directory--the directory that you are "in" right now. Two periods .. ), point to the parent directory--the directory which contains the current directory. You can use these as convenient nicknames/shortcuts in some commands, when you want to describe a relative pathname.

Owner. The next column to the right displays the userid of the owner of this file or directory. In our listing, most of the files are owned by our hypothetical user, picard. When you create files and directories, you will be their owner, and your userid will show here, in place of picard.

Group. The next column (mostly "STAFF" in our example) shows the name of the user group which is connected with this entry. Each userid is a member of one or more groups, and access permissions may be set which determine what sort of access other members of the same group have to the file or directory named. Again, more on that when we get to the chmod command.

Size. The next column shows the file size in bytes (characters).

Date/Time. The next 3 columns show the date and time the file was last modified.

File Name. Finally, we have the file name. As discussed earlier, UNIX is very accommodating with regard to the length of file names. However there are some qualifications: File names cannot (usually) contain blank spaces, or the characters /, *, or ?. This is because / is used to separate levels of a pathname, * is a "wildcard" character which is expanded by the system to mean "any number of any characters," and ? is a wildcard representing "any single character." MS-DOS users in particular should recognize these "wildcard" characters.


http://docweb.cns.ufl.edu/docs/d0107/ar07s04.html



  • Link counter


Most file systems that support hard links use reference counting. An integer value is stored with each physical data section. This integer represents the total number of links that have been created to point to the data. When a new link is created, this value is increased by one. When a link is removed, the value is decreased by one. If the link count becomes zero, the operating system usually automatically deallocates the data space of the file if no process has the file opened for access. The maintenance of this value assists users in preventing data loss. This is a simple method for the file system to track the use of a given area of storage, as zero values indicate free space and nonzero values indicate used space.

On POSIX-compliant operating systems, such as many Unix-variants, the reference count for a file or directory is returned by the stat() or fstat() system calls in the st_nlink field of struct stat.



  • Link count: File vs Directory 

One of the results of the ls -l command  is the link count.

1. What is the link count of a file?
The link count of a file tells the total number of links a file has.the number of hard-links a file has.
The soft-link is not part of the link count since the soft-link's inode number is different from the original file.

2. How to find the link count of a file or directory?
any new file created will have a link count 1.
By default, a file will have a link count of 1

$ touch  test.c
$ ln test.c test-hardlink.c
ls -lai
total 8
3145743 drwxrwxr-x 2 vagrant vagrant 4096 Mar 31 11:44 .
3145730 drwxr-xr-x 6 vagrant vagrant 4096 Mar 31 11:44 ..
3145744 -rw-rw-r-- 2 vagrant vagrant    0 Mar 31 11:44 test.c
3145744 -rw-rw-r-- 2 vagrant vagrant    0 Mar 31 11:44 test-hardlink.c

$ ln -s test.c test-softlink.c
ls -lai
total 8
3145743 drwxrwxr-x 2 vagrant vagrant 4096 Mar 31 11:45 .
3145730 drwxr-xr-x 6 vagrant vagrant 4096 Mar 31 11:44 ..
3145744 -rw-rw-r-- 2 vagrant vagrant    0 Mar 31 11:44 test.c
3145744 -rw-rw-r-- 2 vagrant vagrant    0 Mar 31 11:44 test-hardlink.c
3145745 lrwxrwxrwx 1 vagrant vagrant    6 Mar 31 11:45 test-softlink.c -> test.c

3. Does the link count decrease whenever the hard-link is deleted?
When the hard link file is moved or deleted, the link count of the original file gets reduced.

rm test-hardlink.c
ls -lai
total 8
3145743 drwxrwxr-x 2 vagrant vagrant 4096 Mar 31 11:47 .
3145730 drwxr-xr-x 6 vagrant vagrant 4096 Mar 31 11:44 ..
3145744 -rw-rw-r-- 1 vagrant vagrant    0 Mar 31 11:44 test.c
3145745 lrwxrwxrwx 1 vagrant vagrant    6 Mar 31 11:45 test-softlink.c -> test.c

4. When does the link count of a directory change?
A directory "xyz" is created and the default link count of any directory is 2. The extra count is because for every directory created, a link gets created in the parent directory to point to this new directory.
link count of a directory minus 2 gives you the total number of sub-directories present in the directory.

mkdir xyz
ls -ld xyz/
drwxrwxr-x 2 vagrant vagrant 4096 Mar 31 11:50 xyz/
mkdir -p xyz/abc
mkdir -p xyz/efg
ls -ldia xyz
3145746 drwxrwxr-x 4 vagrant vagrant 4096 Mar 31 11:51 xyz

http://www.theunixschool.com/2012/10/link-count-file-vs-directory.html

  • Q1: The Unix inode structure contains a reference count. What is the reference count for? Why can't we just remove the inode without checking the reference count when a file is deleted?


    Inodes contain a reference count due to hard links. The reference count is equal to the number of directory entries that reference the inode. For hard-linked files, multiple directory entries reference a single inode. The inode must not be removed until no directory entries are left (ie, the reference count is 0) to ensure that the filesystem remains consistent.


  • On a storage device, a file or directory is contained in a collection of blocks

Information about a file is contained in an inode, which records information such as the owner, when the file was last accessed, how large it is, whether it is a directory or not, and who can read from or write to it. The inode number is also known as the file serial number and is unique within a particular filesystem
https://developer.ibm.com/tutorials/l-lpic1-104-6/

Sunday, November 4, 2012

n-tiered application



  • The J2EE platform is a multi-tiered system

A tier is a logical or functional partitioning of a system

Client tier represents Web browser, a Java or other application, Applet, WAP phone etc. The client tier makes requests to the Web server who will be serving the request by either returning static content if it is present in the Web server or forwards the request to either Servlet or JSP in the application server for either static or dynamic content.

Presentation tier encapsulates the presentation logic required to serve clients. A Servlet or JSP in the presentation tier intercepts client requests, manages logons, sessions, accesses the business services, and finally constructs a response, which gets delivered to client.

Business tier provides the business services. This tier contains the business logic and the business data. All the business logic is centralized into this tier as opposed to 2-tier systems where the business logic is scattered between the front end and the backend. The benefit of having a centralized business tier is that same business logic can support different types of clients like browser, WAP, other stand-alone applications etc.

Integration tier is responsible for communicating with external resources such as databases, legacy systems, ERP systems, messaging systems like MQSeries etc. The components in this tier use JDBC, JMS, J2EE Connector Architecture (JCA) and some proprietary middleware to access the resource tier.

Resource tier is the external resource such as a database, ERP system, Mainframe system etc responsible for storing the data. This tier is also known as Data Tier or EIS (Enterprise Information System) Tier.



The advantages of a 3-tiered or n-tiered application:
3-tier or multi-tier architectures force separation among presentation logic, business logic and database logic

Manageability: Each tier can be monitored, tuned and upgraded independently and different people can have clearly defined responsibilities.

·         Scalability: More hardware can be added and allows clustering (i.e. horizontal scaling).

·         Maintainability: Changes and upgrades can be performed without affecting other components.

·         Availability: Clustering and load balancing can provide availability.

·         Extensibility: Additional features can be easily added.
http://allu.wordpress.com/2007/08/18/j2ee-3-tier-or-n-tier-architecture/



  • In software engineering, multi-tier architecture (often referred to as n-tier architecture) is a client–server architecture in which presentation, application processing, and data management functions are logically separated. For example, an application that uses middleware to service data requests between a user and a database employs multi-tier architecture. The most widespread use of multi-tier architecture is the three-tier architecture.

http://en.wikipedia.org/wiki/Multitier_architecture



  • Using J2EE to develop n-tier applications involves breaking apart the different layers in the two-tier architecture into multiple tiers. An n-tier application could provide separate layers for each of the following services:


    Presentation: In a typical Web application, a browser running on the client machine handles presentation.
    Dynamically generated presentation: Although a browser could handle some dynamically generated presentation, for the widest support of different browsers much of the action should be done on the Web server using JSPs, servlets, or XML (Extensible Markup Language) and XSL (Extensible Stylesheet Language).
    Business logic: Business logic is best implemented in Session EJBs (described later).
    Data access: Data access is best implemented in Entity EJBs (described later) and using JDBC.
    Backend system integration: Integration with backend systems may use a variety of technologies. The best choice will depend upon the exact nature of the backend system.
http://www.javaworld.com/jw-12-2000/jw-1201-weblogic.html

Proxy Pattern



  • The Proxy Pattern

Intent
Provide a surrogate or placeholder for another object to control access to it

A proxy is
› a person authorized to act for another person
› an agent or substitute
› the authority to act for another

There are situations in which a client does not or can not reference an
object directly, but wants to still interact with the object

A proxy object can act as the intermediary between the client and the target
object

http://userpages.umbc.edu/~tarr/dp/lectures/Proxy.pdf



  • Intent

    Provide a surrogate or placeholder for another object to control access to it.
    Use an extra level of indirection to support distributed, controlled, or intelligent access.
    Add a wrapper and delegation to protect the real component from undue complexity.

Problem

You need to support resource-hungry objects, and you do not want to instantiate such objects unless and until they are actually requested by the client.

Example

The Proxy provides a surrogate or place holder to provide access to an object. A check or bank draft is a proxy for funds in an account. A check can be used in place of cash for making purchases and ultimately controls access to cash in the issuer’s account.

Rules of thumb

    Adapter provides a different interface to its subject. Proxy provides the same interface. Decorator provides an enhanced interface.
    Decorator and Proxy have different purposes but similar structures. Both describe how to provide a level of indirection to another object, and the implementations keep a reference to the object to which they forward requests.
 
http://sourcemaking.com/design_patterns/proxy



  • Proxy pattern

A proxy, in its most general form, is a class functioning as an interface to something else. The proxy could interface to anything: a network connection, a large object in memory, a file, or some other resource that is expensive or impossible to duplicate.
http://en.wikipedia.org/wiki/Proxy_pattern

flyweight pattern



Basit nesneler olusturmak istiyorsunuz ve bu nesnelerin bazi
veri degerleri farklidir. Nesnelerdem çok fazla
olusturdugunuzda bellek fazla kullanilacaksa, nesnelerden 1
tane olusturup, farkli verileri bu nesneye metot parametresi
olarak göndermek daha iyi olacaktir.

Bu kullanim flyweight sablonudur.

Örnegin; bir kelime islemci uygulamasindaki her harf için bir
nesne olusturmaktansa harfin bir kopyasi olusturulur ve
kullanilacagi yerlerde bu kopyanin referansi kullanilir.

http://members.comu.edu.tr/msahin/courses/ust_duzey_files/patterns/flyweight.pdf

Abstract Factory pattern


Abstract Factory pattern

Intent

Provide an interface for creating families of related or dependent objects
without specifying their concrete classes.

The Abstract Factory pattern is very similar to the Factory Method pattern.
One difference between the two is that with the Abstract Factory pattern, a
class delegates the responsibility of object instantiation to another object
via composition whereas the Factory Method pattern uses inheritance and
relies on a subclass to handle the desired object instantiation.

Actually, the delegated object frequently uses factory methods to perform
the instantiation


Applicability
Use the Abstract Factory pattern in any of the following situations:

A system should be independent of how its products are created,
composed, and represented
class can't anticipate the class of objects it must create
A system must use just one of a set of families of products
A family of related product objects is designed to be used together, and you
need to enforce this constrain

http://userpages.umbc.edu/~tarr/dp/lectures/Factory.pdf

Saturday, November 3, 2012

bridge pattern



  • bridge pattern

The bridge pattern is a design pattern used in software engineering which is meant to "decouple an abstraction from its implementation so that the two can vary independently
The bridge uses encapsulation, aggregation, and can use inheritance to separate responsibilities into different classes
http://en.wikipedia.org/wiki/Bridge_pattern


  • Usages 


  1. when you want to avoid permanent binding between abstraction and its implementation
  2. when you want to let abstractions and their implementations be extensible by subclassing
  3. changes in the implementation of abstractions should have no impact on clients so that client codes should not be recompiled
  4. mostly used in drivers like database drivers

Factory Pattern


  • Define an interface for creating object.But let subclasses decide which class to instantiate




  • Bir factory ÅŸablonu, kendisine verilen parametre ve deÄŸerlere göre mümkün olan birkaç sınıftan istediÄŸimizi oluÅŸturur ve bize döndürür. Genellikle geriye döndürülen tüm sınıflar ortak bir ebeveyn sınıfından yada arayüzünden oluÅŸturulmuÅŸtur.
http://members.comu.edu.tr/msahin/courses/ust_duzey_files/patterns/factory.pdf

Friday, November 2, 2012

Interview Questions for IT Project Managers


Sample Interview Questions for IT Project Managers

1. Say you are the Project Manager for a team which gets an order to implement the company's flagship product to a new country/region for the very first time. What attributes would you consider to successfully establish this product in the region?

I understand the interviewer for looking for an answer which was aroung ROI (Return on investment)


2. A project is implemented, you being the project manager , how would you find that the all requirements stated in the Requirements document have been satisfied ?

Using Tracebility Matrix one can track the requirements.

3. Say you have a team for 4 members, out of these 2 team members are suppose to travel for implementation at a customer site next week. Say these 2 team members resign a day before they are about to travel? How would you handle such a situation?

4. Say you are gathering requirements at a customer site. For one such requirement you are suppose to get the requirements from a vendor who is going to lose his job after this project is implemented and thus this vendor is not cooperating while defining the requirements ? What would be your approach for tackling this situation?

5. What would you be your reaction when a project sponsor adds or keeps adding new requirements during System Integration testing?

6. What key attribitues would you be tracking while implementing a project?

http://infosys-project-manager-interviews.blogspot.com/search/label/Interview%20Q%27s%20for%20Project%20Managers


  • Define Project?
A project is a temporary endeavor that is unique with a definite start and an end time with a desired result.

Define Plan?
A plan defines –
• Risks, Resources , Communication
• Scope, Budget, Schedule, Quality

What are the principles of Prince2?
The principles are –
• Manage by stages
• Focus on products
• Manage by exception
• Tailor to suit the project environment
• Continued business justification
• Learn from experience
• Defined roles and responsibilities

https://dvq2z39rr5ipe.cloudfront.net/interview-question/prince2-interview-questions/

Software Project Management Interview Questions


What is project management?

Why are project managers required?

What all activities come under project planning?

Who all are the stakeholders in a project?

How do you initiate projects? What all groups are involved? Is there any formal process adopted in your organization?

What all documents created for the project and their significance?

How do you identify the number of resources required for the project?

How are the efforts estimated in the Project?

What methodology is used for estimations?

What do you understand by project risks?

How are project risks identified? How would you mitigate the same?

How to take care of hardware and software requirement for the project?

What are quality plans? What are the key objectives?

What are SCM plans? What are the key objectives?

What is meant by deviation?

What status reporting mechanism was used in the Project?

Explain project life cycle ?

How many phases are there in software project ?

Explain different software development life cycles ?

What are the contents of project management plan document?

What is a fish bone diagram ? What is Ishikawa diagram ?

What is pareto principle ? What is80/20 principle ?

What tools were used for configuration management?

How do you handle change request? What is internal change request?

What is the software you have used for project management?

What activities are performed while project closure?

What do you understand by defect prevention?

How is software shipment managed in the project?

http://infosys-project-manager-interviews.blogspot.com/search/label/Interview%20Q%27s%20for%20Team%2FProject%20Lead%20and%20Managers

PMBOK guide - Project Management Certification


PMBOK guide - Project Management Certification

The PMBOK guide defines the project management processes as follows

Initiating Process: Defines and authorizes the project

Planning Process: Plans the course of action required to attain project objectives and define the scope of the Project.

Executing Process: Integrates people and other resources to carry out the project plan for the project.

Monitoring and Controlling Process: Regularly measures and monitors the activities of the project so that corrective action can be taken when needed.

Closing Process: Formalize the acceptance of the Project and brings the Project to an orderly end


The responsibilities of a Project Manager across Processes.

Planning Process

· Spend 90% of your time here. Do not rush this phase.
· Prepare to run meetings with various Stakeholders
· Ensure that potential Project Risks/Issues identified and create a
· Risk Management Plan
· Identify Key Project constraints/Assumptions
· Identify and Define Project Team Organization Structure
· Identify list of all the Activities of the Project
· Construct Activity Sequences (Predecessor, Successor relationship)
· Identify the Duration of the each activity
· Determine the Skill requirements by type of work and identify suitable resource for it
· Determine the Costs for Individual Activities
· Define the Customer Quality Expectations
· Define Quality Management Plan for your Project
· Ensure that the Quality Activities of the Project are not overlooked
· Define Communication Management Plan to disseminate Project Information to stakeholders
· Define Procurement Management Plan for software/hardware requirements for your project
· Construct a comprehensive Project Plan by including Communication management/ProcureManagement/Risk/Assumptions/Constraints/Issues/Activities

Executing Process

· Approve all the Change Requests
· Approve the Project Plan
· Direct the technical Team to execute the work as defined in the Project Plan
· Direct the other Organizational interfaces to execute work as defined in the Project Plan
· Acquire Project resources and assign them
· Collect data/Metrics about the Project

Monitoring & Controlling Process

· Monitor Risks and see their Progress using Risk Management Plan
· Monitor each Project activity using the Project plan
· Disseminate Project status information to Stakeholders
· Produce Performance report with regard to Scope, Schedule, Cost, Resources, Quality and Risk
· Look for potential Change Requests and implement them using Change Control Procedure
· Control the Cost (possible using EVA(Earned Value Analysis ))
· Control the Quality by implementing quality review techniques and standards identified in the Quality Management Plan
· Manage the Project Team Members performance, Providing feedback, resolving issues to enhance Project performance
· Manage Stakeholders Expectations and resolve issue

Closing Process

· Formally terminate all activities of the Project
· Hand off the completed Deliverable/Product to Customer
· Release all the Project resources including software/hardware
· Create Lessons Learnt Document and share your experiences
· Archive all the Project Documentation




General Guidelines

· Always “Communicate, Communicate, Communicate”
· Understand Customers Language and give what they want. “No more, No less”
· Provide “True status” of the Project all the times
· Use Tools and Techniques to increase your Team Productivity
· Use Microsoft Project Plan for better planning
· Closely monitor Project Critical Path
· Identify Risks in every Project Phase and discuss them in all the Meetings
· Create a Daily Log for all your activities
· Mentor your Team members
· Success or Failure, You are Accountable


http://infosys-project-manager-interviews.blogspot.com/

nested,inner queries, subqueries



  • Nested,inner,subquery, Sql Queries


select *
from Customers
where CustomerID in
    (select customerID
    from Orders
    where OrderID in
        (select orderID
        from [Order Details]  
        where ProductID = 1
        )
    )
   
   
   


  • How subqueries work


Subqueries, also called inner queries, appear within a where or having clause of another SQL statement or in the select list of a statement. You can use subqueries to handle query requests that are expressed as the results of other queries. A statement that includes a subquery operates on rows from one table, based on its evaluation of the subquery's select list, which can refer either to the same table as the outer query, or to a different table.


For example, this subquery lists the names of all authors whose royalty split is more than $75:

select au_fname, au_lname
from authors
where au_id in
   (select au_id
    from titleauthor
    where royaltyper > 75)

select statements that contain one or more subqueries are sometimes called nested queries or nested select statements.

Multiple levels of nesting
"Find the names of authors who have participated in writing at least one popular computing book:"

select au_lname, au_fname
from authors
where au_id in
   (select au_id
    from titleauthor
    where title_id in
       (select title_id
        from titles
        where type = "popular_comp") )
       
       
Subqueries in update, delete, and insert statements

The following query doubles the price of all books published by New Age Books.
update titles
set price = price * 2
where pub_id in
   (select pub_id
    from publishers
    where pub_name = "New Age Books")
   

You can remove all records of sales of business books with this nested select statement
delete salesdetail
where title_id in
   (select title_id
    from titles
    where type = "business")
   
An equivalent delete statement using a join is:
delete salesdetail
from salesdetail, titles
where salesdetail.title_id = titles.title_id
and type = "business"

http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@Generic__BookTextView/13332;pt=13262



the name of every song by Metallica that contains the lyric “justice” with the following subquery
SELECT song_name FROM Album
WHERE band_name = ‘Metallica’
AND song_name IN
(SELECT song_name FROM Lyric
WHERE song_lyric LIKE ‘%justice%’);

all Metallica songs in the “And Justice for All” album that do not contain the word “justice” by way of the following code:
SELECT song_name FROM Album
WHERE album_name = ‘And Justice for All’
AND band_name = ‘Metallica’
AND song_name NOT IN
(SELECT song_name FROM Lyric
WHERE song_lyric LIKE ‘%justice%’);


a list of Metallica songs performed by Damage, Inc. from my Cover table
SELECT Album.song_name FROM Album
WHERE Album.band_name = ‘Metallica’
AND EXISTS
(SELECT Cover.song_name FROM Cover
WHERE Cover.band_name = ‘Damage, Inc.’
AND Cover.song_name = Album.song_name);


For example, I want to verify Album table entries for every Metallica song. Also, I want to return the album names that have missing tracks. Conveniently, the AlbumInfo table contains a column (album_tracks) signaling how many tracks there should be.
SELECT AlbumInfo.album_name FROM AlbumInfo
WHERE AlbumInfo.band_name = ‘Metallica’
AND album_tracks <>
(SELECT COUNT(*) FROM Album
WHERE Album.album_name = AlbumInfo.album_name);


The next example will return every Metallica album, the number of tracks it should contain, and how many entries are included in the Album table:
SELECT AlbumInfo.album_name, album_tracks,
(SELECT COUNT(*) FROM Album
WHERE Album.album_name = AlbumInfo.album_name)
FROM  AlbumInfo
WHERE AlbumInfo.band_name = ‘Metallica’;


changing the album_tracks value in the AlbumInfo table to the actual number of entries in the Album table:
UPDATE AlbumInfo SET album_tracks =
SELECT COUNT(*) FROM Album
WHERE AlbumInfo.album_name = Album.album_name)
WHERE AlbumInfo.band_name = ‘Metallica’;


Subselect comparison keywords (ALL, SOME, ANY)

SELECT * FROM AlbumSales
WHERE album_gross >
ALL (SELECT album_costs FROM AlbumProduction);

http://www.techrepublic.com/article/use-sql-subselects-to-consolidate-queries/1045787

The Rule of Seven


The Rule of Seven

A control chart is a line graph that represents measurements of a process performance. The chart also contains the Target Value for the attribute being measured, the upper control limit (UCL) and the Lower Control Limit (LCL).

Rule of seven : In control charts, if there are seven points on one side of mean, then an assignable cause must be found.

http://www.preparepm.com/notes/quality.html

Rough Order of Magnitude


Rough Order of Magnitude
the Rough Order of Magnitude estimate = -50% to +50%.


Rough Order-of-Magnitude (ROM) Estimate of costs and time when Requirements are not specified in the early stages of the project.

he ROM Estimate includes the following project parameters which are the foundation for estimation:
Parameter Explanation
Interval, staff-hours Project may be completed within this range if all Requirements will be within the scope specified by Vision document.
Accuracy, % ROM Estimate is created by three estimators. Accuracy equals to 100% minus the biggest difference between one individual estimate and the mean.
Time estimate, weeks Minimum and maximum duration of the project in weeks.
Retainer Amount of staff-hours required to complete Inception Phase in order to produce detailed Specification and exact project Budget.
KSLOC estimated An estimate of Kilo Software Lines Of Code to be written in the project. We calculate and estimate only hand-written, non-empty, non-comment lines of code.
Unadjusted FPs Function Points as an output parameter from COCOMO-II estimate method. In a simplified approach, function points could be compared with software functions or class methods.
Features, BC/WC/ML List of Features from Vision document that were used by estimators. Best Case (BC), Worst Case (WC), and Most Likely (ML) are the output numbers of three-point estimate method. The numbers are just programming staff-hours by the estimate of programmers.


http://www.technoparkcorp.com/process/cost/rom

plan–do–check–act


PDCA (plan–do–check–act or plan–do–check–adjust) is an iterative four-step management method used in business for the control and continuous improvement of processes and products. It is also known as the Deming circle/cycle/wheel, Shewhart cycle, control circle/cycle, or plan–do–study–act (PDSA). Another version of this PDCA cycle is OPDCA. The added "O" stands for observation or as some versions say "Grasp the current condition."
http://en.wikipedia.org/wiki/PDCA