Download Ch01 - Introduction - Managing Student Type Info

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Chapter 1
Introduction Managing Student Type
Information
Slide 1
Content
I. Managing Student Type Information Problem
II. Solution
Slide 2
I. Managing Student Type Information Problem
 At SaigonTech, there are three types of students: urban, suburb,
province.
 Each student type has its amount of discount fee, the urban
student will be discounted 0% of tuition, the suburb student is
5% and the province student is 10%.
 SaigonTech college wants to store all information about its
student types.
Student Type
Discount
Urban
0%
The urban student is not discounted.
Suburb
5%
The suburb student is discounted 5% of tuition.
Province
10%
The province student is discounted 10% of tuition.
Slide 3
Notes
II. Solution
1. Logical Design
2. Physical Design
3. Implementation
Slide 4
1. Logical Design
Slide 5
2. Physical Design
Slide 6
3. Implementation
3.1 Using GUI mode
3.2 Using Console mode
Slide 7
3.1 Using GUI mode
3.1.1 Creating Database
3.1.2 Creating Table
3.1.3 Inserting Data
3.1.4 Testing – Checking the inserted data
Slide 8
3.1.1 Creating Database
Create a database named STUDENT_INFO
 Right click on Databases group in the Object Explorer panel  Choose New
Database
 Database Name: STUDENT_INFO
Slide 9
3.1.2 Creating Table
3.1.2.1 Creating a new table
3.1.2.2 Creating Columns
3.1.2.3 Setting data type
3.1.2.4 Setting primary key
Slide 10
3.1.2.1 Creating a new table
Create a table named STUDENT_TYPE
 Right click on the Tables group  Choose New Table
 In the Properties panel, type the table name: STUDENT_TYPE
Slide 11
3.1.2.2 Creating Columns
Create columns for table STUDENT_TYPE: STUDENT_TYPE_ID,
STUDENT_TYPE_NAME, DISCOUNT, NOTES.
Slide 12
3.1.2.3 Setting data type
Choose appropriate data type for each column:
STUDENT_TYPE_ID: int; STUDENT_TYPE_NAME: varchar(50);
DISCOUNT: numeric(18,2); NOTES: text.
Slide 13
3.1.2.4 Setting primary key
Click on the Set Primary Key button
Slide 14
3.1.3 Inserting Data
3.1.3.1 Opening Table
3.1.3.2 Inserting Data
Slide 15
3.1.3.1 Opening Table
Right click on the STUDENT_TYPE table  Choose Open
Table
Slide 16
3.1.3.2 Inserting Data
Insert Data
Here
Slide 17
3.1.4 Testing – Checking the inserted data
Open the STUDENT_TYPE table again to check data
Slide 18
3.2 Using Console mode
3.2.1 Creating a new query tab
3.2.2 Creating database
3.2.3 Creating table
3.2.4 Inserting data
3.2.5 Testing – Checking the inserted data
Slide 19
3.2.1 Creating a new query tab
 Click on the New Query button
Slide 20
3.2.2 Creating database
 Use database master and SQL command:
Create database STUDENT_INFO
Slide 21
3.2.3 Creating table
CREATE TABLE STUDENT_TYPE (
STUDENT_TYPE_ID
int
NOT NULL,
SUTDENT_TYPE_NAME varchar(50)
NULL,
DISCOUNT
numeric(18,2)
NULL,
NOTES
text
NULL,
CONSTRAINT STUDENT_TYPEPK PRIMARY KEY
(STUDENT_TYPE_ID);
Slide 22
3.2.4 Inserting data
INSERT INTO STUDENT_TYPE
(STUDENT_TYPE_ID, STUDENT_TYPE_NAME, DISCOUNT,
NOTES)
VALUES (1, ‘Urban’, 0, ‘The urban student is not discounted.’);
INSERT INTO STUDENT_TYPE
(STUDENT_TYPE_ID, STUDENT_TYPE_NAME, DISCOUNT,
NOTES)
VALUES (2, ‘Suburb’, 0.05, ‘The suburb student is discounted 5% of
tuition.’);
INSERT INTO STUDENT_TYPE
(STUDENT_TYPE_ID, STUDENT_TYPE_NAME, DISCOUNT,
NOTES)
VALUES (3, ‘Province’, 0.1, ‘The province student is discounted
10% of tuition.’);
Slide 23
3.2.5 Testing – Checking the inserted data
Select * from STUDENT_TYPE
Slide 24
Slide 25
Related documents