In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
The main content of this article is to explain the "online Mall database user information data operation method tutorial of SQL practical exercise". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn the "SQL practice online Mall database user information data operation method tutorial"!
Project description
Under the environment of the rise of e-commerce, establishing the use of the Internet to open up sales channels, helping enterprises to adjust the commodity structure in time, and assisting dealers to open the information portal of goods sources has become an effective solution to solve the poor flow of information. E-commerce is beneficial for enterprises to change their management mechanism, establish a modern enterprise system, and improve their sales level and competitiveness. Realize a series of online shopping services, such as browsing goods, purchasing goods, creating orders, viewing all kinds of new products, special offers, hot-selling goods and so on. Message, customer management, commodity management, commodity information search, order management, commodity classification management, announcement / feedback management and other online shopping services, this project is to achieve the operation of online mall user information forms.
The database operation requirements of the online mall system are as follows:
1) Database EshopDB.
2) user information table EUsers, the table structure is shown in Table J2-39-1.
Table J2-39-1 Eusers Table
Field name field description data type is allowed to be empty UserID user IDint No Primary key (self-increment) UserName username character (50) No
UserPwd user password character (50) No
3) the basic data in Table EUsers is shown in Table J2-39-2.
Table J2-39-2 EUsers basic data
UserIDUserNameUserPwd1Samon1234562Tennr1236543John987654 (1) Task description
* * Task 1: creating online mall database with SQL language
1) create a database EshopDB to determine whether there is a database with that name in the system, and delete it if so; if not, create the database.
2) the initial value of the main database file 10MB, the maximum 20MB, incremented by 15%.
3) the initial value of the log file is 5MB, and the maximum is 10MB, which grows automatically.
IF DB_ID ('EshopDB') IS NOT NULL DROP DATABASE EshopDBGOCREATE DATABASE EshopDBON PRIMARY (NAME=EshopDB, FILENAME='D:\ xxxx\ EshopDB.mdf', SIZE=10MB, MAXSIZE=20MB, FILEGROWTH=15%) LOG ON (NAME=EshopDB_log, FILENAME='D:\ xxxx\ EshopDB_log.ldf', SIZE=5MB, MAXSIZE=10MB)
* * Task 2: create user information table EUsers in SQL language
1) create the database table according to the structure of table J2-39-1 provided, and set the primary key.
CREATE TABLE EUsers (UserID INT NOT NULL PRIMARY KEY IDENTITY (1), UserName NVARCHAR (50) NOT NULL, UserPwd NVARCHAR (50) NOT NULL,)
* * Task 3: EUsers is used to operate the SQL user information table.
1) in the user information table EUsers, add user name, user phone number and contact address field; user name and user phone field cannot be empty; data type is self-defined.
2) modify the EUsers user name field of the user information table, and the user name can only be "letter".
3) modify the EUsers password field of the user information table. The password length should not be less than 6 characters.
ALTER TABLE EUsersADD user name NVARCHAR (20) NOT NULL, user phone NVARCHAR (20) NOT NULL, contact address NVARCHAR (100) ALTER TABLE EUsersADD CONSTRAINT UserName CHECK (UserName LIKE'% [a-zA-Z]%') ALTER TABLE EUsersADD CONSTRAINT UserPwd CHECK (LEN (UserPwd) > = 6) so far, I believe that everyone on the "SQL practice online mall database user information data operation method tutorial" have a deeper understanding, might as well come to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.