Presentation is loading. Please wait.

Presentation is loading. Please wait.

Slide 1 Chapter 01 Managing Student Type Information.

Similar presentations


Presentation on theme: "Slide 1 Chapter 01 Managing Student Type Information."— Presentation transcript:

1 Slide 1 Chapter 01 Managing Student Type Information

2 Slide 2 Content I. Managing Student Type Information Problem II. Solution

3 Slide 3  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 TypeDiscountNotes Urban0%The urban student is not discounted. Suburb5%The suburb student is discounted 5% of tuition. Province10%The province student is discounted 10% of tuition. I. Managing Student Type Information Problem

4 Slide 4 II. Solution 1. Logical Design 2. Physical Design 3. Implementation

5 Slide 5 1. Logical Design

6 Slide 6 2. Physical Design

7 Slide 7 3. Implementation 3.1 Using GUI mode 3.2 Using Console mode

8 Slide Using GUI mode Creating Database Creating Table Inserting Data Testing – Checking the inserted data

9 Slide 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

10 Slide Creating a new table Creating Columns Setting data type Setting primary key Creating Table

11 Slide 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

12 Slide 12 Create columns for table STUDENT_TYPE: STUDENT_TYPE_ID, STUDENT_TYPE_NAME, DISCOUNT, NOTES Creating Columns

13 Slide 13 Choose appropriate data type for each column: STUDENT_TYPE_ID: int; STUDENT_TYPE_NAME : varchar(50); DISCOUNT: numeric(18,2); NOTES: text Setting data type

14 Slide 14 Click on the Set Primary Key button Setting primary key

15 Slide Inserting Data Opening Table Inserting Data

16 Slide Opening Table Right click on the STUDENT_TYPE table  Choose Open Table

17 Slide Inserting Data Insert Data Here

18 Slide Testing – Checking the inserted data Open the STUDENT_TYPE table again to check data

19 Slide Using Console mode Creating a new query tab Creating database Creating table Inserting data Testing – Checking the inserted data

20 Slide Creating a new query tab  Click on the New Query button

21 Slide 21  Use database master and SQL command: Create database STUDENT_INFO Creating database

22 Slide 22 CREATE TABLE STUDENT_TYPE ( STUDENT_TYPE_IDint NOT NULL, SUTDENT_TYPE_NAMEvarchar(50) NULL, DISCOUNTnumeric(18,2) NULL, NOTEStext NULL, CONSTRAINT STUDENT_TYPEPK PRIMARY KEY (STUDENT_TYPE_ID); Creating table

23 Slide 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.’);

24 Slide Testing – Checking the inserted data Select * from STUDENT_TYPE

25 Slide 25


Download ppt "Slide 1 Chapter 01 Managing Student Type Information."

Similar presentations


Ads by Google