Lab 1
Lab 1
Tutorial 1
Topic: Introduction
A. Discussion
1. Discuss each of the following terms and provide AT LEAST THREE examples for
each term (do not use the example from the lecture):
a) Data
b) Field
c) Record
d) File
4. In your opinion, what is a file system? What are the limitations of file system that
lead to the evolution of database system?
5. Answer the following questions based on the file structure shown in Figure 3.
Figure 1
(i) How many records does the file contain? How many fields are there per record?
Please list the fields.
(ii) What problem would you encounter if you want to produce a listing by state? How
would you solve this problem by altering the file structure?
(iii) Data redundancy is a common problem in a file system. Do you observe such
problem in the file structure (see Figure 1)? Elaborate your answer.
Page 1 of 5
TDB1131 Database Systems
2. Click to download XAMPP according to the operating system that you have in your PC:
4. You will saw the Xampp icon at your program menu after the installation is
completed.
6. Click Start
6. Click Shell
Page 2 of 5
TDB1131 Database Systems
4. Type the following command, so that we move to the necessary folder (you should
arrive at c:\xampp\mysql\bin):
cd mysql
cd bin
5. In mysql, the default username is root without password. In DOS, type this:
6. It will ask you to enter password. However, we do not set password, just press ENTER.
You will see the following lines:
8. Let us try to create a simple database by using Structured Query Language (the language
for us to tell the database system what action it needs to perform).
Page 3 of 5
TDB1131 Database Systems
9. Let us try to create a simple table (for your information, SQL is not case sensitive):
('45612','Mohammed Hisham'),
13. Let us end the session. Just type EXIT. This will exit the Xampp program. Type another
EXIT, will close the command prompt. Now, let us select STOP for both Apache and
MySQL.
Page 4 of 5
TDB1131 Database Systems
C. Extra Activities
Extra exploration:
1. Whenever we create a table, we need to define the nature of each piece of
information that we want to store in database.
2. Go to Google, find the data types of database. List out 7 data types that you can
find. In your opinion, what are the common data types that database always used?
3. For example, I want to store students ID, students’ name, students’ email address,
students’ attendance, which day. What kind of datatypes should I assign to each
of this data?
When one door of happiness closes, another opens; but often we look so long at the
closed door that we do not see the one which has been opened for us. ~ Helen Keller
Page 5 of 5