Join Regular Classroom : Visit ClassroomTech

PHP and MySQL

Mostly Asked Project Questions on PHP

1. What is your project topic?
Ans. Tell your Project Topic in brief in two or three lines.

2. Why your project is unique from others?
Ans. It is a very common question in most of the interviews. Mind it, the interviewer is focusing on listening to some different features that are exactly new in your project.

3. Why you choose this topic?
Ans. This project is fully based on PHP and I have done this project to build up my concept about database and PHP. [ You can add some points also here.]

4. Which programming languages are used?
Ans. HTML, CSS, PHP, JavaScript

5. How many types of users are involved?
Ans. Two types. User, Admin

6. Is there any backend part of your project?
Ans. Yes

7. In which role you play in your project?
Ans. Database Designer and Sometimes I also have to tackle the front-end part of the project.

8. How to connect the database?
Ans.
$connect=mysql_connect(“localhost”,”root”,””);
mysql_select_db(“database_name”,$connect);// connect database

9. Which server site language you have used?
Ans. PHP

10. What is the full form of PHP?
Ans. Personal Home Page

11. Do you know any other server site language?
Ans. JSP

12. How many tables you have created in your project?
Ans. Mention it properly and explain also which tables are created and for what.

13. What is data and database?
Ans. Data is made up of small facts and information without context.
A database is an organized collection of related information.

14. What is DBMS and RDBMS?
Ans. Database Management System (DBMS) is a software for storing and retrieving users’
data while considering appropriate security measures. It consists of a group of programs
that manipulate the database.
RDBMS stands for Relational Database Management Systems.
All modern database management systems like SQL, MS SQL Server, IBM DB2, ORACLE, My-
SQL and Microsoft Access are based on RDBMS.

15. How to create a table in code?
Ans. CREATE TABLE table_name (
column1 datatype,
column2 datatype,
column3 datatype,
….
);

16. What is the primary key?
Ans. The PRIMARY KEY constraint uniquely identifies each record in a table.
Primary keys must contain UNIQUE values, and cannot contain NULL values.

17. What is a foreign key/ reference key?
Ans. A FOREIGN KEY is a key used to link two tables together.
A FOREIGN KEY is a field (or collection of fields) in one table that refers to the PRIMARY KEY
in another table.

18. What is a unique key?
Ans. A unique key is a key that can uniquely identify the data row or tuple, but the basic
The difference between the primary key and the unique is, a unique key can be NULL, but the primary
key can’t be NULL.

19. Suppose you have created a column and by mistake the database was wrong. Then
how to change that mistake?
Ans. ALTER TABLE table_name
MODIFY COLUMN column_name datatype;

20. How to delete all the records?
Ans. DELETE FROM table_name;

21. How to insert a new record?
Ans. INSERT INTO table_name (column1, column2, column3, …)
VALUES (value1, value2, value3, …);

22. How to create a database?
Ans. CREATE DATABASE databasename;

23. How to backup a database?
Ans. BACKUP DATABASE databasename
TO DISK = ‘filepath’;

24. What is validation checking?
Ans. When using SQL, data validation is the aspect of a database that keeps data consistent.
The main types of constraints in SQL are check, unique, not null, and primary
constraints. Check constraints are used to make certain that a statement about the data is
true for all rows in a table.

25. What is stored attribute?
Ans. A stored attribute is an attribute that cannot be derived from other attributes while a
derived attribute is an attribute that can be obtained using another stored attribute. Thus,
this is the main difference between stored and derived attributes in DBMS.

26. Is there any admin control panel in your project?
Ans. Yes.

27. Activity of admin’s in your project?
Ans. In this project, admin can register new user and can also delete any user and ….

28. What is localhost? Why it is necessary?
Ans. The localhost is the default name describing the local computer address also known as
the loopback address. For example, typing: ping localhost would ping the local IP address of
127.0.0.1 (the loopback address). When setting up a web server or software on a web
server, 127.0.0.1 is used to point the software to the local machine.
Localhost is often used in Web scripting languages like PHP and ASP when defining what
server the code should run from or where a database is located.

29. What is a domain? What is a server? What is hosting?
Ans. A domain is a unique set of values permitted for an attribute in a table.
In computing, a server is a piece of computer hardware or software (computer program)
that provides functionality for other programs or devices, called “clients”.
This architecture is called the client-server model.
A web hosting service is a type of Internet hosting service that allows individuals and
organizations to make their website accessible via the World Wide Web.

30. What is the use of the session variable?
Ans. A session is a way to store information (in variables) to be used across multiple pages.
A session is started with the session_start() function.
Session variables are set with the PHP global variable: $_SESSION.

31. What is a cookie?
Ans. A cookie is often used to identify a user. A cookie is a small file that the server embeds
on the user’s computer. Each time the same computer requests a page with a browser, it
will send the cookie too. With PHP, we can both create and retrieve cookie values.

32. What is the utility of the Gannt chart?
Ans. A Gantt chart is used for showcasing timelines. It is a date/time-based chart that
allows plotting tasks with their exact start and end date/time. Milestones can also be
defined to assert how much of the project should be completed by when.

33. What is SDLC?
Ans. SOFTWARE DEVELOPMENT LIFECYCLE (SDLC) is a systematic process for building
software that ensures the quality and correctness of the software built.

34. Which model your project follows?
Ans. Spiral.

35. What is normalization? In which highest normal form your project supports?
Ans. In Relational Database design, normalization is the process for organizing data to
minimize redundancy. Normalization usually involves dividing a database into two or more
tables and defining the relationship between the tables.
3NF.