0% found this document useful (0 votes)
5 views11 pages

Labreport 5

The document is a lab report by student Trupti Panigrahi for the Database System course, detailing the creation of a Student Table with a primary key and the insertion of five records. It explains horizontal and vertical fragmentation techniques with SQL queries to create separate tables for students based on their department and to isolate specific columns. The report concludes that the script is fully functional and demonstrates both fragmentation methods.

Uploaded by

cap10gaming99
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views11 pages

Labreport 5

The document is a lab report by student Trupti Panigrahi for the Database System course, detailing the creation of a Student Table with a primary key and the insertion of five records. It explains horizontal and vertical fragmentation techniques with SQL queries to create separate tables for students based on their department and to isolate specific columns. The report concludes that the script is fully functional and demonstrates both fragmentation methods.

Uploaded by

cap10gaming99
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

STUDENT NAME TRUPTI PANIGRAHI

STUDENT REGISTRATION 242P4R2017 CLASS: MCA DS


NUMBER

STUDY LEVEL: UG/PG PG YEAR and TERM: 1st year & 1st term

SUBJECT NAME DATABASE SYSTEM

NAME OF THE LAB REPORT 05


ASSESSMENT

DATE OF SUBMISSION 10-01-2025

LAB REPORT-5

TASK :
Create Student Table with Student_ID primary key
name,department,marks.
Insert 5 records into the table .
Create Fragmentation table where department is CS and MCA.
STEP-1

In this Step,First I created student table by using primary key In MCA database, After that
Inserted 5 into the student table.

QUERY:

CREATE TABLE student (student_id INT PRIMARY KEY,name VARCHAR(25),department


VARCHAR(10),marks INT);

INSERT INTO student (student_id, name, department, marks) VALUES(101, 'ROB', 'CS', 80),
(102, 'SHYAM', 'CS', 70),(103, 'RAM', 'MCA', 78),(104, 'JOHN', 'CS', 85),(105, 'TOM', 'MCA', 80);

STEP-2

HORIZONTAL FRAGMENTATION:

Horizontal fragmentation refers to splitting a table into smaller tables (fragments) based on
rows rather than columns. The rows in each fragment are selected based on some condition,
often the values of one or more columns. This technique can improve performance by dividing
large datasets into smaller, more manageable pieces.

QUERY:

 The cs_students table contains all students who belong to the CS department
(department = 'CS').

CREATE TABLE cs_students AS SELECT * FROM student WHERE department = 'CS';


 The mca_students table contains all students who belong to the MCA department (department
= 'MCA').

CREATE TABLE mca_students AS SELECT * FROM student WHERE department = 'MCA';

VERTICAL FRAGMENTATION:

Vertical fragmentation involves splitting a table into multiple smaller tables, each containing a
subset of the columns. This is often done to improve performance or security by isolating
sensitive or less frequently accessed data.

QUERY:

 The student_info table contains student_id, name, and department.

CREATE TABLE student_details AS SELECT student_id, name, department FROM student;


 The student_marks table contains student_id and marks.

CREATE TABLE student_marks AS SELECT student_id, marks FROM student;

CONCLUSION:

This script is fully functional and covers both horizontal and vertical fragmentation.
.

You might also like