Alibabacloud.com offers a wide variety of articles about database fundamentals book, easily find your database fundamentals book information here online.
Label:I. Overview1. Concept of transactionsIn a database, a transaction is a series of actions performed by a set of logical units of work, either executed or not executed. 2. Transaction acid characteristicsAtomicity (Atomic) atomicity means that multiple database operations that make up a transaction are an indivisible atomic unit, and the operations in the transaction either occur or do not occur. The co
row in the constrained column contains a null value.A unique constraint is used for the field, which can be used when the main surviving database4. Foreign keyIf the public keyword is the primary key in a relationship, then this common keyword is called the foreign key of the other relationship. Thus, the foreign key represents the correlation between the two relationships. A table with a foreign key of another relationship as the primary key is called the primary table, and a table with a key
management system developed by the Swedish MySQL AB company and is currently part of Oracle's product portfolio. While MySQL offers less functionality than large software such as Oracle, MySQL provides more than enough functionality for general personal users and small and midsize businesses, and because MYSQ L is open source software, it can significantly reduce total cost of ownership. MySQL often develops free systems with a combination of PHP, Python, and Perl software.SybaseA relational
Label:When it comes to the fundamentals of database storage technology, it is necessary to understand the data characteristics and bottlenecks faced by enterprise applications. 1. Data characteristics of enterprise applications
Event Generation Data
As an example of courier tracking, the information read process includes the location of the current read operation, the timestamp, the current
. Updating data in a tablemysql-> UPDATE table name SET field name 1= ' A ', field name 2= ' B ' WHERE field name 3= ' C ';.12. To load data into a data table in text modemysql> LOAD DATA LOCAL INFILE "d:/mysql.txt" into table name;.13. Import. sql File commandmysql> use database name;.Mysql> SOURCE d:/mysql.sql;.14. command line to modify root passwordmysql> UPDATE mysql.user SET password=password (' New password ') WHERE user= ' root ';.mysql> FLUSH
cannot have duplicate properties. the first paradigm is a column with no duplicates. second normal form (2NF): the second paradigm is established on the basis of the first paradigm, that is, satisfying the second paradigm must first satisfy the first paradigm. The second paradigm requires that each instance or row in a database table must be divided by a unique region. It is often necessary to add a column to the table to store the unique
in this number. "K%" matches a string that begins with K.Select * from Student where FNAme like '%n% '* * NULL in the database is ' not known ' and is not interpreted in C #. There is no value.Grouping of dataThe number of people at all ages is grouped according to age:Select Fage, Count (*) from StudentGROUP BY Fage* * the GROUP BY clause must be placed after the where statement.* * the column in the GROUP BY clause does not appear in the list of co
permissions Because app users have very low privileges, they can only connect, and permissions are configured in the property configuration of the corresponding database Iv. Description of the error 1. If the Enforce password policy is checked in the General tab of Step 3, a 15128 error will occurAt this point, you need to log on as Windows Authentication mode and execute the following statement [SQL]View Plaincopy
AlTER LOGIN testUser wit
t_users MODIFY uname NOT NULL means that the uname field in the T_users table is set to non-empty.2. PRIMARY KEY constraintsTo ensure uniqueness of the data in a table, there can be only one primary key in a table, but the primary key may consist of multiple fields (federated primary key, composite primary key), but this is not recommended.You can set the key in the key option when you are building a table: primary key; For example, setting the name as the primary key can be written like this:
Users'(name,fullname,password) VALUES (%s,%s,%s) '
cur.execute (sql, ("aaaaa","asd666" ,"6666"))#获取插入的最后一条数据的自增ID Print (CUR.LASTROWID) #只对一次增加一个可以直接看出, for adding multiple quantities at a time execute multiple SQL at one time='INSERT into Users (Name,fullname,password) VALUES (%s,%s,%s)'Cur.executemany (sql,[("aaadsaaa","Asd6dasd66","6666"),("adsaaaaa","asd6awf66","6666"),("awaaaaa","asd666","6666")]) Note that execute and Executemany will return the number of execution impact bars after exec
Objects
Table
View
Stored Procedures
Trigger
Constraints: PRIMARY KEY constraint, FOREIGN KEY constraint, non-null constraint, UNIQUE constraint, check constraint
2.4 Database Integrity
Entity integrity: The primary key field cannot be empty;
Regional integrity: All data within the scope of validity;
Referential integrity: Data correctness in interrelated tables, with foreign key constraints can be guara
function, aggregate function, analytic function)6.1 Single-line function6.1.1 character functions6.1.2 Date functionSysdate-System Current dateExample: select Sysdate from dual;--->dual: Virtual table6.1.3 Numeric functions6.1.4 conversion function6.1.1.1 To_char ()Convert to String typeExample: SELECT to_char (sysdate, ' YYYY ' year "fmmm" month "FMDD" Day "HH24:MI:SS") from dual;--Output system Current date6.1.1.2 to_date ()Convert to date typeExample: SELECT to_date (' 2012-01-12 ', ' YYYY-M
a query statement that is treated as a result set is called a subquery, as with a normal table. SELECT * FROM (SELECT * from Student where age>20) As name Select Rom_number () over (order by age DESC) as Romnum Name,age,chinese,math from Student This stage of the database read, and I also mastered a lot of database query, build table, update, delete and other statements, the following should be the stud
Connection query: You can implement multiple table queries by using the Join operator. Connection is the main feature of relational database model, and it is also a sign that distinguishes it from other types of database management system.Common two link operators:1.join on2.union in the relational database management system, the relationship between the data
Database design is divided into requirements analysis, conceptual design, logical design and database physical design four parts.1. Demand Analysis:Stage Result: Requirement specification.2. Conceptual structure Design:Conceptual structure design is to synthesize, generalize and abstract the user's needs, and form a conceptual model independent of the specific DBMS.Conceptual structure design typically has
so will cause the engine to discard full table scans using the index, such as: Select ID from t where num=10 or num=20 You can query this:Select ID from t where num=10UNION ALLSelect ID from t where num=20 (The difference between Union and union all is that union automatically compresses duplicate results in multiple result sets, and union ALL displays all results, whether duplicates or not.) ) 5. If there is a stored procedure Proc1 (employee number, month) in MySQL to query the employee's sa
set of properties. + Properties can be saved in a stream or loaded from a stream. - each key and its corresponding value in the property list is a string. */
+
AProperties properties=NewProperties ();//instantiating an object at
- //loading through the class loader
- Try {
-Properties.load (TestProperties2.class. getClassLoader (). getResourceAsStream ("Jdbc.properties")); - //getClassLoader () returns the class loader for this class. -
convert.tostring ()
(String)
From the results can be seen: converted to int , the rounding calculation, this and the display type conversion is different, before we use the display type conversion to convert 58.5 to int is the result of The value after the decimal point is discarded directly. Summary: The range of methods used for various conversionsImplicit type conversions: often used between numeric types, converting a numeric type with a small
Last record, say a word about the security of the database.One, consistency controlTo ensure transactional consistency, you can use Display transaction statements and add integrity constraints to the database. For example, in the return of the book, you want to modify the user's user table in the remaining number of books, borrowing records of the option and the remaining number in 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.