Sei sulla pagina 1di 6

T. Y. B.

Tech semester: 6 Subject: PLCM


Name: Jay Kirdat Class: Mechanical Div. 2

Roll No: PB 51 Erp No: 1032221313

Experiment No: 3

Performed on:

Submitted on:

THEORY:
Data is a collection of facts and figures and we have humungous data available
to the users via the internet and other sources. To manipulate the data, Structured
Query Language (SQL) in short has been introduced years ago. There are
different versions of SQL available in the market provided by different
organizations. In this article, we shall see the version of SQL provided by
Microsoft.

Introduction:
1.Microsoft SQL Server or MS SQL Server for short is the query language
provided for data definition and manipulation.
2. SQL Server is a Relational Database Management Systems which was
developed and marketed by the Microsoft Company.
3. SQL and SQL servers are built as two layers where the SQL server is on the
top for interacting with the relational databases.
4. MS SQL Server also has T-SQL or Transact-SQL and the main focus of T-
SQL is to handle the transactions.
5. As it is a Microsoft’s developed system, it worked only on Microsoft’s
environment until it was made available on Linux platforms in the year 2016.
CODE:
CREATE DATABASE manufacturing_process;
USE manufacturing_process;
CREATE TABLE Machine1
(
id INT PRIMARY KEY,
MachineName VARCHAR(50),
ProductionRate VARCHAR(50),
Efficiency VARCHAR(50),
MaintenanceSchedule VARCHAR(50),
LeadTime VARCHAR(50),
InventoryManagement VARCHAR(50),
SafetyFeatures VARCHAR(100),
EnvironmentalImpact VARCHAR(100)
);
INSERT INTO Machine1 (id ,MachineName, ProductionRate, Efficiency,
MaintenanceSchedule,
LeadTime, InventoryManagement, SafetyFeatures, EnvironmentalImpact) VALUES
('1','Robotic Assembly Line', '1000 units/hour', '95%', 'Weekly maintenance', '1 day', 'Just-in-
time
inventory', 'Emergency stop systems', 'Energy-efficient materials'),
('2','CNC Milling Machine', '500 parts/hour', '90%', 'Monthly maintenance', '2 days', 'Kanban
system',
'Automatic tool changer, Machine enclosure', 'Low waste generation'),
('3','Injection Molding Press', '2000 units/hour', '85%', 'Quarterly maintenance', '3 days', 'Batch
production', 'Pressure sensors, Safety interlocks', 'Recyclable plastics'),
('4','Automated Welding System', '500 units/hour', '98%', 'Biannual maintenance', '4 days',
'First-in-first-out system', 'Emergency stop buttons, Safety guards', 'Noise reduction features'),
('5','Packaging Automation Machine', '1000 packs/hour', '95%', 'Monthly maintenance', '1 day',
'Vendor-managed
inventory', 'Automated fault detection, Tamper-proof seals', 'Biodegradable packaging
materials'),
('6','3D Printing System', '50 objects/hour', '90%', 'Weekly maintenance', '2 days', 'RFID
tracking system',
'Overheating protection, Filament recycling', 'Low VOC emissions'),
('7','Material Handling Robot', '2000 units/hour', '85%', 'Quarterly maintenance', '3 days',
'Inventory
turnover ratio', 'Collision avoidance systems, Load sensors', 'Energy-efficient operations'),
('8','Industrial Oven', '1000 units/hour', '98%', 'Biannual maintenance', '4 days', 'Just-in-time
inventory', 'Temperature control systems, Exhaust filters', 'Reduced energy consumption'),
('9','Metal Fabrication Press', '500 parts/hour', '95%', 'Monthly maintenance', '1 day',
'Batch production', 'Machine guarding, Emergency stop controls', 'Recyclable metal scraps'),
('10','Testing Automation System', '200 tests/hour', '90%', 'Weekly maintenance', '2 days',
'Supplier
collaboration', 'Calibration reminders, Automated data logging', 'Environmentally safe testing
processes');
SELECT * FROM Machine1;
CREATE TABLE Tools
(
ToolID INT PRIMARY KEY,
ToolName VARCHAR(50),
ProcessingPower VARCHAR(50),
MaterialCapacity VARCHAR(50),
OperatingSystem VARCHAR(50),
SecurityFeatures VARCHAR(100)
);
INSERT INTO Tools (ToolID, ToolName, ProcessingPower, MaterialCapacity,
OperatingSystem, SecurityFeatures) VALUES
('1','CNC Lathe', 'High', 'Metal', 'Windows-based interface', 'Access control, Data encryption'),
('2','Welding Robot', 'High', 'Steel', 'Real-time control system', 'Firewall, Intrusion detection'),
('3','Plasma Cutter', 'High', 'Metal', 'Linux-based control', 'User authentication, Secure data
transfer'),
('4','3D Printer', 'Moderate', 'Plastic', 'Web-based control', 'Password protection, Firmware
verification'),
('5','Industrial Grinder', 'High', 'Metal', 'Windows-based control', 'Secure access controls, Data
backup'),
('6','Laser Cutting Machine', 'High', 'Metal', 'Linux-based control', 'Encryption, Network
segmentation'),
('7','Injection Molding Machine', 'Moderate', 'Plastic', 'Windows-based control', 'Access
control, Audit logging'),
('8','Assembly Robot', 'High', 'Various materials', 'Real-time monitoring system', 'Biometric
authentication, Data encryption'),
('9','CNC Milling Machine', 'Moderate', 'Metal', 'Linux-based control', 'Secure communication
protocols, Intrusion prevention'),
('10','Packaging Machine', 'Moderate', 'Various materials', 'Windows-based control', 'Firewall,
Secure data storage');
SELECT Tools.ToolName
FROM Tools INNER JOIN Machine1
ON Tools.ProcessingPower = Machine1.Efficiency;

SCREENSHOTS:

1. Output of the Table, use of Primary Key and Other Constraints

Potrebbero piacerti anche