Uploaded by Its John

Explain five ro-WPS Office

advertisement
Explain five roles of a database administrator.
5Marks
A database is referred to as “an organized collection of logically related data.” What does “related data”
mean? Why must data be related?
2marks
Describe Five Potential benefits of the database approach.
5marks
Differences between conceptual schema, user view, and internal schema:
3marks
A company database needs to store information about employees (identified by ssn, with salary and
phone as attributes), departments (identified by dno, with dname and budget as attributes), and
children of employees (with name and age as attributes). Employees work in departments; each
department is managed by an employee; a child must be identified uniquely by name when the parent
(who is an employee; assume that only one parent works for the company) is known. We are not
interested in information about a child once the parent leaves the company. Draw an ER diagram that
captures this information.
5Marks
Explain the term normalization and explain the three normal forms.
4Marks
Study the relation below and answer the questions that follows.
Write an SQL statement to display the information required in table below
Produce a list of customers who come from Mexico.
2Marks
Produce list of customers whose Name starts with the letter “A”.
2Marks
Write an Sql statement to insert a record of your making into the customers table above.
2Marks
Roles of a database administrator:
Installing and configuring database software.
Monitoring database performance and optimizing it.
Backing up and restoring data to prevent data loss.
Managing user access and security.
Resolving database-related issues and providing technical support.
"Related data" in a database refers to information that is connected or linked in a meaningful way,
usually through common attributes or relationships. Data must be related to ensure that the database
can maintain data integrity, support efficient queries, and provide a structured representation of realworld entities and their associations.
Five potential benefits of the database approach are:
Data centralization and reduction of data redundancy.
Improved data integrity and consistency.
Enhanced data security and access control.
Efficient data retrieval and query processing.
Facilitates concurrent data access and multi-user support.
Differences between conceptual schema, user view, and internal schema:
Conceptual schema: Represents the overall logical view of the entire database and its organization
without implementation details. It describes the database structure and relationships at a high level.
User view: Refers to specific subsets of the database that are relevant to particular users or applications.
Each user view focuses on a particular perspective of the data, making it easier for users to work with
the database.
Internal schema: Describes the physical storage and implementation details of the database on the
storage media, including data structures and access methods.
ER diagram for the given database scenario:
(Note: As a text-based AI, I'm unable to draw diagrams here, but I can describe it.)
The ER diagram will include three entities: Employee, Department, and Child. Employee will have
attributes ssn, salary, and phone. Department will have attributes dno, dname, and budget. Child will
have attributes name and age. Employee and Department will have a one-to-many relationship based
on the employee's department. The Child entity will have a many-to-one relationship with the Employee
entity based on the employee being the parent.
Normalization is a database design process that organizes data in a structured way to reduce
redundancy and dependency, leading to better data integrity and efficiency. The three normal forms are:
First Normal Form (1NF): Eliminates repeating groups and ensures atomicity of data.
Second Normal Form (2NF): Removes partial dependencies by ensuring that non-key attributes depend
on the entire primary key.
Third Normal Form (3NF): Eliminates transitive dependencies by making sure that non-key attributes
depend only on the primary key and not on other non-key attributes.
SQL statement to display customers from Mexico:
sql
Copy code
SELECT * FROM customers WHERE Country = 'Mexico';
SQL statement to display customers whose names start with "A":
sql
Copy code
SELECT * FROM customers WHERE Name LIKE 'A%';
SQL statement to insert a new record into the customers table:
sql
Copy code
INSERT INTO customers (CustomerID, Name, Country, Email)
VALUES (101, 'John Doe', 'USA', 'john.doe@example.com');
Download