Zappos.com

Today I met a word called Zappos and wondering its relationship with Amazon. Originally I thought it is a vendor, and it turns out it is not

[from Wiki] Zappos.com is an online shoe and apparel shop currently based in Henderson, Nevada.[3]

In July 2009, the company announced it would be acquired by Amazon.com in an all-stock deal worth about $1.2 billion.[4][5][6] Since its founding in 1999, Zappos has grown to be the largest online shoe store.

Advertisements

brown bag 11/21/2012

JOIN

1) inner join has only join, usually inner is omitted
2) left join, right join and full join are outer join, outer is usually omitted.

3) joint table, both ids from two tables will be primary

mysql examples: (typing it down makes me remember it longer)

describe invoice_items;

alter table invoice_items add foreign key (invoice_id) references invoices(invoice_id); //add foreign key
insert food(name, asin) values(‘apple’, ‘1234’)

each INDEX table is identified by the primary id, it stores in a 8k page, either in disk or ram.

p4 revert

  • p4 revert //…
Revert every file you have open, in every one of your pending changelists, to its pre-opened state.
  • p4 revert -c default //…
Revert every file open in the default changelist to its pre-opened state.
  • p4 revert -c 31 *.txt
Revert all .txt files in the current directory that were open in changelist 31.
  • p4 revert -a
Revert all unchanged files. This command is often used before submitting a changelist.

join/limit

  • If it has the same name in both tables, we can use

       USING (CustomerId)

syntax. If the name differs, say we had CustomerId and CId, we would use the
       ON Customers.CustomerId = Reservations.CId syntax
  • The inner join selects only those records from database tables that have matching values;

The INNER keyword can be omitted.

  • The LEFT OUTER JOIN returns all values from the left table, even if there is no match with the right table. In such rows, there will be NULL values. In other words, left outer join returns all the values from the left table, plus matched values from the right table. Note, that the OUTER keyword can be omitted.
  • for the names in select, usually using table.column, but if there is only one table has such name, you can omit the table, just use select column, rather than specifying table.column.
  • Limit – MySQL Command

    Definition: Limit is used to limit your MySQL query results to those that fall within a specified range. You can use it to show the first X number of results, or to show a range from X – Y results. It is phrased as Limit X, Y and included at the end of your query. X is the starting point (remember the first record is 0) and Y is the duration (how many records to display).
    Examples:
     SELECT * FROM `your_table` LIMIT 0, 10 
    
    This will display the first 10 results from the database.
    

    and

     SELECT * FROM `your_table` LIMIT 5, 5
    
    This will show records 6, 7, 8, 9, and 10