(1) using the database MySQL, the scripting language is as follows:/* User table */create table ' usertbl ' (' id ' int (one) not NULL auto_increment, ' username ' varchar () DEFAULT NULL, ' password ') varchar () default NULL, ' permission ' int
Note: Use the BTREE compound to index the ASC/DESC of each field to optimize the orderby query efficiency.The tbl_direct_pos_201506 table has 1.9 million data, DDL:
Create table 'tbl _ direct_pos_201506 '('acq _ ins_code' char (13) not null default '
CREATE TABLE ' user ' (' ID ' bigint (+) not NULL auto_increment,' Name ' varchar (+) CHARACTER SET UTF8 COLLATE utf8_general_ci not NULL,' ERP ' varchar (+) CHARACTER SET UTF8 COLLATE utf8_general_ci not NULL DEFAULT ' ',' Email ' varchar (+)
Using RBAC mode to design permissions, there is a situation.
General A user posts a post,
A has the edit, delete, and view permissions for this post.
Normal b user, with view permission
Small Series C users, with the editor of this post, delete,
The simplest Database Structure Design Based on RBAC permission system includes the following table 1. user table -- table "t_user" ddlcreate table 't_ user' ('id' int (11) not null auto_increment, 'username' varchar (100) default null, 'Password'
Note: Use BTREE to comindex ASC/DESC of each field to optimize order by query efficiency. btreeascThe tbl_direct_pos_201506 table has 1.9 million data, DDL:
Create table 'tbl _ direct_pos_201506 '('acq _ ins_code' char (13) not null default
MySQL cluster creates a foreign key, divided into four constraints: no action,restrict,cascade,set null. If Table A's primary key is a field in table B, the field is called the foreign key of B, table A is called the primary table, and table B is
Export database: Mysqldump-u username-P database name > exported file name as I entered the command line: Mysqldump-u root-p ygeshop > Ygeshop.sql (Input will allow you to enter the password to MySQL) (if the Guide If you have a single table, enter
How does mysql check which tables have a large data volume bitsCN.com?
How does mysql check which tables have a large amount of data? if there are dozens or hundreds of tables in the database, which tables have a large amount of data, you cannot
DDL statement -- modify a table
Modifying a table is to modify the definition of an existing table in the database. It is simple to modify a table because it does not need to reload data or affect ongoing services.
MySQL uses the alter table
Mysql uses the federated engine for remote database access (cross-network operation of tables in two databases at the same time)Problem:
Assume that I need to access table 2 in the database of IP2 on database1 on IP1.Method:
Here, as a local
This is a creation in
Article, where the information may have evolved or changed.
Incorrect string value: ' \xef\xbf\xbd\xef\xbf\xbd ... '
Report this error, basically is the coding problem, check the table code
Show CREATE TABLE table_name;
For
Mysql uses the federated engine to remotely access the database (operate tables in both databases across the network), and mysqlfederatedProblem:
Assume that I need to access table 2 in the database of IP2 on database1 on IP1.Method:
Here, as a
(a) Foreword
My last blog has explained how to crawl a certain page of the animation data, here to focus on a complete reptile example.
Compared with the previous article, more is the type of animation, Japanese name or something.
Recommend this
Problem:This assumes that I need to access the Table2 table in the IP2 database on the database1 on IP1Method:Here database needs to open the federated engine in order to be able to access the table in the remote DB as the local data base, the
1. The following is a table statement that is exported directly from the database.1-- ----------------------------2--Table structure forFiles3-- ----------------------------4 DROP TABLE IF EXISTS ' files ';5 CREATE TABLE ' files ' (6' ID 'int(11)
Phpyii Framework Study Notes 1: Getting started, what you need to know for the first time .. Create several tables ~ For a brief description, tbl_postblog table tbl_comment comment table. tbl_user table tbl_tag label table can directly run the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.