background preloader

PostgreSQL: The worlds most advanced open source database

PostgreSQL: The worlds most advanced open source database

Coding Horror: A Visual Explanation of SQL Joins I love the concept, though, so let's see if we can make it work. Assume we have the following two tables. Table A is on the left, and Table B is on the right. We'll populate them with four records each. id name id name -- ---- -- ---- 1 Pirate 1 Rutabaga 2 Monkey 2 Pirate 3 Ninja 3 Darth Vader 4 Spaghetti 4 Ninja Let's join these tables by the name field in a few different ways and see if we can get a conceptual match to those nifty Venn diagrams. There's also a cartesian product or cross join, which as far as I can tell, can't be expressed as a Venn diagram: SELECT * FROM TableA CROSS JOIN TableB This joins "everything to everything", resulting in 4 x 4 = 16 rows, far more than we had in the original sets. Kyle's Cousin & An Absolute Beginner's Introduction to... Proper indexes on your tables are a crucial part of any Database design that requires advanced data retrieval. For basic databases with only a few dozen records per table, indexes may not be absolutely necessary and even slow things down (if your RDBMS does not automatically ignores the index), but it’s still good practice to design your database with proper indexes from the start if you expect it to grow big. The minute your number of table records increases and you need to do more advanced select queries (eg. joining of multiple tables), efficiency and speed becomes important. That’s where indexes come into play. In this post I’m going to give you an introduction tutorial/guide about database indexes, for everyone who has no idea what they’re used for. Using an index for simple SELECT statements… Let’s kick things off with a simple example. And add 10 records to it: This is how your table will look like: You may not have noticed, but you already created an index. Other types of indexes

SQL Server 2008 R2 | Database Management System Capabilities Breakthrough, in-memory performance With SQL Server 2014, new in-memory capabilities for transaction processing and enhancements for data warehousing complement our existing technologies for data warehousing and analytics. Scale and transform your business with, on average, a 10x performance gain for transaction processing while still using existing hardware, and a greater-than 100x performance gain for data warehousing. Learn more Proven, predictable performance SQL Server consistently leads in TPC-E, TPC-H and real-world application performance benchmarks. Learn more High availability and disaster recovery Gain greater uptime, faster failover, improved manageability, and better use of hardware resources through AlwaysOn, a unified solution for high availability. Learn more Enterprise scalability across compute, networking, and storage With Windows Server, physical processing now scales up to 640 logical processors, and virtual machines scale up to 64 logical processors.

Build a CMS in an Afternoon with PHP and MySQL You're now ready to build the Article PHP class. This is the only class in our CMS, and it handles the nitty-gritty of storing articles in the database, as well as retrieving articles from the database. Once we've built this class, it will be really easy for our other CMS scripts to create, update, retrieve and delete articles. Inside your cms folder, create a classes folder. This file is quite long, but it's fairly simple stuff when you break it down. Everything after these lines of code — up until the closing brace at the end of the file — contains the code that makes up the Article class. After starting our class definition, we declare the properties of the class: $id, $publicationDate, and so on. Technically, this type of class — which contains properties that map directly to the corresponding database fields, as well as methods for storing and retrieving records from the database — follows an object-oriented design pattern known as active record. Next we create the class methods . . hi

