IS5413 Tutorial 08-Jiang Yuge-57972280
IS5413 Tutorial 08-Jiang Yuge-57972280
Throughout this course, we’ll use SQL Server 2014 to do the database application implementation.
You may download and install the SQL Server 2014 at home to practice more:
http://www.microsoft.com/sql/default.mspx
You should have received an email containing your SQL Server 2014 login name and password. Please
use them to login to the server for your upcoming tutorials and group project.
Start SQL Server by clicking Start Programs Microsoft SQL Server 2014
SQL Server Management Studio
In the prompt, enter the following details to login to the SQL Server 2014 hosted in TST:
You can expand the databases folder (named by your login ID) to locate your database and review the
details of the database objects in your database, e.g. tables, views, constraints, etc.
Let’s start writing our 1st query. Click on the New Query button on the top left corner.
After you clicked on the New Query button, you should see the query editor is opened. On the top left
corner, a pull down menu will show you the current database you are working on now. All the queries
you write will take effect on this database.
Now, please work on the following exercises.
For SQL reference, you may refer to: http://msdn2.microsoft.com/en-us/library/ms189826.aspx
After executing the SQL statements, you may need to refresh the Tables folder in order to see the newly
created tables. Your newly created tables should look like the following:
Exercise 2: Basic SELECT, INSERT, UPDATE and DELETE statements
Insert the following data into the corresponding table.
2. A new tab of table design interface as below will show up. You may specify attribute name, data
type and other characteristics here. Try create a table and delete it using an SQL query.
Exercise 2: DELETE and UPDATE
Insert a new course to the Course table: IS5740, Decision Support Systems, 3 credit points.
Delete course IS5740.
Update the status of the enrollments for course IS3232 from P to S.
insert into Course values ('IS5740', 'Decision Support Systems', 3);
If there’s still time left, the students may work on their own project databases.
Reference:
Modern Database Management, 10th Edition, Chapter 6
http://msdn2.microsoft.com/en-us/library/ms189826.aspx
- End of Tutorial 8 -