¶ … Database
In the United States, manual method had been the primary method to store employee data for several decades before the advent of information technology. However, analysis of manual method reveals that it is both time consuming and prone to errors. Moreover, manual method of keeping employees' data make organizations to incur enormous amount of financial resources. Manual method also requires large office space to store the paper. However, a rapid development of Information Technology has made increasing number of organizations globally to escalate from using manual data storage to database system because computer has advantages of maintaining consistence and accurate data. (Patrick, & Felix, 2013). Moreover, computer has the advantages of processing data rapidly with lowest costs and time. Different benefits database offers to organizations and employees. First, the database system is cost and time effective. Organizations can store and retrieve employee data at a fast rate. Moreover, the database is free from errors that are associated to manual data processing.
b. Design of the database (Tables, Queries, Forms, Reports)
The project suggests using MySQL to design and manage database. The Entity Relation Diagram will be used to design the database. The Entity relation diagram is a graphical relationships showing the relationships between entities. An entity refers to an object where data are stored. All the entities to store data are as follows:
employees
departments
dept_manager
dept_emp titles salaries.
The identification of the entities requires creating table for each entity to track employee data, and other data of departments, dept_manager, dept_emp, titles, and salaries.
TABLE employees emp_no
birth_date
first_name
last_name
gender hire_date
PRIMARY KEY (emp_no)
TABLE departments dept_no
dept_name
PRIMARY KEY (dept_no),
TABLE dept_
emp_no
dept_no
from_date
to_date
PRIMARY KEY (dept_no)
TABLE dept_emp
emp_no
dept_no
from_date
to_date
PRIMARY KEY (,dept_no)
TABLE titles emp_no
title from_date
to_date
PRIMARY KEY (emp_no)
TABLE salaries emp_no
salary from_date
to_date
PRIMARY KEY (emp_no)
Forms
The form will be integrated in the database, which allow the users to enter, modify and view records. Forms enhances data entry and assists in presenting data in an organized manner.
Queries
Queries assist in searching and compiling data from tables.
Reports
Reports present data in print, and the MySQL assists in creating report from table.
Prototype
The fig 1 reveals prototype of the ER (entity-relationship) model. The prototype also reveals the integration of primary key for each table.
Fig 1: Prototype of the Database
Coding
The following step converts tables into SQL statements, and the SQL statements are revealed below:
CREATE TABLE employees (
emp_ID INT NOT NULL,
date_of_birth DATE NOT NULL,
first_name VARCHAR (25) NOT NULL,
last name VARCHAR (25) NOT NULL,
gender ENUM ('F','M') NOT NULL,
employment_date DATE NOT NULL,
PRIMARY KEY (emp_ID)
CREATE TABLE departments (
dept_id CHAR (8) NOT NULL,
dept_name VARCHAR (50) NOT NULL,
PRIMARY KEY (dept_no),
UNIQUE KEY (dept_name)
CREATE TABLE dept_manager (
emp_id INT NOT NULL,
dept_id CHAR (8) NOT NULL,
from_date DATE NOT NULL,
to_date DATE NOT NULL,
FOREIGN KEY (emp_id)
CASCADE,
FOREIGN KEY (dept_no)
CASCADE,
PRIMARY KEY (dept_id)
CREATE TABLE dept_emp (
emp_id INT NOT NULL,
dept_id CHAR (8) NOT NULL,
from_date DATE NOT NULL,
to_date DATE NOT NULL,
FOREIGN KEY (emp_id)
CASCADE,
FOREIGN KEY (dept_id)
CASCADE,
PRIMARY KEY (dept_id)
CREATE TABLE titles (
emp_id INT NOT NULL,
title VARCHAR (40) NOT NULL,
from_date DATE NOT NULL,
to_date DATE,
FOREIGN KEY (emp_id)
CASCADE,
PRIMARY KEY (emp_id)
CREATE TABLE salaries (
emp_id INT NOT NULL,
salary INT NOT NULL,
from_date DATE NOT NULL,
to_date DATE NOT NULL,
FOREIGN KEY (emp_id)
CASCADE,
PRIMARY KEY (emp_id)
Testing
The paper will use series of queries and commands to test the database. For example, we can use SELECT command to test the database revealing as follows:
mysql> SELECT gender, emp_no, last_name, first_name,
-> FROM employees
-> LIMIT 12;
The output from the database will be as follows:
emp_no -- first_name -- last_name -- gender --
-- 10001 -- Facello -- Georgi -- M --
-- 10002 -- Bezalel -- Parto -- F --
-- 10003 -- Simmel -- Bamford -- M --
-- 10004 -- Chirstian -- Kyoichi -- M --
-- 10005 -- Koblick -- Maliniak -- M --
-- 10006 -- Tzvetan -- Preusig -- F --
-- 10007 -- Anneke -- Piveteau -- F --
-- 10008 -- Saniya -- Kalloufi -- M --
-- 10009 -- Peac -- Sumant -- F --
-- 10010 -- Zielinski -- Duangkaew -- F --
-- 10011 -- Bezalel -- Facello -- M --
-- 10012 -- Simmel -- Georgi -- F --
Additional test is as follows:
mysql> SELECT gender, emp_no, last_name, first_name,
-> FROM employees
ORDER BY first_name ASC
-> LIMIT 10;
The output from the database will be as follows:
-- emp_id -- first_name -- last_name -- gender --
-- 258641 -- Abelkader -- Anneke -- M --
-- 258005 -- Ademar -- Anneke -- F --
-- 455773 -- Aenilian -- Anneke -- M --
-- 436560 -- Alaga -- Anneke -- F --
-- 266651 -- Alepsander -- Anneke -- F --
-- 487598 -- Alexius -- Anneke -- M --
-- 216963 -- Alois -- Anneke -- M --
-- 15427 -- Aluyio -- Anneke -- M --
-- 100860 -- Amebile -- Anneke -- F --
-- 107070 -- Anastis -- Anneke -- M --
Additional test is as follows:
mysql> SELECT first_name, COUNT (emp_id) AS num_emp
-> FROM employees
-> GROUP BY first_name
-> ORDER BY nume_emp DESC
-> LIMIT 10;
The output from the database will be as follows:
-- first_name -- num_emp --
-- Gelosh -- 226 --
-- Baba -- 223 --
-- Sudbeck -- 223 --
-- Coorg -- 222 --
-- Adachi -- 222 --
-- Farris -- 221 --
-- Masada -- 220 --
-- Osgood -- 218...
Wal-Mart Social Responsibility Analysis: An Employee Perspective To begin the study "the purpose statement is "a statement that provides the major objective or intent, or "road map" to the study" (Creswell, 2009a, 104).Therefore, the purpose of this narrative is to discuss what employees at various Wal-Mart facilities around the Kansas City area have experienced regarding the social responsibility initiatives undertaken by the company. The method for this particular paper is a
Database Administrator for Department Store Scenario The department store has expanded in the local region by opening five more bookstores, and the bookstore has launched a series of marketing campaign to increase sales and attract new customers. The objective of this technical report is to develop a plan to create and maintain an enterprise-wide database system that will assist the bookstore to hold the inventory and sales data. The database design will
Database Modeling and Normalization Entity Relationship Model (ERM) Diagram is a data model used to describe the database in an abstract method. The relational database stores data in table. The entity in the database could point to several entries. For example, employee is an entity in the relationship database, and a diagram used to create the entity in the database is called entity-relationship diagrams or ER diagrams. (Silberschatz, Korth, 2006). Objective of
Databases and Data Management Every day, nurses health care practitioners challenged managing large quantities data information. Unless data information translated knowledge, meaningful . Databases data management techniques, designed effectively, present health care organizations Epic database is designed for large health care organizations. The database captures data related to patient care in a health care organization. The database facilitates patient registration, treatment scheduling, lab test results, radiology information, and billing. The database is
Design criteria exist at the levels of the technical, system integration aspects of the database to other systems through XML. This integration is critically important to ensure that the applications created can be effectively used over time and not have any scalability issues. There is also the need for designing the databases at the presentation layer to provide for scalability and flexibility of being able to create applications relatively quickly
Database Data Warehousing Design Data warehousing is a powerful tool that business organizations use to enhance competitive advantages. Data warehousing supports business decision by collecting, organizing and consolidating data for analysis and reporting using tools such as OLAP (online analytical processing ) and data mining. Typically, the relational database technology is generally being used to design a data warehousing and a relational database is a database having collection of tables, and
Our semester plans gives you unlimited, unrestricted access to our entire library of resources —writing tools, guides, example essays, tutorials, class notes, and more.
Get Started Now