MySQLTuner
MySQL :: MySQL 5.7 Reference Manual :: 3.3.3 Loading Data into a Table
3.3.3 Loading Data into a Table After creating your table, you need to populate it. The LOAD DATA and INSERT statements are useful for this. Suppose that your pet records can be described as shown here. Because you are beginning with an empty table, an easy way to populate it is to create a text file containing a row for each of your animals, then load the contents of the file into the table with a single statement. You could create a text file pet.txt containing one record per line, with values separated by tabs, and given in the order in which the columns were listed in the CREATE TABLE statement. Whistler Gwen bird \N 1997-12-09 \N To load the text file pet.txt into the pet table, use this statement: mysql> LOAD DATA LOCAL INFILE '/path/pet.txt' INTO TABLE pet; If you created the file on Windows with an editor that uses \r\n as a line terminator, you should use this statement instead: mysql> LOAD DATA LOCAL INFILE '/path/pet.txt' INTO TABLE pet -> LINES TERMINATED BY '\r\n';
twitter/flockdb - GitHub
SQL Tutorial
How To Create a New User and Grant Permissions in MySQL
What the Red Means The lines that the user needs to enter or customize will be in red in this tutorial! The rest should mostly be copy-and-pastable. About MySQL MySQL is an open source database management software that helps users store, organize, and later retrieve data. How to Create a New User In Part 1 of the MySQL Tutorial, we did all of the editing in MySQL as the root user, with full access to all of the databases. Let’s start by making a new user within the MySQL shell: CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password'; Sadly, at this point newuser has no permissions to do anything with the databases. Therefore, the first thing to do is to provide the user with access to the information they will need. GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost'; The asterisks in this command refer to the database and table (respectively) that they can access—this specific command allows to the user to read, edit, execute and perform all tasks across all the databases and tables.
PL/SQL Tutorial- PL/SQL Triggers
For Example: The price of a product changes constantly. It is important to maintain the history of the prices of the products. We can create a trigger to update the 'product_price_history' table when the price of the product is updated in the 'product' table. 1) Create the 'product' table and 'product_price_history' table CREATE TABLE product_price_history (product_id number(5), product_name varchar2(32), supplier_name varchar2(32), unit_price number(7,2) ); CREATE TABLE product 2) Create the price_history_trigger and execute it. CREATE or REPLACE TRIGGER price_history_trigger BEFORE UPDATE OF unit_price ON product INSERT INTO product_price_history (:old.product_id, :old.product_name, :old.supplier_name, :old.unit_price); 3) Lets update the price of a product. UPDATE PRODUCT SET unit_price = 800 WHERE product_id = 100 Once the above update query is executed, the trigger fires and updates the 'product_price_history' table. Types of PL/SQL Triggers PL/SQL Trigger Execution Hierarchy (Message varchar2(50), Begin
SQL Tutorial
SQL is a database computer language designed for the retrieval and management of data in relational database. SQL stands for Structured Query Language. This tutorial will give you quick start with SQL. This reference has been prepared for the beginners to help them understand the basic to advanced concepts related to SQL languages. Before you start doing practice with various types of examples given in this reference, I'm making an assumption that you are already aware about what is database, especially RDBMS and what is a computer programming language. If you are willing to compile and execute SQL programs with SQLite DBMS but you do not have a setup for the same, then do not worry. 1 - SQL Quick Reference Guide A quick SQL reference guide for SQL Programmers. SQL Quick Reference Guide 2 - SQL Built-In Useful Functions A comprehensive list of important SQL Functions. SQL Built-In Useful Functions 3 - SQL Useful Resources A collection of SQL Sites, Books and Articles is given at this page.
TaffyDB - The JavaScript Database
NoSQL
"Structured storage" redirects here. For the Microsoft technology also known as structured storage, see COM Structured Storage. A NoSQL (often interpreted as Not Only SQL[1][2]) database provides a mechanism for storage and retrieval of data that is modeled in means other than the tabular relations used in relational databases. Motivations for this approach include simplicity of design, horizontal scaling and finer control over availability. History[edit] Eric Evans reintroduced the term NoSQL in early 2009 when Johan Oskarsson of Last.fm wanted to organize an event to discuss open-source distributed databases.[7] The name attempted to label the emergence of an increasing number of non-relational, distributed data stores. There have been various approaches to classify NoSQL databases, each with different categories and subcategories. A more detailed classification is the following, by Stephen Yen:[9] Performance[edit] Examples[edit] Document store[edit] Graph[edit] Key-value stores[edit]
louischatriot/nedb