In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Let's first look at the file types in the database:
Master data file: contains the startup information of the database and points to other files in the database. Each database has one master data file (one and only one). The recommended file extension is .mdf.
Auxiliary data file: all data files except the primary data file are secondary data files, which are mainly used to expand the hard disk space of the data (with or without). The recommended file extension is .ndf.
Transaction log file: contains information to recover all transactions in the database. There is at least one transaction log file in each database (there must be one, and can be multiple). The recommended file extension is .idf.
File stream data file: enables SQL-based applications to store unstructured data in the file system, such as documents, pictures, audio, video, etc.
The data file consists of several 64KB-sized extents, each consisting of 8 consecutive pages of 8KB
Transaction log files are not stored in pages, but by strips of log records of varying sizes.
Before creating a database, you need to consider the following:
The right to create a database is granted by default to members of the sysadmin and dbcreator server roles, which are used to grant users server-wide security privileges
The user who created the database will become the owner of the database
Consider the location of data files and log files
Reasonably estimate the size of the database and combine the growth value.
Let's take a brief look at the basic operation of the data:
In this way, the client can log in using the database administrator (sa) to manage the database.
About some parameters when creating a table
Accurate digital parameters
Approximate digital parameter
In computers, E is generally used to represent the power of 10.
For example, 1.79E+308 refers to the 308th power of 1.79x10.
Time and date parameters
String parameter
Unicode string parameter
Binary string parameter
Default value: if no value is specified for the column when the row is inserted, the column uses the default value.
Characteristics of the identity column:
1. The value of this column is generated by the system according to a certain rule, and null values are not allowed.
two。 The column values are not duplicated and can identify each row in the table.
3. Each table has only one identity column.
The identity column contains three contents: type, seed, and increment.
Check constraints: prevent errors.
Next, create the table
Migrate the database
Shrink the database
Use simple SQL statements to create databases, tables, etc.
# if you modify a statement with a primary key, it is recommended to delete the primary key first and add not null when modifying the statement
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.