{"id":176305,"date":"2013-04-11T20:46:03","date_gmt":"2013-04-11T16:46:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=176305"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=176305","title":{"rendered":"<span class=\"post_title\">\u0413\u043b\u043e\u0431\u0430\u043b\u044b MUMPS: \u042d\u043a\u0441\u0442\u0440\u0435\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445. \u0427\u0430\u0441\u0442\u044c 2<\/span>"},"content":{"rendered":"<div class=\"content html_format\">       \u041d\u0430\u0447\u0430\u043b\u043e \u0441\u043c. <a href=\"\/post\/175659\/\">\u0447\u0430\u0441\u0442\u044c 1<\/a>.<\/p>\n<h4>\u0413\u043b\u0430\u0432\u0430 2. SQL\/\u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0411\u0414 \u043f\u0440\u043e\u0442\u0438\u0432 MUMPS<\/h4>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0433\u043b\u0430\u0432\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0437\u043b\u043e\u0436\u0435\u043d\u044b \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043e\u0431\u044b\u0447\u043d\u044b\u043c\u0438 SQL \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u043c\u0438 \u0431\u0430\u0437\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0411\u0414 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 MUMPS.<\/p>\n<p>  \u041f\u0440\u043e\u0447\u0438\u0442\u0430\u0439\u0442\u0435 <a href=\"\/post\/175659\/#habracut\">\u0433\u043b\u0430\u0432\u0443 1<\/a>, \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043d\u044f\u0442\u044c \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0433\u043b\u043e\u0431\u0430\u043b\u044b \u0438 \u043a\u0430\u043a \u0434\u0435\u043b\u0430\u044e\u0442\u0441\u044f \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u0441 \u043d\u0438\u043c\u0438.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h5>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445<\/h5>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0447\u043d\u0451\u043c \u0441 \u043e\u0441\u043d\u043e\u0432 \u2014 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0435. \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0411\u0414 \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0443\u044e \u0438\u0437 3-\u0445 \u0442\u0430\u0431\u043b\u0438\u0446:<\/p>\n<p>  1. \u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 (CUSTOMER)<br \/>  2. \u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u0437\u0430\u043a\u0430\u0437\u043e\u0432 (ORDER)<br \/>  3. \u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u0441 \u043f\u0435\u0440\u0435\u0447\u043d\u0435\u043c \u0432\u0435\u0449\u0435\u0439 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0445 \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0437\u0430\u043a\u0430\u0437 (ITEM)<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/f04\/438\/44c\/f0443844c4a39c3f31e07a0d163c19f6.png\"\/><\/p>\n<p>  \u0418\u043c\u0435\u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446 \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u0436\u0438\u0440\u043d\u044b\u043c, \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0435 \u043a\u043b\u044e\u0447\u0438 \u043f\u043e\u0434\u0447\u0451\u0440\u043a\u043d\u0443\u0442\u044b.<\/p>\n<p>  <b>CUSTOMER<\/b><br \/>  <u>custNo<\/u> <i>\u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u043a\u043b\u0438\u0435\u043d\u0442\u0430<\/i><br \/>  name <i>\u0418\u043c\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430<\/i><br \/>  address <i>\u0410\u0434\u0440\u0435\u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u0430<\/i><br \/>  totalOrders <i>\u041e\u0431\u0449\u0435\u0435 \u0447\u0438\u0441\u043b\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432 \u043a\u043b\u0438\u0435\u043d\u0442\u0430<\/i><\/p>\n<p>  <b>ORDER<\/b><br \/>  <u>orderNo<\/u> <i>\u041d\u043e\u043c\u0435\u0440 \u0437\u0430\u043a\u0430\u0437\u0430<\/i><br \/>  custNo <i>\u041d\u043e\u043c\u0435\u0440 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 (\u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u043a\u043b\u044e\u0447 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b CUSTOMER)<\/i><br \/>  orderDate <i>\u0414\u0430\u0442\u0430 \u0437\u0430\u043a\u0430\u0437\u0430<\/i><br \/>  invoiceDate <i>\u0414\u0430\u0442\u0430 \u0441\u0447\u0451\u0442\u0430-\u0444\u0430\u043a\u0442\u0443\u0440\u044b<\/i><br \/>  totalValue <i>\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0437\u0430\u043a\u0430\u0437\u0430<\/i><\/p>\n<p>  <b>ITEM<\/b><br \/>  <u>orderNo<\/u> <i>\u041d\u043e\u043c\u0435\u0440 \u0437\u0430\u043a\u0430\u0437\u0430 (\u0441\u043e\u043e\u0442\u0432\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043a\u043b\u044e\u0447\u0443 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b ORDER).<\/i><br \/>  <u>itemNo<\/u> <i>\u0410\u0440\u0442\u0438\u043a\u0443\u043b \u0432\u0435\u0449\u0438<\/i><br \/>  price <i>\u0426\u0435\u043d\u0430 \u0432\u0435\u0449\u0438 \u0434\u043b\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430 (\u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0432\u0441\u0435 \u0441\u043a\u0438\u0434\u043a\u0438).<\/i><\/p>\n<p>  \u041e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u043e\u0434\u0438\u043d-\u043a\u043e-\u043c\u043d\u043e\u0433\u0438\u043c \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0430 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0435. \u041a\u0430\u0436\u0434\u044b\u0439 \u043a\u043b\u0438\u0435\u043d\u0442 \u043c\u043e\u0436\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432 \u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u0437\u0430\u043a\u0430\u0437 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u0442\u044c \u0438\u0437 \u043c\u043d\u043e\u0433\u0438\u0445 \u0432\u0435\u0449\u0435\u0439.<\/p>\n<p>  \u0427\u0438\u0441\u043b\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0430 (CUSTOMER.totalOrders) \u044d\u0442\u043e \u0441\u0443\u043c\u043c\u0430\u0440\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0440\u0430\u0437\u043c\u0435\u0449\u0451\u043d\u043d\u044b\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c \u0437\u0430\u043a\u0430\u0437\u043e\u0432 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 ORDERS, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043f\u043e \u0435\u0433\u043e \u043d\u043e\u043c\u0435\u0440\u0443.<\/p>\n<p>  \u0426\u0435\u043d\u0430 \u0437\u0430\u043a\u0430\u0437\u0430 (ORDER.totalValue) \u044d\u0442\u043e \u0441\u0443\u043c\u043c\u0430 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 \u0432\u0441\u0435\u0445 \u0432\u0435\u0449\u0435\u0439 \u0432 \u0437\u0430\u043a\u0430\u0437\u0435, \u043a\u0430\u0436\u0434\u0430\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0430\u044f \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u0435\u043c ITEM.price.<\/p>\n<p>  \u041f\u043e\u043b\u044f CUSTOMER.totalOrders \u0438 ORDER.totalValue \u043d\u0435 \u0432\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u2014 \u044d\u0442\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c\u044b\u0435 \u043f\u043e\u043b\u044f.<\/p>\n<p>  \u0414\u043b\u044f SQL\/\u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0411\u0414 \u044d\u0442\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0446 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u044b \u0432 \u0411\u0414 (\u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e CREATE TABLE) \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e SQL \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c, \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u0438.<\/p>\n<p>  MUMPS \u043d\u0435 \u043d\u0430\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u0442\u0430\u0431\u043b\u0438\u0446 \u043f\u0435\u0440\u0435\u0434 \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0442\u0440\u043e\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0432 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0431\u0435\u0437 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u0442\u044c \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b.<\/p>\n<p>  \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0432\u0430\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u0430 \u043d\u0430 MUMPS-\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0441 \u0446\u0435\u043b\u044c\u044e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0434\u0430\u043d\u043d\u044b\u043c \u0447\u0435\u0440\u0435\u0437 SQL-\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b. \u0420\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c\u0443 MUMPS-\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0443, \u043a\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u0441\u0442\u0430\u043d\u0435\u0442 \u043d\u0443\u0436\u043d\u044b\u043c, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0437\u0430\u043f\u0438\u0441\u044f\u043c \u0432 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0435 (\u0435\u0441\u043b\u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043f\u043e\u0434\u0434\u0430\u044e\u0442\u0441\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438).<\/p>\n<p>  \u0414\u0430\u043d\u043d\u044b\u0435 \u0442\u0440\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0432 MUMPS \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0433\u043b\u043e\u0431\u0430\u043b\u044b:<\/p>\n<p>  <b>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 CUSTOMER<\/b><\/p>\n<p>  ^CUSTOMER(custNo)=name|address|totalOrders<\/p>\n<p>  <b>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 ORDER<\/b><\/p>\n<p>  ^ORDER(orderNo)=custNo|orderDate|invoiceDate|totalValue<\/p>\n<p>  <b>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 ITEM<\/b><\/p>\n<p>  ^ITEM(orderNo,itemNo)=price<\/p>\n<p>  \u0421\u0432\u044f\u0437\u044c \u043c\u0435\u0436\u0434\u0443 CUSTOMER \u0438 ORDER \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0433\u043b\u043e\u0431\u0430\u043b\u0430:<\/p>\n<p>  ^ORDERX1(custNo,orderNo)=\u201d\u201d<\/p>\n<p>  \u041e\u043d \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u043e\u043c\u0435\u0440\u0430 \u0437\u0430\u043a\u0430\u0437\u043e\u0432 \u043f\u043e \u043d\u043e\u043c\u0435\u0440\u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u0430.<\/p>\n<p>  \u0412 MUMPS \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u0438\u043c\u0435\u043d\u0430 \u0433\u043b\u043e\u0431\u0430\u043b\u043e\u0432. \u0422\u0430\u043a\u0436\u0435 \u0432\u044b \u0438\u043c\u0435\u0435\u0442\u0435 \u0432\u044b\u0431\u043e\u0440: \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u0433\u043b\u043e\u0431\u0430\u043b\u0443 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b (\u043a\u0430\u043a \u043c\u044b \u0438 \u0441\u0434\u0435\u043b\u0430\u043b\u0438) \u0438\u043b\u0438 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u0433\u043b\u043e\u0431\u0430\u043b \u0434\u043b\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0438\u043b\u0438 \u0432\u0441\u0435\u0445 \u0442\u0430\u0431\u043b\u0438\u0446.<\/p>\n<p>  \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0433\u043b\u043e\u0431\u0430\u043b \u0434\u043b\u044f \u0432\u0441\u0435\u0439 \u043d\u0430\u0448\u0443 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b:<\/p>\n<pre><code class=\"bash\">^OrderDatabase(\u201ccustomer\u201d,custNo)= name_\u201d~\u201d_address_\u201d~\u201d_totalOrders ^OrderDatabase(\u201corder\u201d,orderNo)= custNo_\u201d~\u201d_orderDate_\u201d~\u201d_invoiceDate_\u201d~\u201d_totalValue ^OrderDatabase(\u201citem\u201d,orderNo,itemNo)=price ^OrderDatabase(\u201cindex1\u201d,custNo,orderNo)=\u201d\u201d <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0445 \u0446\u0435\u043b\u0435\u0439 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e \u0433\u043b\u043e\u0431\u0430\u043b\u0443 \u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0443.<\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b \u0442\u0438\u043b\u044c\u0434\u044b (~) \u043a\u0430\u043a \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c \u043f\u043e\u043b\u0435\u0439 \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u0430\u0445 (\u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0438\u043c\u0432\u043e\u043b).<\/p>\n<p>  <b>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0411\u0414<\/b><\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0447\u043d\u0451\u043c \u0441 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430. \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 CUSTOMER.<\/p>\n<p>  <b>SQL<\/b><\/p>\n<pre><code class=\"sql\">INSERT INTO CUSTOMER (CustNo, Name, Address) VALUES (100, \u2018Chris Munt\u2019, \u2018Oxford\u2019) <\/code><\/pre>\n<p>  <b>MUMPS<\/b><\/p>\n<pre><code class=\"bash\">Set ^CUSTOMER(100)= \u201cChris Munt\u201d_&quot;~&quot;_&quot;Oxford&quot; <\/code><\/pre>\n<p>  &quot;_&quot; \u2014 \u044d\u0442\u043e \u0441\u0438\u043c\u0432\u043e\u043b \u0434\u043b\u044f \u0441\u043a\u043b\u0435\u0438\u0432\u0430\u043d\u0438\u044f (\u043a\u043e\u043d\u043a\u0430\u0442\u0435\u043d\u0430\u0446\u0438\u0438) \u0441\u0442\u0440\u043e\u043a.<\/p>\n<p>  \u0412 \u043f\u0440\u0430\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u0432\u0432\u0435\u043b\u0438 2 \u043f\u043e\u043b\u044f, \u0440\u0430\u0437\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u043c \u0442\u0438\u043b\u044c\u0434\u044b. \u041a \u0441\u043b\u043e\u0432\u0443 \u0433\u043e\u0432\u043e\u0440\u044f, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u044e\u0449\u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043b\u044e\u0431\u043e\u0439 \u0441\u0438\u043c\u0432\u043e\u043b, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0435 (non-printable) \u0441\u0438\u043c\u0432\u043e\u043b\u044b.<\/p>\n<p>  \u041c\u044b \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c:<\/p>\n<pre><code class=\"bash\">Set ^CUSTOMER(100)= \u201cChris Munt\u201d_$c(1)_&quot;Oxford&quot; <\/code><\/pre>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f $c(1) \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u00ab\u0441\u0438\u043c\u0432\u043e\u043b ASCII-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e 1\u00bb.<br \/>  $c \u2014 \u044d\u0442\u043e \u0441\u043e\u043a\u0440\u0430\u0449\u0451\u043d\u043d\u043e\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 $char.<\/p>\n<p>  \u0418 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u043b\u044f \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u0431\u044b \u0441\u0438\u043c\u0432\u043e\u043b ASCII 1.<\/p>\n<p>  \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432 INSERT \u0437\u0430\u043f\u0440\u043e\u0441 (\u0438\u043b\u0438 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 MUMPS), \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445.<\/p>\n<p>  <b>SQL<\/b><\/p>\n<pre><code class=\"sql\">INSERT INTO CUSTOMER (custNo, name, address) VALUES (:custNo, :name, :address) <\/code><\/pre>\n<blockquote><p>\u041f\u0440\u0438\u043c. \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430: \u0432 ANSI SQL \u0434\u043b\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u0448\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u0434\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u0435.<\/p><\/blockquote>\n<p>  <b>MUMPS<\/b><\/p>\n<pre><code class=\"bash\">Set ^CUSTOMER(custNo)=name_&quot;~&quot;_address <\/code><\/pre>\n<p>  <b>\u0412\u044b\u0431\u043e\u0440\u043a\u0430 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0438\u0437 \u0411\u0414<\/b><\/p>\n<p>  <b>SQL<\/b><\/p>\n<pre><code class=\"sql\">SELECT A.name, A.address FROM CUSTOMER A WHERE A.custNo = :custNo <\/code><\/pre>\n<p>  <b>MUMPS<\/b><\/p>\n<pre><code class=\"bash\">Set record=$get(^CUSTOMER(custNo)) Set name=$piece(record,&quot;~&quot;,1) Set address=$piece(record,&quot;~&quot;,2) <\/code><\/pre>\n<p>  \u0417\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435 \u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 $get(). \u042d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0437 \u0433\u043b\u043e\u0431\u0430\u043b\u043e\u0432. \u0415\u0441\u043b\u0438 \u0437\u0430\u043f\u0440\u043e\u0448\u0435\u043d\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u0442\u043e $get() \u0432\u0435\u0440\u043d\u0451\u0442 null (&quot;&quot;).<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0431\u044b \u043c\u044b \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 $get(), \u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre><code class=\"bash\">Set record=^CUSTOMER(custNo) <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0433\u043b\u043e\u0431\u0430\u043b\u0430 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u0442\u043e MUMPS \u0432\u0435\u0440\u043d\u0451\u0442 \u043e\u0448\u0438\u0431\u043a\u0443 \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f  (\u0442.\u0435. \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b).<\/p>\n<p>  \u041f\u043e\u0434\u043e\u0431\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0443 \u043a\u043e\u043c\u0430\u043d\u0434 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432 MUMPS \u0432\u043c\u0435\u0441\u0442\u043e $get() \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u0435 $g():<\/p>\n<pre><code class=\"bash\">Set record=$g(^CUSTOMER(custNo)) <\/code><\/pre>\n<p>  <b>\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0438\u0437 \u0411\u0414<\/b><\/p>\n<p>  <b>SQL<\/b><\/p>\n<pre><code class=\"sql\">DELETE FROM CUSTOMER A WHERE A.custNo = :custNo <\/code><\/pre>\n<p>  MUMPS<\/p>\n<pre><code class=\"bash\">kill ^CUSTOMER(custNo) <\/code><\/pre>\n<p>  \u0417\u0430\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u043a\u0430 \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u044c \u0411\u0414. \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u043f\u043e\u043a\u0430\u0436\u0435\u043c \u043a\u0430\u043a \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f.<\/p>\n<p>  <b>\u0412\u044b\u0431\u043e\u0440\u043a\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439<\/b><\/p>\n<p>  <b>SQL<\/b><\/p>\n<pre><code class=\"sql\">SELECT A.custNo, A.name, A.address FROM CUSTOMER A <\/code><\/pre>\n<p>  <b>MUMPS<\/b><\/p>\n<pre><code class=\"bash\">s custNo=\u201d\u201d f s custNo=$order(^CUSTOMER(custNo)) Quit:custNo= \u201c\u201d do . Set record=$get(^CUSTOMER(custNo)) . Set name=$piece(record,&quot;~&quot;,1) . Set address=$piece(record,&quot;~&quot;,2) . Set totalOrders=$piece(record,&quot;~&quot;,3) . ; \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u0432\u043e\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 <\/code><\/pre>\n<p>  \u0417\u0430\u043c\u0435\u0442\u044c\u0442\u0435, \u0447\u0442\u043e \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0441 \u0442\u043e\u0447\u043a\u0430\u043c\u0438 (dot-syntax). \u0421\u0442\u0440\u043e\u043a\u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u0441 \u0442\u043e\u0447\u0435\u043a \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u043f\u043e\u0434\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443, \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 do (\u0441\u043c. \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438)<\/p>\n<p>  \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0451 \u0447\u0442\u043e \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439 \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u043e\u0434\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 (\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0430\u044f\u0441\u044f \u0441 &quot;;&quot;)<\/p>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f $order \u0432 MUMPS \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0442\u043e\u043b\u043f\u043e\u0432 \u0441\u0438\u043b\u044b \u0438 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u043e\u0432. \u0421\u0443\u0442\u044c \u0435\u0451 \u0440\u0430\u0431\u043e\u0442\u044b \u043e\u0431\u044b\u0447\u043d\u043e \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u0430 \u0434\u043b\u044f \u0442\u0435\u0445 \u043a\u0442\u043e \u0437\u043d\u0430\u043a\u043e\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0441 SQL \u0438 \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u043c\u0438 \u0411\u0414, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u043d\u0435\u0439 \u0447\u0438\u0442\u0430\u0439\u0442\u0435 <a href=\"\/post\/175659\/\">\u0432 \u0433\u043b\u0430\u0432\u0435 1<\/a>.<\/p>\n<p>  \u0421 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 $order \u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u0430\u043c\u0438, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0431\u043e\u0439\u0442\u0438 \u043b\u044e\u0431\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435, \u043a\u043b\u044e\u0447\u0438 \u043a \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442\u0441\u044f \u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0441 \u043b\u044e\u0431\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u0412\u0430\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u0433\u043b\u043e\u0431\u0430\u043b\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u0438\u0435\u0440\u0430\u0445\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435. \u041a\u043b\u044e\u0447 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043c\u044b \u044d\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 \u0438\u043d\u0434\u0435\u043a\u0441 \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u0435, \u0442\u0430\u043a \u0447\u0442\u043e \u043c\u044b \u043d\u0435 \u0438\u043c\u0435\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u0442\u0440\u043e\u043a\u0430\u043c \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u043d\u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0438\u0441\u044c: \u0444\u0443\u043d\u043a\u0446\u0438\u044f $order \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0430 \u043a \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0438\u043d\u0434\u0435\u043a\u0441\u0443 (\u043a\u043b\u044e\u0447\u0443) \u0433\u043b\u043e\u0431\u0430\u043b\u0430 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e.<\/p>\n<p>  <b>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 MUMPS-\u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0434\u043b\u044f \u0432\u044b\u0441\u043e\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0434\u0430\u043d\u043d\u044b\u043c<\/b><\/p>\n<p>  \u041d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0434\u043b\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u0434\u0430 MUMPS-\u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0432\u044b\u0448\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u044b \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0442\u0430\u043a\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b \u043d\u0438\u0436\u0435.<\/p>\n<p>  <b>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0411\u0414<\/b><\/p>\n<pre><code class=\"bash\">setCustomer(custNo,data) ; \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 If custNo=&quot;&quot; Quit 0 Set ^CUSTOMER(custNo)=data(&quot;name&quot;)_&quot;~&quot;_data(&quot;address&quot;) Quit 1 <\/code><\/pre>\n<p>  \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u0437\u0432\u0430\u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043f\u0443\u0442\u0451\u043c::<\/p>\n<pre><code class=\"bash\">kill data ; \u0443\u0434\u0430\u043b\u0438\u043c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 data (\u043e\u043d \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 RAM) set data(&quot;name&quot;)=&quot;Rob Tweed&quot; set data(&quot;address&quot;)=&quot;London&quot; set custNo=101 set ok=$$setCustomer(custNo,.data)  ; $$ \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0430\u044f <\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u043e\u0447\u043a\u0443 \u043f\u0435\u0440\u0435\u0434 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 data. \u042d\u0442\u043e \u0432\u044b\u0437\u043e\u0432 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435. data \u2014 \u044d\u0442\u043e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432, \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f, \u0442\u0430\u043a \u0447\u0442\u043e \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u043c \u0435\u0433\u043e \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435.<\/p>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f setCustomer \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c\u0441\u044f \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432 myFunctions). \u0410 \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0432 MUMPS \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u0441\u044f \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u0430\u0445, \u0442\u043e \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u0437 \u0433\u043b\u043e\u0431\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c $$setCustomer^myFunctions(custNo,.data)<\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440:  <\/p>\n<pre><code class=\"bash\">kill data ; clear down data local array set data(&quot;name&quot;)=&quot;Rob Tweed&quot; set data(&quot;address&quot;)=&quot;London&quot; set custNo=101 set ok=$$setCustomer^myFunctions(custNo,.data) <\/code><\/pre>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u044e $$setCustomer() \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0435\u0439 (extrinsic). \u0412 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0445 \u041e\u041e\u041f \u044d\u0442\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 public. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a \u043d\u0435\u0439, \u0434\u0430\u0436\u0435, \u0435\u0441\u043b\u0438 \u043e\u043d\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435. \u0412\u043d\u0435\u0448\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u044d\u0442\u043e \u0441\u0432\u043e\u0435\u0433\u043e \u0440\u043e\u0434\u0430 \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0434\u0430\u043d\u043d\u044b\u043c.<\/p>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f $$setCustomer() \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u043e\u043b\u044c (\u0442.\u0435. false), \u0435\u0441\u043b\u0438 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043d\u043e\u043c\u0435\u0440\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0434\u0438\u043c null. \u0412 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0437\u0430\u043f\u0438\u0441\u044c \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0430 \u0438 $$setCustomer() \u0432\u0435\u0440\u043d\u0451\u0442 1 (\u0442.\u0435. true). \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e ok, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u043d\u0435\u0442.<\/p>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0443 \u043d\u0430\u0441 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 CUSTOMER \u0435\u0441\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c\u043e\u0435 \u043f\u043e\u043b\u0435 totalOrders, \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0435\u0433\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0432 \u043a\u043e\u0434\u0435:<\/p>\n<pre><code class=\"bash\">setCustomer(custNo,data) ; if custNo=&quot;&quot; Quit 0 ; \u041f\u043e\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0447\u0438\u0441\u043b\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432 Set data(\u201ctotalOrders\u201d)=0 Set orderNo=\u201d\u201d for set orderNo=$order(^ORDERX1(custNo,orderNo)) Quit:orderNo=\u201d\u201d do . set data(\u201ctotalOrders\u201d)=data(\u201ctotalOrders\u201d)+1 set ^CUSTOMER(custNo)=data(&quot;name&quot;)_&quot;~&quot;_data(&quot;address&quot;)_\u201d~\u201d_data(\u201ctotalOrders\u201d) Quit 1 <\/code><\/pre>\n<p>  \u041c\u044b \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c\u044b\u0445 \u043f\u043e\u043b\u0435\u0439 \u043f\u043e\u0437\u0436\u0435 \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 \u00ab\u0422\u0440\u0438\u0433\u0433\u0435\u0440\u044b\u00bb.<\/p>\n<p>  <b>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0438\u0437 \u0411\u0414<\/b><\/p>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0432\u043d\u0435\u0448\u043d\u044f\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u0435\u0440\u043d\u0451\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b CUSTOMER.<\/p>\n<pre><code class=\"bash\">getCustomer(custNo,data) ; new record kill data ; clear down data array if custNo=&quot;&quot; Quit 0 set record=$get(^CUSTOMER(custNo)) set data(&quot;name&quot;)=$piece(record,&quot;~&quot;,1) set data(&quot;address&quot;)=$piece(record,&quot;~&quot;,2) set data(&quot;totalOrders&quot;)=$piece(record,&quot;~&quot;,3) Quit 1 <\/code><\/pre>\n<p>  \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"bash\">S custNo=101 set ok=$$getCustomer(custNo,.data) <\/code><\/pre>\n<p>  \u041e\u043d\u0430 \u0432\u0435\u0440\u043d\u0451\u0442 \u043b\u043e\u043a\u0430\u043b\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 (\u0430 \u0442\u043e\u0447\u043d\u0435\u0435 \u0433\u043e\u0432\u043e\u0440\u044f \u0438\u0437\u043c\u0435\u043d\u0438\u0442 \u0435\u0433\u043e, \u0442.\u043a. \u043e\u043d \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435), \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 3 \u043f\u043e\u043b\u044f \u0438\u0437 \u0441\u0442\u0440\u043e\u043a\u0438 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0430:<\/p>\n<p>  data(\u201cname)<br \/>  data(\u201caddress\u201d)<br \/>  data(\u201ctotalOrders\u201d)<\/p>\n<p>  <b>\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0438\u0437 \u0411\u0414<\/b><\/p>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0432\u043d\u0435\u0448\u043d\u044f\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0443\u0434\u0430\u043b\u0438\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b CUSTOMER:<\/p>\n<pre><code class=\"bash\">deleteCustomer(custNo) ; if custNo=&quot;&quot; Quit 0 kill ^CUSTOMER(custNo) Quit 1 <\/code><\/pre>\n<p>  \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"bash\">S custNo=101 S ok=$$deleteCustomer(custNo) <\/code><\/pre>\n<blockquote><p><b>\u041f\u0440\u0438\u043c. \u041f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430:<\/b> \u0412 3 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u0432\u0442\u043e\u0440\u0438\u0447\u043d\u044b\u0445 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0445, \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u0430\u0445 \u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f\u0445.<\/p><\/blockquote>\n<p>  <b>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442.<\/b>        \t\t   \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/176305\/\"> http:\/\/habrahabr.ru\/post\/176305\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">       \u041d\u0430\u0447\u0430\u043b\u043e \u0441\u043c. <a href=\"\/post\/175659\/\">\u0447\u0430\u0441\u0442\u044c 1<\/a>.<\/p>\n<h4>\u0413\u043b\u0430\u0432\u0430 2. SQL\/\u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0411\u0414 \u043f\u0440\u043e\u0442\u0438\u0432 MUMPS<\/h4>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0433\u043b\u0430\u0432\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0437\u043b\u043e\u0436\u0435\u043d\u044b \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043e\u0431\u044b\u0447\u043d\u044b\u043c\u0438 SQL \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u043c\u0438 \u0431\u0430\u0437\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0411\u0414 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 MUMPS.<\/p>\n<p>  \u041f\u0440\u043e\u0447\u0438\u0442\u0430\u0439\u0442\u0435 <a href=\"\/post\/175659\/#habracut\">\u0433\u043b\u0430\u0432\u0443 1<\/a>, \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043d\u044f\u0442\u044c \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0433\u043b\u043e\u0431\u0430\u043b\u044b \u0438 \u043a\u0430\u043a \u0434\u0435\u043b\u0430\u044e\u0442\u0441\u044f \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u0441 \u043d\u0438\u043c\u0438.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-176305","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/176305","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=176305"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/176305\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=176305"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=176305"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=176305"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}