Understanding the problem Deciding on: Exact vs. approximate problem solving Appropriate data structure Design of algorithm Proving correctness Analyzing an algorithm Time efficiency Space efficiency Coding an alogrithm
An algorithm is a sequence of unambiguous instructions for solving a computational problem, i.e., for obtaining a required output for any legitimate input in a finite amount of time. More precisely, an algorithm is a method or process to solve a problem satisfying the following properties: Finiteness: Terminates after a finite number of steps. Definiteness: Each step must be rigorously and unambiguously specified. Input: Valid inputs must be clearly specified. Output: can be proved to produce the correct output given a valid input. Effectiveness: Steps must be sufficiently simple and basic.
Joins tables Many forms: INNER JOIN (include only matching columns) OUTER JOIN (include all columns) LEFT OUTER JOIN NATURAL JOIN CONDITION JOIN “JOIN” means “INNER JOIN” in MySql. Example of a Condition Join Statement: JOIN the CountryLanguage and Language tables using the country code SELECT CO.Name, L.language, L.percentage FROM Country CO JOIN CountryLanguage L ON CO.code = L.countrycode WHERE ...; Example of Multiple Table Join SELECT CO.name, C.*, L.language FROM Country CO JOIN CountryLanguage L ON CO.code = L.countrycode JOIN City C ON CO.code = C.countrycode WHERE ...; /* more conditions */
Source: http://www.slideshare.net/ronwarshawsky/rw-nosql-2013presentatonv1 OS Tuning : Try “tuned” – best when used in staging/load testing environment under realistic load. Storage Tuning : RAID 10, Ext4 or XFS, Delaysharding with better I/O, SSD + FlashCache – shutterflytested Database Tuning : Database configuration Option to disable services Database monitoring tools Database network monitoring tools Sharding / Replicating Load Testing : Why load test? validate upgrades validate fixes validate platform and hardware changes validate multiples of production loads Options for load testing Benchmark load testing Disk I/O load testing Real traffic load testing
Source: sqlserverhelpdotcom Atomicity : Either all operations are executed or none of the operations are executed. Consistency : All the data must be in a consistent state. There should be no transaction that has adverse effect on data residing in database. Isolation : If more than 1 transactions are executing simulataneously then every transaction should be executed as if no other transaction is running. Durability: The database system should be able to sustain the updates. Even if the system fails or restarts, the updates should be applied.
It can be broken into 3 fundamental logical layers they are: User Interface Processing Data storage Types : Single Tier Architecture: Data is stored in single location. It is an application running on single computer and perform all the required tasks. Easy to manage and implement data consistency. Two Tier Architecture: The basic web architecture is two tiered and characterized by Web Client: displays information content. Web Server: transfer information to client. It separates data and business logic. It is generally data driven: Application existing entirely on local machine. Database is deployed at a specific and secure location. Limitations: As ...
Read more