Professional Documents
Culture Documents
Nieva BSIT 3B
Part I.
- For me I can say that Database Management will be harder to understand in the
future because a lot of update information that will be included in database
management will be implemented and as many as concept about database is added , it
will be hard to sink it or understand all of it.
- Weight
- Employee names
- Receipts
- Printed Documents
information.
- For me, Data are the facts that has been collected by the user and it is useless and
we can call it already a INFORMATION if it has been organized, processed and
structured to make it useful.
Jerson V. Nieva BSIT 3B
5.1 Identify one item of data that will be used by the company
- Employee names
- The data in employee names will be processed by the knowledge of both computer
and human and decision, then it will be sorted and organized and turn into
information.
A school is planning some outdoor activities for its students. The staff wants to
create a database of how parents can help. The secretary sets up the database table,
Question 1: What problems can you foresee in making good use of this information?
Suggest some better ways that this information could be stored.
- The problem is that the data (Names) are not sorted alphabetically based on
their last name, so one of the best way to store this easily is to sort first the Names
alphabetically.
Jerson V. Nieva BSIT 3B
Question 2: Suggest some better ways that this information could be stored.
- The table showed below is my idea to sort the information alphabetically based
on their Last Name. Storing it alphabetically can make the user not confused and make
the table organized.
TASK 2: Identification
Direction: Read and analyse the questions then supply with the best answer.
Jerson V. Nieva BSIT 3B
Across:
Down:
LP1 UNIT 2
Name: Jerson V. Nieva Instructor: Ms. Joanalyn A. Mabulac
Note: Use separate sheet/s (short bond paper) for your answers. This will be retrieved upon
completion.
Task 1
Direction: Consider the customer sales data of a furniture store below and
- Data values are what actually take place in the data variable set aside by the
data entities and all its attributes.
-3
3. What is a record?
Jerson V. Nieva BSIT 3B
4. How many records does the customer sales data of furniture store have?
- 10
8 | /13/06/2019/ | 3 | A_1
5. How many fields does the customer sales data of furniture store have? What
are those?
- 4
blank?
- 27
example/s.
-Domain constraint gets violated only when a given value to the attribute does not
appear in the corresponding domain or in case it is not of the appropriate datatype.
Assume that the domain constraint says that all the values you insert in the relation
should be greater than 10, and in case you insert a value less than 10 will cause you
violation of the domain constraint, so gets rejected.
Jerson V. Nieva BSIT 3B
Direction: Read the following statements and determine which is TRUE or FALSE.
TRUE 2. A NULL value is the same with that of a zero value or a field that contains
spaces.
FALSE 3. The AND, OR, and NOT are all range searching operators.
FALSE 4. Database Management Systems (DBMSes) can handle any amount of data,
FALSE 5. Database optimizers must generate execution plans that reflect the exact
itself.
TRUE 7. The execution of a query requires the DBMS to break down the query into a
manner.
products.
FALSE 9. Character data types are usually used for ID numbers such as student
numbers.
performed.
Jerson V. Nieva BSIT 3B
D 1. Which of the following terms does refer to the correctness and completeness
of the data in a database?
a. Data Security
c. Data Constraint
b. Data independence
d. Data Integrity.
columns.
b. Each table row(tuple) represents a single entity occurrence within the entity set.
A 3. A sports club needs to store information about each member. The individual
a. Field
b. File
c. Table
d. Record
a. Field
b. File
c. Table
Jerson V. Nieva BSIT 3B
B 5. A gym has a database with all their members they want to include email
addresses
a. Add a record
b. Add a field
c. Edit a record
d. Delete a field
D 6. A health club wants to find all the members who use the club 3 days or more a
week. What will they put in the query in the 'days' SQL query criteria?
a. >3
b. <3
c. <=3
d. >=3
B 7. What data type would be used to store the following item code: 0024?
a. Text
b. Integer
c. Real
d. Boolean
A 8. If I am placed between terms I will retrieve data that contain both of the terms.
a. And
b. Or
Jerson V. Nieva BSIT 3B
d. But
a. It specifies how many tables you will create when you convert your Entity
b. It specifies what type of data is expected inside of each column in a table (ef.
a. Whole numbers
b. Decimal numbers
c. Characters
d. Date
a. Fields are single pieces of information and records are a collection of data about a
b. Fields are where you put data, records are where you sort data
D 12. Which are the Boolean operators for less than, greater than and equal to?
a. \ / =
b. { } =
Jerson V. Nieva BSIT 3B
d. < > =
A 13. In what stage of query processing does the database server coordinates the
movement of the result set rows from the server cache to the client cache?
a. Fetching
b. Normalization
c. Parsing
d. Execution
C 14. You have a large collection of related data. You want to use a relational database
but
your group member wants to use a spreadsheet. Which of the following would you
spreadsheets?
d. Only one person can use the same database data at a time.
B 15. Louis will be using his database to support his new web-based trading card
shop.
The database will need to insert, update and delete information about his customers,
the trading cards he buys and sells and orders for the cards themselves. What
language will he use to access and modify the information in his database through
his website?
a. Java
b. SQL
Jerson V. Nieva BSIT 3B
d. C++
LP2 UNIT 3
TASK 1: Reflect
Directions: Write your answers on the space provided, you may use a separate paper if
necessary. Do not encode your answers, unless otherwise approved by your subject
instructor.
1. Why would you choose a database system instead of simply storing data in
operating system files? When would it make sense not to use a database system?
Database system is better than just simply storing data in operating system files.
The user can easily sort and organized data using database system. Database system is
more convenient in processing data. There is no reason not to use a database system
actually. But if you are going to store a large data then you have to use rational database
system.
2. The image below show a small portion of a database table recording information
about plants. Along with the botanical and common names of each plant, the developer
decides it would be convenient to keep information on the uses of plant. This is to help
prospective buyers decide whether a plant is appropriate for their requirements. Notice
that the table makes it extremely difficult to answer a question like “What plants are
Jerson V. Nieva BSIT 3B
Uses
USE 1
USE 2
USE 3
3 . Create a simple database that records the following information of ten students:
);
VALUES (‘3’ , ’Aeron Carl’ , ’Sea Wall’ , ’Male’ , ’June 3 2000 ‘ ;);
4 . What is the evaluation order for the Boolean operations (AND, OR) in an SQL
command? How can one be sure that the operators will work in the desired order
rather than in this prescribed order?
It must be true for both side to have a true result when we are going to use
AND , and it must have only one true to have a result of true when we are going to use
OR. Operators will work in the desired order because the user set it and if the user
ordered the condition correctly.
Direction: Read the following statements and determine which is TRUE or FALSE.
FALSE6. It is never possible to have a logical error in any of the SQL queries.
TRUE 9. It is possible to write the INSERT INTO statement in two forms. The first form
does not specify the column names where the data will be inserted, only their values.
The 2nd form specifies both the column names and values to be inserted.
A B Q T M S P W DX E F O L J Y R U K N H I C Z
4 14 3 20 2 24 10 1 8 2 2 1 1 2 2 9 1 1 6 1 1 1 7 2 1 5
2 6 1 6 3 2 5 9 3 7 1 5 8
DE LETE
INSERT INTO
USE STATEMENT
AND OR OPERATORS
SELECT
Jerson V. Nieva BSIT 3B
LP2 UNIT 4
TASK 1: Matching Type
Direction: Match the statement on the left with the correct answer on the right. You
may write your answer on the space provided before the number.
L. Vector aggregate
Direction: Using the given table below, perform the needed query and give the
-Alfred Zamora
1.3 Tarangnan.
-Aiko Calda Uy
(CustomerID, CustomerName,ContactName,Address,City,Postal,Country)
Values
(CustomerID, CustomerName,ContactName,Address,City,Postal,Country)
Values
(CustomerID, CustomerName,ContactName,Address,City,Postal,Country)
Jerson V. Nieva BSIT 3B
(CustomerID, CustomerName,ContactName,Address,City,Postal,Country)
Values
(CustomerID, CustomerName,ContactName,Address,City,Postal,Country)
Values
(CustomerID, CustomerName,ContactName,Address,City,Postal,Country)
Values
(CustomerID, CustomerName,ContactName,Address,City,Postal,Country)
Values
UPDATE customers
SELECT ContactName
FROM customers
ORDER BY ContactName;
5.1 a;
-Alfred Zamora
5.2 n;
6.1 ap;
None
6.3 ou.
-Aiko Calda Uy
8. Perform a code that can view customers starting from the 2nd line up to the 5 th
line. You may write two code that may perform the mentioned statement.
SELECT *
FROM customers
LP2 UNIT 5
TASK 1: Testing your understanding
Directions: Write your answers on the space provided, you may use a separate
The outer join used when we are going to match rows between tables. unmatched rows
in one or both tables can be returned.
2. Explain the following statement regarding SQL: A query that can be written using the
subquery approach can also be written using the joining approach, but not vice-versa.
While SQL*PLUS allows a subquery to return more than one column, most
systems allow pairwise joining of one and only one column in an inner query with one
column in an outer query. You can display data only from the table(s) referenced in the
outer query. If you want to include data from the subquery in the result, then you
would have to use the join technique because data from the subquery cannot be
Jerson V. Nieva BSIT 3B
Union clause can be used when there is a 2 or more result set Select statements to
be combined.
Alter modifies the structure of an existing table it can also be used to delete
columns and to add or drop integrity constraints on a table unlike the Truncate
command that deletes the data inside a table, but not the table itself.
Delete command and is used to remove records from a table whereas DROP is
used to remove named elements of schema like table, constraints or entire schema.
Direction: Read the questions carefully then choose the best answer. Write the answer
C 1. What type of join is needed when you wish to include rows that do not have
matching values?
a. Equi-join
b. Natural join
c. Outer join
values?
a. Equi-join
b. Natural join
c. Outer join
D 3. Which of the following statement is one of the basic approaches for joining tables?
a. Subqueries
b. Union Join
c. Natural Join
a. Union All
b. Cartesian Join
c. Outer Join
d. Natural Join
a. Combines the output from no more than two queries and must include the
c. Combines the output from multiple queries and must include the same
number of columns
d. Combines the output from multiple queries and does not include the same
number of columns
Direction: Read the questions carefully. Write T if the statement is TRUE and
T 1. The UNION clause is used to combine the output from multiple queries
F INNER JOIN2. The most frequently used relational operation, which brings together
data from two or more related tables into one resultant table, is
called an equi-join.
T 4. With the UNION clause, each query involved must output the same
F INNER QUERY & OUTER QUERY5. A correlated subquery is where the outer query
depends on data From the inner query.
Jerson V. Nieva BSIT 3B
LP3 UNIT 6
TASK 1: MULTIPLE CHOICE TEST
A 1. What is the SQL Query to delete all rows in a table without deleting the table
C 2. Which command is used for removing a table and all its data from the database?
a. Create command
d. All of these
d. All of these
C 5.
Which of these query will display the the table given above?
c. Select name
d. Select employee
C 6. Here which of the following displays the unique values of the column?
FROM instructor;
a. All
b. From
c. Distinct
d. Name
Jerson V. Nieva BSIT 3B
d. All of these.
A 8. The ______ clause allows us to select only those rows in the result relation of
a. Where, from
c. From, select
b. Select, from
d. From, where
C 9. The query given below will not give an error. Which one of the following has to
WHERE instructor;
a. Salary*1.1
b. ID
c. Where
d. Instructor
a. Salary, dept_id
c. Employee
c. Salary
D 12.
Which of the following employee_id will be displayed for the given query?
c. 1009, 1018
c. 1001
d. 1018
Jerson V. Nieva BSIT 3B
a. Table
b. Values
c. Relation
d. Field
a. Dept_name
b. Employee
c. “Comp Sci”
d. From
A 15.
SELECT name
FROM instructor
a.
SELECT name
FROM instructor
b.
SELECT name
Jerson V. Nieva BSIT 3B
c.
SELECT name
FROM employee
d.
SELECT name
FROM instructor
(employee_number,last_name,first_name,salary,dept_id)
VALUES (1005,’Cruz’,’Sandra’,58000,500);
2. Based on the suppliers table, delete the supplier record whose state is 'California'
and supplier_name is not Google. What would the table look like?
LP3 UNIT 7
c. There is redundancy.
inaccuracies.
a. It eliminates redundant data which in turn saves space and reduces manipulation
anomalies.
diagram?
a. M:N
b. 1:M
c. M:1
d. 1:1
C 5. Many users access many servers. Why is this statement not a good inclusion in an
ER
diagram?
d. It is syntactically incorrect.
a. Column
b. Cell
c. Row
d. Table
B 7. Which of the following is NOT required for a relational database to meet First
Normal Form?
a. No repeating attributes
d. None of these.
a. When all repeating entries of data are removed and the fields in each table are
directly related to the primary key and no fields are present that are not related to
each other.
b. When any repeating fields have been removed and the table is given a primary
key.
c. When all the fields in each table are directly related to the primary key.
d. None of these.
Jerson V. Nieva BSIT 3B
Consider Figure 7.12 of unnormalized data. Farms are visited and a number of
samples are taken from different fields. The number of each species (just Springtail
and Beetle for now) in each sample is recorded. A version of the data is shown in
Figure 7.12)
a. What are some of the updating problems that could occur with the
The problem that might occur in this data table is there’s only 1 ID in the 2 farm
Name , so in updating this one , deleting a row or updating or get some changes in the
table might possible be confusing to see or understand by the user.
data?
• FarmID → Visit? NO
• Visit → FarmID? NO
Jerson V. Nieva BSIT 3B