DBMS Assignment Kartik Dua 2023UCM2340
DBMS Assignment Kartik Dua 2023UCM2340
ASSIGNMENT
___
TANISH
2023UCM2379
DBMS ASSIGNMENT
Kartik Dua
2023UCM2340
2
1. Run the installer: After downloading, double-click the XAMPP installer file to start the
installation process.
2. User Account Control (Windows only): If prompted by the User Account Control
(UAC), click "Yes" to allow the installer to make changes to your device.
3. Select components: In the setup wizard, you'll be asked to select the components you
want to install. For a basic setup, you can select Apache, MySQL, PHP, and
phpMyAdmin.
4. Choose installation directory: Select the directory where you want to install XAMPP.
The default is usually C:\xampp.
3
5. Start the installation: Click "Next" to begin the installation process. Wait for the
installation to complete.
6. Complete the setup: Once the installation is complete, you can choose to start the
XAMPP Control Panel immediately by checking the box and clicking "Finish."
1. Open XAMPP Control Panel: If it's not already open, launch the XAMPP Control Panel
from the Start menu or your chosen directory.
2. Start Apache and MySQL: In the XAMPP Control Panel, click the "Start" button next to
Apache and MySQL to start the web server and database server.
○ If the services start successfully, their status will change to "Running," and the
"Stop" button will become active.
○ If there are issues, check for error messages, such as port conflicts (usually with
port 80 for Apache). You may need to change the port settings in the
httpd.conf file
4
CREATION OF DATABASE
1. Access the Databases tab: Once inside phpMyAdmin, click on the "Databases" tab at
the top.
2. Enter the database name: In the "Create database" section, you'll see a field to enter
the name of your new database. Enter the name “COCS0302”.
3. Create the database: Click the "Create" button to create your new database.
1. Select your database: After the database is created, you will be taken to the database
structure page. If not, you can click on the database name listed on the left sidebar.
2. Create a table: In the "Create table" section, enter a name for your table and the
number of columns you need, then click "Go".
3. Define table structure: On the next page, you will define the structure of your table by
specifying:
○ Column Name: The name of each column .
○ Data Type: The type of data each column will hold.
6
METHOD 1:
1. Select the table: On the left sidebar, click on the table you just created.
2. Insert data: Click on the "Insert" tab at the top of the table page.
3. Enter data: Fill in the fields with the data you want to insert into the table.
4. Execute the insert: Click "Go" to insert the data into the table.
METHOD 2:
1. Organize your data: Make sure your Excel sheet is well-organized, with the first row
containing the column headers that match the fields in your MySQL table.
2. Save as CSV: Save your Excel file as a CSV file:
○ Go to File > Save As.
○ Choose CSV (Comma delimited) (*.csv) from the file type dropdown.
○ Save the file.
8
SAILORS
BOATS
9
RESERVES
CREATED TABLES
SAILORS
BOATS
13
RESERVES
14
2) Use the create relationship mode in the designers menu of the database. Add foreign key
and reference key.
16