0% found this document useful (0 votes)
30 views5 pages

SV210 Test2 - Arifeto Ivan Tanaka (R193649Z)

The document discusses the differences between a database and a database management system, highlighting that a database is an organized collection of data while a DBMS is software that manages this data. It also outlines five advantages of using a database, including data security, concurrent use, and backup functions. Additionally, it provides examples of relational table properties and schemas for a student database, along with SQL queries for employee data management.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views5 pages

SV210 Test2 - Arifeto Ivan Tanaka (R193649Z)

The document discusses the differences between a database and a database management system, highlighting that a database is an organized collection of data while a DBMS is software that manages this data. It also outlines five advantages of using a database, including data security, concurrent use, and backup functions. Additionally, it provides examples of relational table properties and schemas for a student database, along with SQL queries for employee data management.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 5

NAME : ARIFETO IVAN TANAKA

REG_NUMBER : R193649Z

COURSE CODE : SV210 (TEST 2)

LECTURER : MR TOGAREPI
1. Differentiate between a database and a database management system.[6]

A database is an organized collection of structured information that is typically stored computer


system or other type of hardware that is easily accessible in various ways. A database is
structured in a manner such that the relationships which exist between different items or sets of
data are explicit. Types of databases include relational as well as object oriented databases. On
the other hand, a database management system is a computer program or other piece of software
that allows one to access, interact with, and manipulate a database. Database management system
facilitates oversight and control of databases, enabling administrative operations such as
performance monitoring, tuning, backups and recoveries and many other operations. A database
management system is a software that allows users to set up, use and maintain databases through
fast queries.

2. List and explain 5 advantages of using a database.[10]

 Facilitates concurrent use

It implies many users can access same data at the same time.

 Provides data security

This implies that only authorized users can access the database only after providing a valid
username and password. Unauthorized users are locked out of the system and are not allowed to
access the data thus making the database more secure.

 Enables data sharing

This implies a database makes it possible for many users to access the data in the database all at
once through the database management system thus users can share the data with various levels
of access and control on the database through the use of views.

 Provides backup and recovery functions for data

This implies that databases allow for the backup of data either online on the cloud or locally on
backup storage drives and can ensure data is easily recovered when data loss due to incidences
occur or when systems crash and backup systems need access to the database.
 Reduces data redundancy

This means that databases allows for the check of duplicate records throughout the entire
database enabling the removal of duplicate data in the database ensuring that the data is not
redundant and also saving on storage space used up by the redundant records.

 Mantains data consistency and correctness

This means that all data appears consistent throughout the database and the data is same for all
the users viewing the database and any changes made to the database are immediately reflected
to all the users and there is no data inconsistency.

3. List 5 properties of a relational tables. [5]

 Values are atomic.

 Column values are of the same kind.

 Each row is unique.

 The sequence of columns is insignificant.

 The sequence of rows is insignificant.

 Each column has a unique name.

4. The department of Geomatics Engineering is designing a student database. You have


been tasked to assist in the design of the database by designing the schemas of the student
details table and the course records. Give an example of how you will present the two
schemas above.
[6]

Student_Details (student_ID:text, student_name:text, surname:text, level:double, gender:char,


address text)

Course_Records (Reg_Number:text, course_Code:text, Course_Name:text)

5. Give an example of the relation instances for the two schemas you produced in question 4 [6]
Student_ID name surname level address

R193649Z IVAN TANAKA ARIFETO 2.2 3224 Mapako


Suburb, Murewa

Reg_number Course_code Course_name

R193649Z SV210 Information Technology and


Programming

6. Given the Employee table below:

(a) Write a query to show all female employees earning more than $35 000. [2]

SELECT *

FROM Employee

WHERE SALARY>3500 and sex= F

(b) Write a query showing all employees who do not have a supervisor. (SUPERSSN is the
supervisor id). [2]

SELECT *

FROM Employee

WHERE Superssn IS NULL

(c) Write a query to show all male employees earning more than $35 000 and are
supervisors. [6]
SELECT *

FROM Employee

WHERE SEX=M AND SALARY>35000 AND Superssn IS NULL

You might also like