In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-13 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Suddenly want to practice under the sql sentence, want to find an environment on the Internet to practice for a long time since there is no. When I saw a blog post, I took it as an example to build an environment. Link: http://pan.baidu.com/s/1nv8y8OD password: o5ls
Navicat Premium_11.2.7, NavicatDataModeler, SQLEXPR_CHS.EXE, 2017-6-19SQL statement exercise. SQL
(tools and software are all from the Internet)
I read a blog and wanted to practice http://www.cnblogs.com/zhaimiaoer/p/5426611.html.
When executing the query, his table name is lowercase. When creating the table, pay attention to the uppercase exercise!
The database uses windows login without password practice.
First, the design of the database, the design of the software! Link to the database for practice!
Student table (Student), curriculum schedule (Course), transcript table (Score) teacher information table (Teacher)
Table (1) Student (student form)
Attribute name
Data type
Can it be empty?
Implied meaning
Sno
Char (3)
No
Student number (main code)
Sname
Char (8)
No
Student name
Ssex
Char (2)
No
Student gender
Sbirthday
Datetime
But
Date of birth of the student
Class
Char (5)
But
The class of the students
Table (2) Course (course schedule)
Attribute name
Data type
Can it be empty?
Implied meaning
Cno
Char (5)
No
Course number (main code)
Cname
Varchar (10)
No
Course name
Tno
Char (3)
No
Faculty number (external code)
Table (3) Score (score sheet)
Attribute name
Data type
Can it be empty?
Implied meaning
Sno
Char (3)
No
Student number (external code)
Cno
Char (5)
No
Course number (external code)
Degree
Decimal (4Jing 1)
But
Achievement
Master code: Sno+ Cno
Table (4) Teacher (teacher's list)
Attribute name
Data type
Can it be empty?
Implied meaning
Tno
Char (3)
No
Faculty number (master code)
Tname
Char (4)
No
Name of teaching staff
Tsex
Char (2)
No
Gender of teaching staff
Tbirthday
Datetime
But
Date of birth of the faculty
Prof
Char (6)
But
Professional title
Depart
Varchar (10)
No
Faculty department
Table 1-2 data in the database
Table 1 Student
Sno
Sname
Ssex
Sbirthday
Class
one hundred and eight
Zeng Hua
Male
1977-09-01
95033
one hundred and five
Kuang Ming
Male
1975-10-02
95031
one hundred and seven
Wang Li
Female
1976-01-23
95033
one hundred and one
Li Jun
Male
1976-02-20
95033
one hundred and nine
Wang Fang
Female
1975-02-10
95031
one hundred and three
Lu Jun
Male
1974-06-03
95031
Table (2) Course
Cno
Cname
Tno
3-105
Introduction to computer
eight hundred and twenty five
3-245
Operating system
eight hundred and four
6-166
Digital circuit
eight hundred and fifty six
9-888
Higher mathematics
eight hundred and thirty one
Table (3) Score
Sno
Cno
Degree
one hundred and three
3-245
eighty-six
one hundred and five
3-245
seventy-five
one hundred and nine
3-245
sixty-eight
one hundred and three
3-105
ninety-two
one hundred and five
3-105
eighty-eight
one hundred and nine
3-105
seventy-six
one hundred and one
3-105
sixty-four
one hundred and seven
3-105
ninety-one
one hundred and eight
3-105
seventy-eight
one hundred and one
6-166
eighty-five
one hundred and seven
6-166
seventy-nine
one hundred and eight
6-166
eighty-one
Table (4) Teacher
Tno
Tname
Tsex
Tbirthday
Prof
Depart
eight hundred and four
Li Cheng
Male
1958-12-02
Associate professor
Department of computer Science
eight hundred and fifty six
Zhang Xu
Male
1969-03-12
Lecturer
Department of Electronic Engineering
eight hundred and twenty five
Wang Ping
Female
1972-05-05
Teaching assistant
Department of computer Science
eight hundred and thirty one
Liu Bing
Female
1977-08-14
Teaching assistant
Department of Electronic Engineering
1. First use NavicatDataModeler to design the details of the existing requirements and add foreign keys.
Export 2017-6-19SQL statement exercise. SQL
2. Import the table relationships and table structure we generated by using Navicat Premium
Because of the foreign key, pay attention to which command to execute first.
Blog for the first time, make a little progress. Move forward little by little!
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: 256
*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
[root@node3 ~] # yum-y install xorg-x11-xauth
© 2024 shulou.com SLNews company. All rights reserved.