Common Queries Tree Common MySQL Queries Basic aggregation Last updated 05 Jan 2013 Aggregate across columns Last updated 09 Sep 2009 Aggregates across multiple joins Given a parent table and two child tables, a query which sums values in both child tables, grouping on a parent table column, returns sums that are exactly twice as large as they should be. CREATE TABLE packageCredit ( packageCreditID INT, packageCreditItemID INT, Last updated 22 Feb 2013 Aggregates excluding leaders You have a table of grouped ranks ... Last updated 21 May 2009 Aggregates of specified size Find the values of a table column c1 for which there are a specified number of listed values in another column c2. All X for which all Y are Z You have an election database with tables for candidates, parties and districts. CREATE TABLE districts ( district char(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO districts VALUES ('Essex'),('Malton'),('Riverdale'),('Guelph'),('Halton'); All X meeting multi-row conditions 1. 2. Median

Get Started Developing For Android With Eclipse, Reloaded - Smashing Magazine In the first part1 of this tutorial series, we built a simple brew timer application using Android and Eclipse. In this second part, we’ll continue developing the application by adding extra functionality. In doing this, you’ll be introduced to some important and powerful features of the Android SDK, including Persistent data storage, Activities and Intent as well as Shared user preferences. To follow this tutorial, you’ll need the code from the previous article. If you want to get started right away, grab the code from GitHub2 and check out the tutorial_part_1 tag using this: $ git clone $ cd BrewClock $ git checkout tutorial_part_1 Once you’ve checked out the code on GitHub, you’ll need to import the project into Eclipse: After importing the project into Eclipse, you might receive a warning message: Android required .class compatibility set to 5.0. Getting Started With Data Storage Link Abstracting the Database Link Retrieving Data Link Data Binding Link

Backdoor webserver using MySQL SQL Injection | &GreenSQL By David Maman, GreenSQL CTO MySQL Database is a great product used by thousand of websites. Various web applications use MySQL as their default database. Most people know that SQL injection allows attackers to retrieve database records, pass login screens, and change database content, through the creation of new administrative users. First of all, I will give you a brief description of SQL injection. What is SQL Injection? SQL injection is an attack that allows the attacker to add logical expressions and additional commands to an existing SQL query. For example, the following SQL command is used to validate user login requests: $sql_query = "select * from users where user='$user' and password='$pass'" If the user-submitted data is not properly validated, an attacker can exploit this query and pass through the login screen by simply submitting specially crafted variables. $sql_query = "select * from users where user='admin' or '1'='1' and password='$pass'" Command 1- Writing arbitrary files

Data warehouse Data Warehouse Overview In computing, a data warehouse (DW, DWH), or an enterprise data warehouse (EDW), is a database used for reporting and data analysis. Integrating data from one or more disparate sources creates a central repository of data, a data warehouse (DW). Data warehouses store current and historical data and are used for creating trending reports for senior management reporting such as annual and quarterly comparisons. The data stored in the warehouse is uploaded from the operational systems (such as marketing, sales, etc., shown in the figure to the right). A data warehouse constructed from integrated data source systems does not require ETL, staging databases, or operational data store databases. A data mart is a small data warehouse focused on a specific area of interest. This definition of the data warehouse focuses on data storage. Benefits of a data warehouse[edit] A data warehouse maintains a copy of information from the source transaction systems. History[edit]

Using VLOOKUP in Excel VLOOKUP is one of Excel’s most useful functions, and it’s also one of the least understood. In this article, we demystify VLOOKUP by way of a real-life example. We’ll create a usable Invoice Template for a fictitious company. So what is VLOOKUP? Here’s an example of a list, or database. Usually lists like this have some sort of unique identifier for each item in the list. The hardest part of using VLOOKUP is understanding exactly what it’s for. VLOOKUP retrieves information from a database/list based on a supplied instance of the unique identifier. Put another way, if you put the VLOOKUP function into a cell and pass it one of the unique identifiers from your database, it will return you one of the pieces of information associated with that unique identifier. If all you need is one piece of information from the database, it would be a lot of trouble to go to to construct a formula with a VLOOKUP function in it. First we start Excel… …and we create ourselves a blank invoice: That’s it!

Top 50 Ruby on Rails Websites - Social Shopping, Design & Technology – StoreCrowd Professional Statistical Services - Home Ajax Applications, Web Reporting, Web Development Tool & Code Generator for PHP, C#, VB.NET Accelerate Web Development with professional Web Application Generator (create dynamic Websites like this one with minimal coding) CodeCharge Studio is the leading and most productive solution for visually creating database-driven Web applications with minimal amount of coding. The support for virtually all databases, web servers and web technologies makes CodeCharge Studio one of a kind. It is a complete solution available for Web development. Whether you are a legacy developer, MS Access programmer or experienced Web engineer, you can use CodeCharge Studio to rapidly develop anything from simple database-driven Web applications to complex e-business solutions. The included Application Builder instantly converts your database (MS Access, MS SQL, MySQL, Oracle, etc.) into a working Web application with login-protected user access to database search, list, view and update functions. CodeCharge Studio delivers the speed of code generation integrated with a full featured, powerful IDE.

Related: