Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Entity–attribute–value model wikipedia , lookup
Oracle Database wikipedia , lookup
Extensible Storage Engine wikipedia , lookup
Concurrency control wikipedia , lookup
Open Database Connectivity wikipedia , lookup
Microsoft Jet Database Engine wikipedia , lookup
Relational model wikipedia , lookup
Functional Database Model wikipedia , lookup
Clusterpoint wikipedia , lookup
Database Interfaces under the Version 6 Engine Architecture ' Emily P. Wallace, SAS Institute Inc., Cary, NC _ut J=-or the last seyeral SUGI conferences, you have been hearing the Multiple Vendor Arcllitecture (MVAl and the multiple EH'tg:ine conoopts of V-arslon 6 of the SA$8 Systam that make·data to work.with a small portion of the data so you need a way to subset it. Another significant problem is the security of the data and the- impact on the parfQrm.a~ce for other users of the database system; access transparent. Thus far. we have implemented four databas, engines and developmeot Is underway on other cbItaba$a engines, so you CBn see that the engine architecture has become In. order to solve these problems, we have created the ACCESS procedure. Its job is to capture all of the Information needed to aOQEJSS a database. This information can inctude such things as the name of the da1abase, the- -password and the other options needed to uniq....1y Identify the database. II also allows you to specify- the elements of the database you want to work. with and give them SAS names that will be meaningful to you. You can ,pacify a where clause- to subset the records retrieved so that you work with only the portion of the datal:Jase that you -need, a reality. These new intarfaces provide much more functionality and fl.axibil~ty than their counterparts 1n Version 5 of the SAS Sys- tem. The VerSion 5 Interfaces are generalty procadure-6tyle Interfaces with each database hav~ its own set of procedures that bring the da.la from tf\a Database Management System (DBMS} into a SAS data set. You can run the SAS procedures against this copy of the DBMS data to perform your analyses Q( produce your reports. If there are procedures thai update the database, they generally use SAS data sets as input for the updatas. Both the Before we ·Iook at PRQC ACCESS in more: detail, we need to define two new terms. master descriptor and subc1esGrJptor. A master descriptor is a member of a SAS data library that contains a layout of the database and all DBMS information needed to access Its data. A master descriptor can point to bOth tables and views In relational database systems. A $ubdescnptor or view is based on a master descriptor and contains a list of elements In the 'database thaI will be used by the SAS program. the SAS namas and formats associated with the elements, and any subsetting or ordering information that Is valid for the DBMS. The subdescriptor or view is tlsed by thoa procedures Of DATA. S1ep to access tile DBMS data. eKtract and updata pr'Qcedures are very flexible rn allQwing YOI,.I to work will1 a subset of your data. However, the on~y way to keep the SAS data you have extracted from your database C(Jrrent Is to perkxllcally .extract the DBMS data. For many people that is· fine, but there are others who want to access- the DBMS data directly from SAS programs without mBklng a -copy -of the data. This Is one of the primary reasons. fOr the develOpment of the mul- tiple engine architecture. The primary goal of the multiple engine architecture is to provide transparent access to data that are not stored in SAS data sets, What this means is that you can use the same SAS programming You must use PROC ACCESS to CrBat!;! mastElr descriptors and subdescrlptors._lf you wantto k&epthe descriptors you buila, you must Stlpply a lIBNAME statement pOitltlng to a SAS data library .where you want the. descnpiOf'S to be wriUen.lfyou do not supply a UBNAME statment. the descriptors will 'be written to the WORK library and will be temporary. To invoke the procadure, type statements on-data regard.less of where the data Bre stored. With the muttlple englne- architecture, you can execute DATA and PROC steps directiy against the DBMS data- instead of executing against a copy of the data. Now you use the same tool for analy~ sis, graphkls, and reporting needs. A long term benefit of this new architecture is that as the SAS System adds new fea1l.R"es and addltional·capabllities, these new features will be immediately avaUable to the DBMS engine users as welt -; PROC J.CCE5s. i ~n the program edit window· and submit the statement. You see the ACCESS panel that displays tile cootents of all SAS data libraries you have defined to your SAS sesslon. Master descriptors are Identified by their member type (M.mtype) of ACCESS and subdescrlptors are. Identified by their type of VIEW. Views oreatod by the SOL procedure are also Idenmied by the type of VIEW and will also be displayed on the ACCESS PANEL The database engine. makes. the direct access possible. The job of the database engine is 10 accept any request from 1he ·SAS $upervisor, translate it into. rtle appropriate DBMS n:lq1,l9st, and return data Or status information to ttte SAS 5uparviSOl' in the correct SAS format. For example; W a procedore asks th<!SAS supefVlsor to read a reoord, the database engine wm build a DBMS read request, pass it to the database system, and receive the data that was read. Then the engine must translate the DBMS data into the format that the SAS System-expects and pass the translated data to the SAS supervisor wtIo passes ~t on to the procedure. Tl'IiS description of a database. engine migh1 make you belteve thet it Is a relatively simple task to bring DBMS daia into the SAS environment but that is not entiraty true. There are sotne p~ob lems that must be handled to make the process work smoothl~. on.a of the most visible problems. is the difference ln the rutes .for SA.S names and the rules for DBMS names. '" many cases, the DBMS names are longer than the SAS names and cootaln ·characters that 'Would -not be valid in SAS variable names. Also, there is no syntax on the procedure statements to specify- the name of the database that oontaios the data you want-to use. Many DBMSs aloo have optiOnS that must be set by the calling pro.gram before accessmg ttle databa" management system. In many cases, the databases con1ain large amounts of data and you want 347 d;e.=d~ I I Libll_... ~1PI I ~ WVSD Pll)I'nI a.~ II _=~x g~=~~ ;Uu.o:m l«Il£ : =~ I _ I :=n~: IIlIHIPI ftllll" l ' . .Ion "IIIII' ,l, ,, To create a subdescrlptor from the master descriptor you just cr~atedt type a C beside 1tte name of the master deSQiptQr on the ACCESS PANEL. You see the SUBOESCRIPTOR OISPLAY PANEL. whi(lh lists all of the- database elements. tha.t are eligjble for inclusion in10 the lJiew. It the master desaiptor has assigned &AS names for th-e elemerrts in the database:. tI""J(J SAS names are displayed and cannot be Changed. '(0 select elements. enter an S in the FUNC field 10' each el"",ent you want. If the SAS name field Is blank. you may fill in a name to usa or you can let the pr0cedure assign the ~am&S. PMlL _________________________________________ t : C_!III •• -> h~lI I : II II . ,,, ,, : ,, I, +-_______________________________________________ ,i +-------- ------_._-_._--_._- ,I C_1I4 ••., 11 ____ .-f 1 ~Am i "tI1l1OUurftlll 10: 1t.III101ll 1ULI Ili\llJj tRIP-II IIiUIt, .s;ll<ltRIP HR, VIII! iI LIJI!.'dI1,:I DllfPQl'SAII DUA IItl LIIIIMII - - . . . . . , - I roc m CCWIIII IMI WIWII roaw I Cij$!DIID....J:tUD. n. iI -.::~ -",. -n .. ~ft~. Rl'!'mllUi'AH I\ft...IIIIU 1Wl'I1. Tho ACCESS PANEL of the ACCESS I'roooduro t To create a: new master descriptor. type the foUowing on the command line of the ACCESS PANEL: , I 1114 5IIBH5'1lmR DlIPW I sc_ 1 ---~---------------------+ 811f1 AlKtIML1'IaftJ:I I , UI~; DI.2 I I : I I;VftCUI I ~ SIS. : j ; I , 1 : \ 1 t-.-----------~---_~ ---------~---------:l-----+ CREATE Iibnalrn3'.memfflU'I1e.ACCESS where memname is the member you want to create and IIbname points 10 the Dbrary where you want the mom"'" stored. II you have more than one database engine installed on YOUI' CPU, yOLl wiil see a list of the engines you have and you should choose the one needed-for the master descriptor YOU_Bfe Cr'ElElting. If you . have only ono database ongine installed, you wm bypass this panel. l"ha nan step is to identify the name of the database or table 10 be dascrlbed by this master descriptor. Once this info,· rnfiltiOfi Is supplied, you sea the MASTER DESCRIPTOR DISPLAY PANEL, which lists the names of the elements of the database. If you want to ellforce Itie use of standard names for al.sulXlescriptors created .rom this master descrlptDr, type In the $AS names you want m be used. If you <10 not supply SAS namas, then subdascriptors can use SAS names their choosIng. If you do not want an alement to be ayailable for use in any ·views, type an N In the selection f~td and the element Will be marked as non-display and·cannot participate in anyviews. When you ootar ttta END I)Q(J"Jn'I&nd. the new master descriptOf Ie created and·can be used to create subdeSCfiptors. Screen 3 The SUBOESCRIPTOR OISPLAY PANEL Is used to Specify the Columns fo!' the VIeW If you want to define 5ubsetting or ordeling information, type WHERE on the command line. The SELECTION CRITERIA ENTRY PANEL is displayed and you can type In where clauses or ordering clauses that are valid for the DBMS you are acces~ Ing. When you exit the SUBOESCRIPTOR OISPLAY PANEL, the new subdescriptor is writt&n and its name Is dls~ay.ed 00 theACCESS panel. Now youI' new view is ready for' use by SAS pro-cedures and the OAT A step. II you want m validate the view belore loavlng the ACCESS PANEl., you can invoke the FSEDIT, FSBROWSE. or FSVIEW prooedul'es to ·see the data from the DBMS. o. +11LIt1'11lll alfllll:i" Un, PMn----------------------------------------_+ ,I o ~lJf(!l ~~t .wra1U,,.10l ID1 IIWln I 11DH1: J: ~ ,I I II I ~HtluU{lll - 'IWI ru.lt:IlCO Q ' aM: : Qplrt-.rLt.l.t ... utftll! '1919.0'_11' llId 'I!S'_I._U' : _lin IW'mI I ~: -nn. 1:5111: PJl2 J'OUl1' - ... __ -1121_ "' , ............ .......... .. IIU1W'l'lfIII :DAft'. _ _ WifU • .."......,.. ,, AIIlUJ:LTIClIf.JIO _ _ '1S. , I : I t-_. _________ I : I--·--------_~_~~~ _____ ___________________·___ ~ 2 _______________________________________________ 1 ______ I, , i:------..I ac...... _ r , ,I, ,,, ,, ,, ,, ,, : j lCCW iUDIII 11:1. C01.IJA!WI! I , PlDl Wld lWIIl DlH 'r:1!I'S I i~d~.~ ..l~-nd. ------------------------------------------_._---------. .. The MASTEI'I OESCRIPTION OISPLAY PANEL . Ilsts the columns in the DB2 Table 4 The SELECTION CRITERIA ENTRY PANEL Specifies the Rows to be Viewed Now that your view is bultt, you can use it In SAS programming statements that will acceS$ data in your database. The program- 348 to PROC ACCESS that wm let Y"" dafine the file layouts 50 that we can use that information to build the master descriptors. This feature wlll also enable you to create new databases using a data- mlng statements are the sarna statements that you would use to """"ss BAS data set.; tha only difference Is that your DATAoption points to a subdeocriptor Instead of a physical data library. If your database descriptors are In a permanent SAS data set, you must use a LlBNAME statement to point to U1e library. If they are In a _porary library, no UBNAME statement is required. base layout you define. For example, you might want to create a new ORACLE· table using the NEW= opjlon In PROC FSEOIT. Curtenuy this is not Sl,Ipported. but in the future you will be able to dafine a new ORACLE table using PROC ACCESS to build a master descriptor and than create the table usIng PROC FSEOIT. LIIIAIIE 1 'WIPIf.DE9-CRIP.LIBltARY'; noc PRlft ElA~A.X.SUGI'rRI:P: llUll'; Another enhancement planned for a future release Is the ability to build a database view containing Information from more than one database of the sama DBMS type whenttte databa!i1e system can do the joins efficiently. Since PROC SOl already cr&ates views that join two of our database views. we will let PROC SOL do the jofns of database views whoean the database cannot do the iolns itse~. PROC ACCESS and the <Ie"",ipto'" an> pow.orful tools boo,us. they allOw you to work with !he DBMS data without a detaiIeCJ knowladgo of database concepts and terminology. Once tho descriptors are set up, they remain valid until the database struc~ tuno """"ges. Thensfore, thare Is very Iittio maintenance required. The descriplOfS can be used as a security mechanism to control both the elements and the recol'ds that you can see. The master descriptors and the vtews can be kept in separate data fibraries so the database admCnistraticn group can control the building of masts< doseriptors and ""bdescnptors and provida access to only the infonnatlon to th8 databases that you need. The database el'lQinea that we currently have lmp~mented are for DB2~ under MVS, SQl./DS~ under CMS, ORACLE and Rdb{VMS· undar VMS· . The.. produ"'" are all port of tha SAS/ACCESS- family of interface products and they will be available with Rol . .se 6.06 of the SAS Systam. There are probably some of Y"u who .J<> 'oV1>f>d..-Ing why we changed the way Wf3 InterfaQel to databases. For B yar~ of rw.. sons, poopl. preferred to extract da.a from the DBMS Into a SAS data .ot and work with the copy oftha data. In Version 6 you con still do the ext.racte. and iii Soma casas this approach is better than doing direct access from procedlJr&s and the DATA step. If you are going to use the same data in many procedures In ttle same SAS .session. itwould probably be advantageous to extract the data-into a SAS data set. SAS data seta are organized In a manner that provides optimum performance for SAS proooduros and the DATA step so procedures using SAS data set input will frequently take laBS CPU time than procedures that use views to access DBMS infonnation. Fu1ure engines will Inetude interfaces to at! currentiy supported database systems (IMS, DLfl, SYSTEM 2000C' Data Managemef1t Software, IDMS/R~ DATACOM/DBO and ADABASO) plus other databases you request. You will also see the existing engines ported 1:0 other platforms when there Is adequate interest in them, AS you carl see, the mtdtiple engina architecture provides you with a powerful and flexible Interface to your database $ystem. You can write SAS programs to access your DBMS data without knowing specific DBMS tenninology or DBMS programming conoopts. YOu use the same programming statements wheth8( your data are in SAS data sets or database systems. Also you can choose between difect access and extracts based on your pro- gramming taSkS. Another situation where you mlght prefer to do an extract of ths DBMS data is when your database is large and you want 10 read • large portion of the rocords. If the database, being shared by other users on an on"na system, your program might have a negative lmpact on the system performance and cause the other s.o.S, SYSTEM 2000 and SAS/ACCESS are registersd trademarks of SAS InstitLJte Inc., Cary, NC, USA users to experience stow response time. 'The Database AdmlnlsImtiOn group might suggest that Y"u dO extra"'" of the DBMS data into SAS data sets tor security reasons also. You shOUld carefully ovaluate the types of BAS programs Y"u will use to ac::oess the DBMS data and doo1de whirther' to use dil"5t;:t aecess ORACLE is a registered trademark of Oracle Corporation. or database extracts based on the programming tasks and your company's guIdelines. DATACOM/DB Is a registered trademark of Computer ales International. PROC ACCESS solves many problems for SAS users but the", .... some situtatiOns that ~ still does not handle. If your data are in • database or fife system that does not conlaln daoc<lptivo InfonnlltiQo as a p:art of the database sy$tem , sl,ICh as IMS, VSAM, tape foles. or _ extemol files, you might want to use PROC ACCESS and an onglno to work with your dala. One of the thll1gs we wRl be wortdng on ill tile future is an erdlQflcement ADABAS Is • registered tradamork 01 Software AG.. RdbfVMS and VMS are .rademart<s of Digital Equipment c0rporation. Associ~ DB2 and SOLIDS are trademarks of International Business Moohln.. Corporation. 10M SIR is a regislOred trademark of Cullinet Software, Inc. 349