Fahad
Fahad
REPORT
(27/07/2023 -30/08/2023)
SUBMITED BY:
TO:
Mukhtiyaar Pathan ENR NO:219960307016 [SEM:5]
ALKESH KABA
SR. SOFTWARE DEVLOPER
OF CREART SOLUTION
KHYATI SCHOOL OF ENGINEERING
DEPARTMENT OF COMPUTER ENGINIEERING
Topics :
• Introduction of django
• Features of django
• Pre-requirements of django
• Django steps
• Database connection
• Migrate command
• Create superuser
• What is XAMPP?
• Primary key
• Foreign key
• types Relationships
• MYSQL queries
• Crud operation
Features of Django
1) Versatile in Nature
2) Rapid Development
3) High Security
4) High Scalability
5) Better Performance
i. Core python
ii. HTML, CSS
iii. My SQL
Before django all 8 steps, go the xampp control panel and start Apache
& MySQL And create database, tables.
o What is XAMPP?
o XAMPP helps a local host or server to test its website and clients via computers
and laptops before releasing it to the main server. It is a platform that furnishes a
suitable environment to test and verify the working of projects based on Apache,
Perl, MySQL database, and PHP through the system of the host itself. Among
these technologies, Perl is a programming language used for web development,
PHP is a backend scripting language, and MariaDB is the most vividly used
database developed by MySQL.
o The detailed description of these components is given below .
Components of XAMPP
MY SQL
MySQL is a relational database management system, the database structure
is Organized into physical files optimized for speed. The logical data model, with
objects such as data tables, views, rows, and columns, offers a flexible programming
environment.
Primary key
The primary key constraint uniquely identifies each record in a table. Primary
keys must contain unique values and cannot null values. A table can have only one
primary key and, in the table, this primary key can consist of single or multiple
columns(fields)
Id is primary key and auto increment.
Foreign Key
One-to-One
Primary Key as Foreign Key, one way to implement a one-to-one
relationship in a database is to use the same primary key in both tables. Rows with
the same value in the primary key are related.
[ my-ve/myproject/myapp/models.py]
Output
One-to-many
A foreign key relationship could be one-to-one (a record in one table is linked
to one and only one record in another table) or one-to-many (a record in one table
is linked to multiple records in another table)
Output
Many-to-many
o Create a Table
CREATE TABLE table_name (
column1 datatype,
column2 datatype,
....
);
o Insert into table
o Update table
UPDATE table_name
SET column1= value1, column2=value2, …
WHERE condition;
o Delete table
o Select table
Or
CRUD operation
o First off to create table in your database,is shown
below:
Create operation.
o Create or add new entries in a table in the database. o Create the create.html
file In templates folder
o after the create html page, create function in views.py
o
Read operation
Delete operation
o Id 23 is deleted.
UPDATE operation
o update or edit existing entries in a table in the database o create the edit.html
file in template folder
o Create the function for UPDATE operation(views.py)
o Before the update table
Conclusion