...minutes | 7 out of 10 | Score for this quiz: 7 out of 10 Submitted Mar 19 at 11:58pm This attempt took 36 minutes. Question 1 1 / 1 pts Parameters for stored procedures and functions can be of any valid SQL Server data type except Parameters for stored procedures and functions can be of any valid SQL Server data type except date/time Correct! table xml numeric Question 2 0 / 1 pts Skip to question text. Code a statement that calls the following stored procedure and passes the values ‘2011-12-01’ and 122 to its input parameters. Pass the parameters by name in the reverse order that they’re declared in the procedure. CREATE PROC spInvoiceTotal1 @DateVar smalldatetime, @VendorID int AS SELECT SUM(InvoiceTotal) FROM Invoices WHERE VendorID = @VendorID AND InvoiceDate >= @DateVar; ______________________________________________________________________________ You Answered Correct Answers EXEC spInvoiceTotal1 @VendorID = 122, @DateVar = '2011-12-01'; EXEC spInvoiceTotal1 @VendorID = 122, @DateVar = '2011-12-01' Question 3 0 / 1 pts Before you can pass a table to a stored procedure or a function as a parameter, you must use the ______________________ statement to create a user-defined table type. Before you can pass a table to a stored procedure or a function as a parameter, you must use the ______________________ statement to create a user-defined table type. You Answered Correct Answers ...
Words: 645 - Pages: 3
...Relational Database Design SQL GRANT REVOKE Commands DCL commands are used to enforce database security in a multiple user database environment. Two types of DCL commands are GRANT and REVOKE. Only Database Administrator's or owner's of the database object can provide/remove privileges on a database object. SQL GRANT Command SQL GRANT is a command used to provide access or privileges on the database objects to the users. The Syntax for the GRANT command is: GRANT privilege_name ON object_name TO {user_name |PUBLIC |role_name} [WITH GRANT OPTION]; privilege_name is the access right or privilege granted to the user. Some of the access rights are ALL, EXECUTE, and SELECT. object_name is the name of an database object like TABLE, VIEW, STORED PROC and SEQUENCE. user_name is the name of the user to whom an access right is being granted. PUBLIC is used to grant access rights to all users. ROLES are a set of privileges grouped together. WITH GRANT OPTION - allows a user to grant access rights to other users. GRANT SELECT ON employee TO user1; This command grants a SELECT permission on employee table to user1.You should use the WITH GRANT option carefully because for example if you GRANT SELECT privilege on employee table to user1 using the WITH GRANT option, then user1 can GRANT SELECT privilege on employee table to another user, such as user2 etc. Later, if you REVOKE the SELECT privilege on employee from user1...
Words: 867 - Pages: 4
...INTRODUCTION SQL is divided into the following Data Definition Language (DDL) Data Manipulation Language (DML) Data Retrieval Language (DRL) Transaction Control Language (TCL) Data Control Language (DCL) DDL -- create, alter, drop, truncate, rename DML -- insert, update, delete DRL -- select TCL -- commit, rollback, savepoint DCL -- grant, revoke CREATE TABLE SYNTAX Create table (col1 datatype1, col2 datatype2 …coln datatypen); Ex: SQL> create table student (no number (2), name varchar (10), marks number (3)); INSERT This will be used to insert the records into table. We have two methods to insert. a) By value method By address method USING VALUE METHOD Syntax: insert into (table_name) values (value1, value2, value3 …. Valuen); © Copy rights are reserved. 2 Ex: SQL> insert into student values (1, ’sudha’, 100); SQL> insert into student values (2, ’saketh’, 200); To insert a new record again you have to type entire insert command, if there are lot of records this will be difficult. This will be avoided by using address method. b) USING ADDRESS METHOD Syntax: insert into (table_name) values (&col1, &col2, &col3 …. &coln); This will prompt you for the values but for every insert you have to use forward slash. Ex: SQL> insert into student values (&no, '&name', &marks); Enter value for no: 1 Enter value for name: Jagan Enter value for marks: 300 old new SQL> 1:...
Words: 42387 - Pages: 170
...Create Table CREATE TABLE PRESENTERS (PRESENTERID CHAR (6) PRIMARY KEY NOT NULL, PNRLNAME VARCHAR (20) NOT NULL, PNRFNAME VARCHAR (20) NOT NULL, GENDER CHAR (2) DEFAULT ‘M’, AGE SMALLINT NOT NULL CHECK (AGE>=18), YEARS SMALLINT NOT NULL, SALARY_YEARLY DECIMAL (10, 2) NOT NULL); CREATE TABLE EPISODES (EPISODENO INT IDENTITY (1,1) PRIMARY KEY NOT NULL, EPISODENAME VARCHAR (50) NOT NULL, DATEAIRED DATE NOT NULL, GUEST VARCHAR (50), COUNTRYAIRED VARCHAR (10) NOT NULL, PRESENTERID CHAR (6) FOREIGN KEY REFERENCES PRESENTERS (PRESENTERID), CARNO CHAR (7) FOREIGN KEY REFERENCES CARS (CARNO)); Insert Into Table INSERT INTO PRESENTERS (PRESENTERID, PNRLNAME, PNRFNAME, AGE, YEARS, SALARY_YEARLY) VALUES ('EMP_01','NEEDELL','TIFF', 61, 10, 374500.70), ('EMP_02','BUTLER-HENDERSON','VICKI', 41, 10, 24262.55), ('EMP_03','PLATO','JASON', 45, 8, 29100.98); Alter Tables Add Column ALTER TABLE EMPLOYEES ADD LAST_NAME VARCHAR (50) Datatypes ALTER TABLE CAKES ALTER COLUMN CAKENO CHAR (8) NOT NULL Constraints ALTER TABLE EMPLOYEES ADD CONSTRAINT PK1 PRIMARY KEY (EMPID) Foreign Keys ALTER TABLE EPISODES ADD FOREIGN KEY (CAKENO) REFERENCES CAKES (CAKENO) Change Column SP_RENAME 'TABLE_NAME'.'OLD_COLUMN_NAME', 'NEW_COLUMN_NAME', 'COLUMN'; Drop Column ALTER TABLE EMPLOYEES DROP COLUMN LAST_NAME; Delete Row DELETE FROM CARS WHERE CARMAKE='SUBARU WRX' Drop Table DROP TABLE EMPLOYEES Update Tables UPDATE PRESENTERS SET SALARY_YEARLY...
Words: 1804 - Pages: 8
...Review Questions Chapter 1 1.3 Describe the approach taken to the handling of data in the early file-based systems. In the early file based system their all data was in written form, due to the lake of education, due to the in-familiarity with new techniques, lake of computer knowledge so all the data required would be stored in a file or files owned by the programs. Discuss the disadvantages of this approach. Different programs could be written in different languages, and would not be able to access another program's files. This would be true even for those programs written in the same language, because a program needs to know the file structure before it can access it. 1.4 Describe the main characteristics of the database approach and contrast it with the file-based approach. Focus is now on the data first, and then the applications. The structure of the data is now kept separate from the programs that operate on the data. This is held in the system catalog or data dictionary. Programs can now share data, which is no longer fragmented. There is also a reduction in redundancy, and achievement of program-data independence. 1.5 Describe the five components of the DBMS environment and discuss how they relate to each other. (1) Hardware: The computer system(s) that the DBMS and the application programs run on. This can range from a single PC, to a single mainframe, to a network of computers. (2) Software: The DBMS software and the application...
Words: 2796 - Pages: 12
...Estándares Transact-SQL Buenas Prácticas de Programación 1. Convenciones y Estándares de Nombres Nota: Los términos “notación Pascal” y “notación de Camell” son usados a través de este documento. Notación Pascal – El primer carácter de todas las palabras se escribe en Mayúsculas y los otros caracteres en minúsculas. Ejemplo: ColorDeFondo Notación de Camell – El primer carácter de todas las palabras, excepto de la primera palabra se escribe en Mayúsculas y los otros caracteres en minúsculas. Ejemplo: colorDeFondo 1. Usa notación Pascal para el nombre de las Tablas CREATE TABLE dbo.Employee 2. Usa notación Pascal para el nombre de los campos de tabla CREATE TABLE dbo.Employee ( IdEmployee INT, FirstName VARCHAR(20), LastName VARCHAR(20) ) 3. NO usar nunca “sp_”, La razón es que: SQL Server reconoce el prefijo “sp_” como “System Stored Procedure”, es decir, un procedimiento almacenado de Sistema y lo buscaría en la Base de Datos. Usa la siguiente sintaxis para los nombres de los Stored procedures: Usp_<Nombre Esquema>_<Nombre Tabla> _<Accion> Ejemplo: usp_GEN_Employee_Insert usp_GEN_Employee_GetAll 4. Usa esquemas para agrupar los objetos como tablas, los nombres deben de ser Abreviados. Incorrecto: GEN_Employee Correcto: GEN.Employee 2. Consideraciones en el diseño de base de datos 1. El nombre de la base de datos debe de asemejarse al nombre de la aplicación, no deberá de contener...
Words: 2608 - Pages: 11
...1.Workload Manager (WLM) manages how many concurrent stored procedures can run in an address space and the number of concurrent stored procedures in an address space cannot exceed the value of the NUMTCB parameter. Which statement about the value of NUMTCB is correct? A. NUMTCB parameter must be set to 1 for Java stored procedures. B. NUMTCB parameter must be set to 1 for REXX stored procedures. C. NUMTCB parameter can be a value greater than 1 for native SQL stored procedures. D. NUMTCB parameter can be a value greater than 1 when a stored procedure invokes DB2 utilities. Answer: B 2.If a single row of the PLAN_TABLE has a 'Y' value in more than one of the sort composite columns, what is indicated.? A. The next sort step will perform two sorts. B. There are multiple sorts in the plan step. C. One sort in the plan step will accomplish two tasks. D. Two sorts are performed on the new table of a star join. Answer: C 3.What IBM provided stored procedure will access DB2 real time statistics tables? A. DSNAEXP B. DSNAIMS C. DSNACCOX D. DSNLEUSR Answer: C 4.The EXPLAIN STMTCACHE ALL statement provides information about SQL tuning. Which information is part of the DSN_STATEMENT_CACHE_TABLE? A. Filter factor information. B. Stage 1 and stage 2 information. C. Number of columns used in an index. D. Number of times an SQL statement is executed. Answer: D 5.Which two of the following DB2 performance features will ignore clustering...
Words: 8187 - Pages: 33
...1.INTRODUCTION 1.1 PURPOSE: The purpose of this document is to describe the requirements for an automation system for a college grievance cell to register the complaints online from valid users and maintain all related information. It also describes the interface, platform and other constraints. 1.2 SCOPE: This document is the only one that describes the requirements of the system. It is meant for the use by the developers and will be the basis for validating the final delivered system. Any change made to the requirements in the future will have to go through a formal approval process. The developer is responsible for asking clarification, where necessary, and will not make any alteration without the permission of the client. 1.3 DEFINITIONS AND ABBREVIATIONS: 1. OGC- Online Grievance Cell 2. Grievance-A grievance is the subject of a complaint filed by a student, which is to be resolved by procedures provided in the college. It is any issue causing problem to the students, which need to be relevant. Ex. Issues related to ragging, food, faculty etc. Grievance is sometimes referred to as complaint. 3. Student- Any student of SDMCET belonging to any of the semesters from 1st to 8th of any branch. 4. Authority- The Dean academic for academic and Dean Student welfare for non academic grievances, who are responsible for resolving the grievances of students. 5. Database Administrator- One who manages and maintains the database, i.e adding/ deleting of users...
Words: 5166 - Pages: 21
...a lot of various concepts. Even though the annotation for the individual image frame is in effect, any concept in the image frames still cannot represent the complete video. The aim of the paper is to allow users to obtain their desired videos by submitting her/his interested video clips, without considering the identification of the query terms and applying an efficient indexing technique for searching videos present in large multimedia repositories. Keywords Video data mining, multimedia repository, index table, query clip. 1. INTRODUCTION Data mining is the process of posing various queries and extracting useful and often previously unknown and unexpected information, patterns, and trends from large quantities of data, generally stored in databases[1]. These data could be accumulated over a long period of time or they could be large data sets accumulated simultaneously from heterogeneous sources. Video mining is considered as an extension of still image mining by including mining of temporal image sequences. However, the video data in the general case represent the multimedia already since they include – besides the image sequence – audio data and textual annotations. The searching of video data to find the best matching video clip in content to the desired clip of the user is a very challenging task[4]. We approach...
Words: 2310 - Pages: 10
...Journal of Traffic and Logistics Engineering Vol. 2, No. 3, September 2014 A Car Monitoring System for Self Recording Traffic Violations Ahmed M. Elmahalawy Computer Science and Engineering Department, Faculty of Electronics Engineering, Minufiya University Menouf, 32952, El-Minufiya, Egypt Email: ahmed.elmahalawy@el-eng.menofia.edu.eg; a_elmhalaway@hotmail.com which ought to be considered as sufficiently independent. These two major sub-systems are: 1) the transaction subsystem and 2) the enforcement subsystem. [2] Another example is video technology applications for traffic management and safety. This technology offers both tangible and intangible benefits. Video technology requires a substantial up- front investment costs for the purchase and installation of equipment and training of staff. Due to the complexity of video systems and the rapid pace of change related to this technology, agencies may overlook some applications while using resources to implement less valuable applications. [3] Over the last few years there has been a growing interest in Intelligent Speed Adaptation (ISA), to solve the problem of exceeding the speed limits. ISA has the potential to significantly reduce the incidence and severity of road trauma in many countries all over the world. [4], [5] The remainder of this paper is organized as follows: Section 2 gives a background of previous work in this field. Overview of Self Recording Traffic Violations system is presented...
Words: 3119 - Pages: 13
...Oracle/SQL Tutorial1 Michael Gertz Database and Information Systems Group Department of Computer Science University of California, Davis gertz@cs.ucdavis.edu http://www.db.cs.ucdavis.edu This Oracle/SQL tutorial provides a detailed introduction to the SQL query language and the Oracle Relational Database Management System. Further information about Oracle and SQL can be found on the web site www.db.cs.ucdavis.edu/dbs. Comments, corrections, or additions to these notes are welcome. Many thanks to Christina Chung for comments on the previous version. Recommended Literature George Koch and Kevin Loney: Oracle8 The Complete Reference (The Single Most Comprehensive Sourcebook for Oracle Server, Includes CD with electronic version of the book), 1299 pages, McGraw-Hill/Osborne, 1997. Michael Abbey and Michael Corey: Oracle8 : A Beginner’s Guide [A Thorough Introduction for First-time Users], 767 pages, McGraw-Hill/Osborne, 1997. Steven Feuerstein, Bill Pribyl, Debby Russell: Oracle PL/SQL Programming (2nd Edition), O’Reilly & Associates, 1028 pages, 1997. C.J. Date and Hugh Darwen: A Guide to the SQL Standard (4th Edition), Addison-Wesley, 1997. Jim Melton and Alan R. Simon: Understanding the New SQL: A Complete Guide (2nd Edition, Dec 2000), The Morgan Kaufmann Series in Data Management Systems, 2000. 1 revised Version 1.01, January 2000, Michael Gertz, Copyright 2000. Contents 1. SQL – Structured Query Language 1.1. Tables 1.2. Queries (Part I) 1.3. Data Definition...
Words: 21631 - Pages: 87
...Performance and Cost Evaluation of an Adaptive Encryption Architecture for Cloud Databases Abstract: The cloud database as a service is a novel paradigm that can support several Internet-based applications, but its adoption requires the solution of information confidentiality problems. We propose a novel architecture for adaptive encryption of public cloud databases that offers an interesting alternative to the tradeoff between the required data confidentiality level and the flexibility of the cloud database structures at design time. We demonstrate the feasibility and performance of the proposed solution through a software prototype. Moreover, we propose an original cost model that is oriented to the evaluation of cloud database services in plain and encrypted instances and that takes into account the variability of cloud prices and tenant workloads during a medium-term period. KEYWORDS: Cloud database, confidentiality, encryption, adaptivity, cost model. LIST OF CONTENTS Page No List of Figures viii List of Tables ix 1. Introduction 1.1 Purpose 1.2 Scope 1.3 Motivation 1.3.1 Definitions 1.3.2 Abbreviations 1.3.3 Model Diagrams 1.4 Overview 2. Literature Survey 2.1 Introduction 2.2 History ...
Words: 17343 - Pages: 70
...conduct a general study of Business Intelligence and BI systems followed by a comparison of Cognos 8 BI, Microsoft BI and SAP BW/NetWeaver. The goal was to distinguish similarities and differences between the tools regarding technique, cost, usability and educational need and to provide a mapping for different customer situations. The method consisted of a theoretical study followed by a practical part including development, testing and interviews. The comparison showed that SAP and Microsoft both use the client/server model while Cognos is an integrated web-based system built on SOA. SQL Server can only be installed on Windows while BW and Cognos also support UNIX, Linux and IBM. SSRS report formats are HTML, PDF, CSV, XML, TIFF, Word and Excel. In BW, query results can be viewed as HTML, CSV and Excel. Cognos report formats are HTML, PDF, CSV, XML and Excel. The educational need for SQL Server and Cognos is low and may often be solved internally or through e-learning. In contrast, BW uses its own terminology and the enhanced star schema,...
Words: 25350 - Pages: 102
...Oracle® Database Concepts 10g Release 2 (10.2) B14220-02 October 2005 Oracle Database Concepts, 10g Release 2 (10.2) B14220-02 Copyright © 1993, 2005, Oracle. All rights reserved. Primary Author: Michele Cyran Contributing Author: Paul Lane, JP Polk Contributor: Omar Alonso, Penny Avril, Hermann Baer, Sandeepan Banerjee, Mark Bauer, Bill Bridge, Sandra Cheevers, Carol Colrain, Vira Goorah, Mike Hartstein, John Haydu, Wei Hu, Ramkumar Krishnan, Vasudha Krishnaswamy, Bill Lee, Bryn Llewellyn, Rich Long, Diana Lorentz, Paul Manning, Valarie Moore, Mughees Minhas, Gopal Mulagund, Muthu Olagappan, Jennifer Polk, Kathy Rich, John Russell, Viv Schupmann, Bob Thome, Randy Urbano, Michael Verheij, Ron Weiss, Steve Wertheimer The Programs (which include both the software and documentation) contain proprietary information; they are provided under a license agreement containing restrictions on use and disclosure and are also protected by copyright, patent, and other intellectual and industrial property laws. Reverse engineering, disassembly, or decompilation of the Programs, except to the extent required to obtain interoperability with other independently created software or as specified by law, is prohibited. The information contained in this document is subject to change without notice. If you find any problems in the documentation, please report them to us in writing. This document is not warranted to be error-free. Except as may be expressly permitted in your license agreement...
Words: 199783 - Pages: 800
...network storage system in today’s world. Also, nowadays the files are stored over the network. This system provides an easy way to retrieve any file which is stored over the network. The IP address of any system which is connected to the network can be found out just by selecting the name of the system. Therefore the range of IP address where the search has to be done can be found by that. The required file can be searched easily when this IP address range is known. The name of the file to be searched is given as input. If possible the file format is also given along with it. The IP address range where the search has to be performed is also selected. If there is any particular system outside that particular range they also can be selected for search operation to be performed. The search is done in each working and connected system in the shared drive and the search results are displayed in the grid view which is the output. The file can be accessed just by clicking the result that appears. Thus this provides a easy way to search a file over a number of systems connected to a network simultaneously. Thus it is very effective since the search is done in a number of systems simultaneously. CHAPTER 2 LITERATURE REVIEW 2. LITERATURE REVIEW 2.1 Existing System: When a particular file has to be searched which is stored in another system connected over network, the IP address of the system...
Words: 4829 - Pages: 20