In RDBMS how does Statistical Data Get Populated?

RDBMS stores statistical information for every relation in the database using the DDL used to create the relations (number of rows, size of rows, block size and factores (for optimal storage), as well as how distinct values for each for each attribute).  Stats about indices, etc.

Each time a DDL command is issued (such as alter table structure) stats gets updated, also with every DML command the stats gets updated (update command).

This is generally from the RDBMS and in real life applications stats are also maintained about data usage and this information is used for Query Optimization and to calculate the cost of a query. 

Chicago Cars Case Study – Requirements


The company will:

– Sell Cars
– Run an Auto\Mechanic Shop
– Sell Parts (they have a database of parts)


Sales Price, Date Sold, Customer #, Car ID (VIN #)
– Track Inventory of Cars
Car Info (VIN #, Stock #, Model, Make, Year, Color, Mileage, Location) [no images]
Two types of cars – Pre-owned and New
Multiple Locations
Requirement: Never delete car info once it is recorded (mark it as “not available”, track it with a “state”).

You do not have to implement the online forms – there is a website already for this dealer, someone fills in this form and it goes to a guy that enters the information into the database. It could be automated but we don’t have to. We are NOT building a web application (but we can, if we want to…).


1. Managers – Can do and see every record in the database [No access restrictions] Managers can do sales, and only they can enter sales information
2. Sales Reps can only:
o View and add customers [enter information]
o View inventory information [Can’t change it!]
Specifically: They can view everything, but can only add customer info


Part #, Cost, Quantity (Don’t implement a “shopping cart” – Just want an inventory of parts).
Add, update, and delete parts
Add/update/delete customers, sales records, and inventory records (CRUD: Create, Read, Update, Delete on everything – given the security information we have!)


Can a customer update their own information?
When a sales record is registered, do we have to mark the car as sold?
Are there any states besides pre-owned and new?
Can a car be available for sale or not for sale (i.e. in the shop)?

Multilingual SEO processes (MSEO)

There are at least 3 ways of implementing multiple languages 

  1. Use a directory for each language  or
  2. use country extension in the domain etc
  3. use subdomains (sub-domains are considered to be independent domains by Google) (

Comparing approaches and Google facts:

  1. Each domain is independent including subdomains ( and are completely different).  Also each page is independent and has its own page rank, keywords relevancy factors, etc.
  2. Subdomains don’t pass link juice’ and value for inbound links across the whole site.
  3. Sub folder structures are best for allowing link ‘juice’ to be passed to the entire site.  This impact Google page rank.  A site passes juice internally using n-1 formula (a page ranked 3 will give a rank 2 to a linked page)
  4. From a user experience perspective avoid using geo-location at the hosting level (from an IP address perspective).  If you must use geo then give users the option to choose  languages they want (for example I’m an Arab in Chicago who likes to see the content in Arabic)
  5. Presenting sites in multiple languages isn’t ‘duplicate content’ when breaking it out into various /folders and then languages, each will and should have different contents.  By translating the content you are not creating duplicate content, but remember this:
  6. From a keyword perspective Book is not the same as Ketaab
  7. Keyword research needs to be done for each language (the search pattern for Arabs is not the same as the Hispanic community or the Germans).  So you must do SEO in each language and different in-bound linking strategies, content creation and optimization, etc.
  8. From our own experience we have translated to French (  ) and used subfolders.  I have the same  exact contents on both folders, each was given its own ranking and never punished for duplicates) . 
  9. Using the same language on different domains is duplicate (content presented in one language on is the same on


Let us know what you think?

Final Classes

A class can be declared  final when we do not want the class to be sub-classed.  We can make  a method final if it has an implementation that should not be changed by overriding it in sub-classes. Making a class final alows you to create  immutable class.  The main reasons for final methods/classes is:

  1. Security: the system can hand out sensitive bits of read-only information without worrying that they will be altered
  2. Performance: immutable data is very useful in making things thread-safe.

Examples from the Java Library

  • java.lang.String and java.lang.System

Immutable Object Definitions

In object-oriented and functional programming, an immutable object is an object whose state cannot be modified after it is created

Programming Example

  • Public class MyClass
  • {
  • Public void Method() {…}
  • Public final void FinalMethod() {…}
  • }
  • public class AnotherClass extends MyClass
  • {
  • public void Method() {…} //Ok
  • public final void FinalMethod() {…} //Not Ok
  • }