Labreport 5
Labreport 5
STUDY LEVEL: UG/PG PG YEAR and TERM: 1st year & 1st term
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:
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').
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:
CONCLUSION:
This script is fully functional and covers both horizontal and vertical fragmentation.
.