employee management system bhaneko management of employee
Explain normal forms with simple example?
Normal Forms
First Normal Form: Every field of the table must be atomic(indivisible)i.e there must be no composite or multivalued fields.Eg.Consider a table Employee such that it has 5 fields Name,Age,Sex,TelephoneNo,we represent it as
Employee(EmpNo,Name,Age,Sex,Tno).
Empno Name Age Sex Tno
1001 A 24 M 234567,678901
1002 B 25 F 123456
Clearly, the above table is not in 1NF as the field Tno may contain more than one values because each employee may have more than one Telephones.
To make it in 1NF,however, we can do some improvisations,
First Improvisation
Add an extra field "Tno2", our table Employee now looks like Employee(EmpNo,Name,Age,Sex,Tno1,Tno2)
Second Improvisation
Repeate the remaining field values for each Telephone value
Empno Name Age Sex Tno
1001 A 24 M 234567
1001 A 24 M 678901
1002 B 25 F 123456
As you can see both these improvisations have added extra information storage overhead with them. So the most recommended one is the DECOMPOSITION.
Here we will Decompose our erroneous table into more tables.
Employee1(EmpNo,Name,Age,Sex)
Employee2(EmpNo,Tno1,Tno2)
Now our tables will look like this
Employee1
Empno Name Age Sex
1001 A 24 M
1002 B 25 F
Employee2
Empno Tno1 Tno2
1001
What is the latest version of MySQL?
The latest versions of MySQL are:
Stable:
MySQL 5: version 5.1.48 (2 June 2010)
Preview Release:
MySQL 5: version 5.5.4 (9 April 2010)
Does comcast ISP provide web hosting with its basic service?
Yes
You would need to go to their website intro page for more information.
My ISP is comcast so I don't know if you get a different page if you're not (i.e. the page I see has a 'start now' button).
If not, try searching for "comcast personal web host" and you will get the link I used before being redirected to the above page.
How retrieve xml data using php?
Ypu can use file handling function to read XML
file_get_contents()
file()
fopen()
Use SimpleXML Library
simplexml_load_string - Interprets a string of XML into an object
simplexml_load_file - Interprets an XML file into an object
How do you make a loop radio buttons that saves to database?
Radio Buttons allow only one value between them. For eg. Male or Female. So there is no point in declaring a loop for it. You could store the value like any other form elements. If you declare different names for radio buttons then & then only use this:
Orange
Apple
Grapes
File: action.php
if(isset($_POST['submit']))
{
if(isset($_POST['radio1']))
{
$value1 = $_POST['radio1'];
}
else
{
$value1 = "";
}
if(isset($_POST['radio2']))
{
$value2 = $_POST['radio2'];
}
else
{
$value2 = "";
}
if(isset($_POST['radio3']))
{
$value3 = $_POST['radio3'];
}
else
{
$value3 = "";
}
$value = $value1." ".$value2." ".$value3;
// Store the $value in database
}
?>
Ideally a checkbox is better suited to have multiple values
Explain the difference between a weak and a strong entity set?
An entity set that does not possess sufficient attributes to form a primary key is called a weak entity set. One that does have a primary key is called a strong entity set.
The discriminator (or partial key) of a weak entity set is the set of attributes that distinguishes among all the entities of a weak entity set
The existence of a weak entity set depends on the existence of a identifying entity set. It must relate to the identifying entity set via a total, one-to-many relationship set from the identifying to the weak entity set
We depict a weak entity set by double rectangles in E-R diagram. We underline the discriminator of a weak entity set with a dashed line in E-R diagram.
How do you validate and retrieve data from database?
How do you validate and retrieve data from database?" How do you validate and retrieve data from database?"
What are the problems occur in a manual library system?
· Data duplication can be occurred by repeating the same thing over and over.
· Lack of security
· Lack of storage common errors.
· Too much paper wastage.Paper takes up a massive amount of room in the site. If a computer system was bought the paper could all go and there would lots more free space which could be used for other purposes.
· Poor Data Storage - All the data is stored in filing cabinets. Data could be misplaced due to human error. Data could be stolen very easily.
· Unavailability of Information
· Slow Retrieval of Data - The information is stored in different parts and takes a long time to retrieve the data.
· In a manual library system if you are not able to find a book of your choice have to spend a lot of time and effort in trying to find a particular book.
· Manual systems are also slow to operate. Instead of using a computer to issue and take back books, locating and updating a card index is slow and laborious
· With manual systems staff spends a lot of their time on mechanical, clerical tasks rather than liaising with library visitors.
· Librarians find it difficult to offer a wider range of new services with a manual library system. For example, a library can put its catalog on the Web allowing readers to access it remotely; with a manual system members have to visit or telephone the library to find this information.
· Not more than one person can access data at the same time but in Computerized Information system many people can access the same data on the same time through networking.
· Time consuming
· It results in need of lot of space to keep the data.
· Possibility of data duplication as there's no repetition check like in computer software's e.g. Microsoft Access.
· Often the books are lost and the librarian is not aware of this.
· No proper records for the workers, members and books transaction.
· If manual record book is lost data will be completely lost.
· Lots of Manual labor is required for record keeping.
· Many a times duplication occurs as workers are find it hard to keep track in the bundles of registers.
· Data is not always reliable as it is hand written and some human errors might have occurred example wrong telephone number.
MySQL new install asks for current password in Windows XP?
It's picking up an old password from c:\documents and settings\all users\application data\mysql
This may be a hidden folder...unhide it..
The uninstall doesn't remove this directory. Your old password is there, so if you want to re-install w/ a new password, you either need to reset or remove this data directory)
What are two method of retrieving SQL?
1.what cursor type do you use to retrieve multiple recordsets?
2.What are two methods of retrieving SQL?
Triggers are an action that is performed is a condition is met within the code. In this example, "TRIG56" will perform this action: After a row is inserted into TABLEZZZ, if the row is <=50 then
insert the same row into TABLEYYY. If the condition/value is not
met, the row will not be inserted.
You can do a "BEFORE" trigger also. Triggers are code that must be compiled. You can also "disable" a trigger if you are doing an import into the tables for faster insertion. However, the inserts will have to be done into both tables because TABLEYYY will not be populated from the trigger because it is disabled. CREATE TRIGGER trig56 AFTER INSERT ON tableZZZ REFERENCING NEW AS insertedRow FOR EACH ROW WHEN (insertedRow.a <= 50) BEGIN INSERT INTO tableYYY VALUES(:insertedRow.b, :insertedRow.a); END trig56; . run;
Trigger is a statement that excute automatically as a side effect of modification to the database.
A trigger is defined for and connected to a RDBMS table. A trigger can be defined to do a particular job (typically insert audit records in another table or perform some validations) whenever the original table (on which the trigger is created) is selected or inserted, updated or deleted. A trigger is used to ensure that certain jobs are automatically done when a predefined event occurs. Both the event and the resultant action typically happen within the database.
A trigger is a set of statements that gets executed implicitly or automatically whenever any one of the following operation takes place on the table for which trigger has been created :
1. Inserting record(s) to the table
2. Deleting record(s) from the table
3. Updating the table
The operation on which trigger gets executed and the work performed at that time depends on the statements written in the trigger.
What does it mean to qualify a field name?
A field is the name given to the column or attribute. A field name cannot be empty and also it cannot be an identifier. Example in a table stud there are fields like Fname, Lname, Rollno etc
A fully qualified field name in simple terms is the table name in which the field resides and the field name. As an example we have a table called Customers and a field FirstName Within a query you cold point to or declare the field name as simply FirstName. Now if you are joining a couple of tables and each has the field name FirstName you would need to fully qualify the field so that the database would know from which table you wanted the FirstName data. So in this example lets say we have the tables Customers and Employee. Within the Customers table we have a EmployeeID field that ties an employee (maybe the employee that entered the customer) to the customer. Now in a query you want to display the Customer's first name. In this case you would need to specify the table name WITH the field name in order to present a result. Example: Customers.FirstName or Employee.FirstName You could further qualify the field by including the database names as well. This is NOT common however if you are using multiple databases in a query then you would need to.
How do you create a table in dreamweaver?
using the mysql command "create table table_name" we can create a table in dreamweaver.
How do you insert files into a database using PHP?
Im not entirely sure what you mean. But say you have some text you want to save and load later on... you can put it into a database (e.g. MySQL) or even better a flat file database (e.g. a simple text file). Say for example you have a chatbox. And you want to save the text into a .txt file so u can load it later on using php as well. However if you want to save important data (e.g. passwords credit card information) then i would recommend using a proper database like phpMyAdmin. If u need to no more just send an email to wasim-ilyas@hotmail.co.uk (my email address). Thanks,
Wasim Ilyas
Is it faster to read and write a csv or sqlite file?
The answer to this question really depends on the data base engine (that is the server software) being used to store the information. If, for instance, you are using MS SQL as the engine, it will naturally write all it's information into a SQL file, or the engine will be used to write into a stand-alone SQLLite file (where no actual server software is running).
In any case, most database engines will write to their own native files to help minimize read/write times. This is because CSV files are both a blessing and a curse. They are universal ASCII Comma Separated Value files that can be read by anything - even Notepad. This makes them easily transferrable from any system to another. However, they pretty much have to be read AND written to in SEQUENTIAL order. In a database containing a few thousand records, that could be a long Update execution time.
In summary, it is extremely faster for a database engine to use it's native file format. However, CSV's are mainly for import/export purposes and transferring data from one system to another.
A database query is a piece of code (a query) that is sent to a database in order to get information back from the database. It is used as the way of retriving the information from database
A database "query" is basically a "question" that you ask the database. The results of the query is the information that is returned by the database management system. Queries are usually constructed using SQL (structured query language) which resembles a high-level programming language.
The term 'query' means to search, to question, or to find. When you query a database, your searching for information in the database. Different query languages exist for different type of databases. MS Access uses SQL, which stands for Structured Query Language. MS Access contains Tables, Forms, and Queries. The Forms are used to enter or display the data, the Tables are where the data is saved, and the queries are used to search for specific data.
An example of an query can be this:
SELECT DISTINCT Agent FROM QAMonitoring ORDER BY Agent;
The query searches the 'Agent' field from the QAMonitoring table and sorts the list by last name. There are plenty of MS Access DB forums on the net for more info and help.
Creating a Simple Query in Microsoft AccessHave you ever wanted to combine information from multiple tables in your database in an efficient manner? Microsoft Access offers a powerful query function with an easy-to-learn interface that makes it a snap to extract exactly the information you need from your database. In this tutorial we'll explore the creation of a simple query.
In this example, as with all of our Access tutorials, we will use Access 2000 and the Northwind sample database included on the installation CD-ROM. If you're using an earlier version of Access, you may find that some of the menu choices and wizard screens are slightly different. However, the same basic principles apply to all versions of Access (as well as most database systems).
Let's explore the process step-by-step. Our goal in this tutorial is to create a query listing the names of all of our company's products, current inventory levels and the name and phone number of each product's supplier.
1. Open your database. If you haven't already installed the Northwind sample database, these instructions will assist you. Otherwise, go to the File tab, select Open and locate the Northwind database on your computer.
2. Select the queries tab. This will bring up a listing of the existing queries that Microsoft included in the sample database along with two options to create new queries.
3. Double-click on "create query by using wizard". The query wizard simplifies the creation of new queries. We'll use it in this tutorial to introduce the concept of query creation. In later tutorials we'll examine the Design view which facilitates the creation of more sophisticated queries.