Sql File

In: Computers and Technology

Submitted By simran22
Words 252
Pages 2
Index:

S. No. Content Page No.
1. Screen shots of Queries 4-16

2. References 17

QUERY 1
Select name,address from
(
select CONCAT(emp_fname,' ',emp_lname) as name , CONCAT(address_st,', ', address_city, ' ',address_state, ' ', address_postcode ) as address, emp_salary_hourly as salary from employee,casual,address where (employee.emp_id = casual.emp_id and employee.address_id_postal= address.address_id) union select CONCAT(emp_fname,' ',emp_lname) as name , CONCAT(address_st,', ', address_city ' ',address_ state, ' ',address_postcode ) as address, emp_salary_yearly as salary from employee, fulltime, address where (employee.emp_id = fulltime.emp_id and employee.address_id_postal= address.address_id)) temp order by salary ;

[pic]

QUERY 2

select CONCAT(Cust_FName ,' ' , Cust_LName) as Name, CustOrd_Date from CUSTOMERORDER, CUSTOMER where (CUSTOMERORDER.Cust_Number = CUSTOMER.Cust_Number) order by CustOrd_Date desc limit 1 ;

[pic]

QUERY 3

select str_name,CONCAT(address_st,',',address_city, '',address_state,' ',address_postcode)as address from store,address, where store.address_id= address.address_id) order by str_name;

[pic]

QUERY 4

select Cust_Number , CONCAT(Cust_FName,' ',Cust_LName) as Name from CUSTOMER where Cust_Number Not In ( select CUSTOMER.Cust_Number from CUSTOMER, CUSTOMERORDER where CUSTOMER.Cust_Number = CUSTOMERORDER.Cust_Number ) ,

[pic]

Query 5 select CONCAT(emp_fname,' ',emp_lname) as name from employee where emp_id in( select emp_id from jobtype, casual where ( jobtype.jobtype_id =…...

Similar Documents

File

...institution, organization firm. Ex-Employees. 3. Malware is a evil dangerous software.It is a program that is inserted into a system with the intent of compromising confidentiality, integrity and availability of victims data, application or operating systems. Virus is a program that attach themselves to legitimate programs on victim’s computer, where as a worm is a program that don’t attach themselves to victim’s programs. Virus is spread by email, instant messaging and file transfer etc. Direct propagating worms can jump from one computer to another with out human intervertion on the receiving computers. Because direct propagating is a weakness which allows an attacker to reduce a system's information assurance to his/her work easily. Trogan horse. 4.A program that hides itself by deleting a sys files and tacking on the sys files name by hackers or by virus or worms as a part of its payload. Trogan Horse is a program that which hides system files and shows itself a sys fileby renaming and such files are difficult to find. RAT remote access trogan,gains control on the victim’s computer remotely,like opening closing typing on victims computer. Downloader are small trojan horses that allow large trogan horses after the downloader is installed . Spyware are the Trojan horses that gather information about victim and make it available to the attackers. Cookies can be dangerous at times because they can contain too personal data/ information when exposed......

Words: 1819 - Pages: 8

File

...The first thing that most new users shifting from Windows find confusing is navigating the Linux file system. The Linux file system functions differently than the Windows file system. I will compare and contrast the differences of both and takes you through the layout input/output systems of both. In Linux, there is only a single hierarchal directory structure. Everything begins from the root directory which is represented by the symbol /, which then expands into sub-directories. Windows includes various partitions and then directories under those partitions; Linux places all the partitions underneath the root directory by mounting them in specific directories. In contrast, Windows uses the letter C as its root directory. In Windows, various partitions are detected during the boot process and are assigned a drive letter. Under Linux, the system must mount partitions and devices during the boot process; otherwise it will be unaware of its existence. This might not seem very convenient to provide access to your partitions or devices, but it offers greater flexibility. This is known as the unified file system in Linux which offers several advantages over the Windows file system. For example, let's examine the /usr directory. This directory resides off the root directory and contains most of the system executables. With the Linux file system, you can choose to mount it off another partition or even off another machine over a network connection. The underlying system......

Words: 309 - Pages: 2

Sql for Beginners

...An Training Guide SQL & SQL*Plus for Beginners Training Guide SQL & SQL*Plus for Beginners www.appltop.com info@appltop.com Course Introduction Copyright © 1999 – 2004 ApplTop Solutions Limited 2 Training Guide SQL & SQL*Plus for Beginners www.appltop.com info@appltop.com Course Objectives This course is designed to give each delegate a basic understanding/awareness of the following... • Oracle SQL • Oracle SQL*Plus Copyright © 1999 – 2004 ApplTop Solutions Limited 3 Training Guide SQL & SQL*Plus for Beginners www.appltop.com info@appltop.com Course Objectives This course is designed to give each delegate a basic understanding of the following topics... • Oracle SQL. You will learn how to use the industry standard tool for working with a Relational Database. You will also learn many other things, from constructing simple queries to creating your own tables. • Oracle SQL*Plus. After the course you should have a good understanding of SQL*Plus, from starting it, to creating simple reports on it. During the course there will be several exercises to complete. Copyright © 1999 – 2004 ApplTop Solutions Limited 4 Training Guide SQL & SQL*Plus for Beginners www.appltop.com info@appltop.com Note that this guide is meant only as an introduction to SQL and SQL*Plus and therefore much of the newer, more advanced features available in Oracle databases 8i, 9i and 10g are not covered. Copyright © 1999 – 2004 ApplTop......

Words: 19188 - Pages: 77

Database - Sql

...for index covering, requires fewer I/Os than the same query using an index on any single attribute, is a good way to enforce the uniqueness of multiple attributes, * D=: Adds complexity, Can lead to duplicate relationships unless you enforce uniqueness on the relationship (which a primary key would do by default), Likely slower: database must maintain two indexes rather than one. 9. What are the main functions of the RDBMS? * A system for managing relational database. Needs two allow the user to create one or more databases and the objects associated with that database such as tables, relationships, views, and queries. It also needs to support basic maintenance such as backing up the database and restoring it from a backup file. 10. Define: a. Statement of Work * A statement of what needs to be done often including a history of the problem, a statement of scope, objectives of the project, timelines, and deliverables. b. Scope * What will and what won't be in the database? Only what is known and can be controlled well. Avoid wrong and maybe outdated data. Create for example an interface with an other system, where that data is inside the scope. c. Stakeholders * Some one who has a “stake” in the success or contents of the database. d. Requirements * Something of a database or program must do to fulfill its function. e. Security Requirements * Some or all of the data in a database is......

Words: 2656 - Pages: 11

File

...agree is the judges’ decision to allow the medical staff to slowly deteriorate the victims health with medicinal procedures. The medical staff and hospital should not be allowed to slowly kill a victim by giving them medicine. It’s against the constitutional law. SHOARS v. EPSON AMERICA, INC. High-Tech Monitoring Accoring to the book, Americans are protected by privacy laws to a certain degree. The federal Omnibus Crime Control and Safe Streets Act of 1968 regulates the government's use of wiretapping to listen to telephone conversations. The Privacy Protection Act of 1974 and the Freedom of Information Act require the government to be fair when it collects, uses, and discloses private information. Sometimes, however, people file lawsuits saying the government has gone too far with an investigation. That was the case in Watkins v. United States (1957). In the 1950s, Congress was investigating communist activity in the United States. Communists were members of a political party that wanted to overthrow the federal government. John T. Watkins, a labor union official, was called before Congress to testify about known communists. Watkins refused to identify people who used to be, but no longer were, members of the Communist party. Watkins was convicted of contempt of Congress for refusing to answer such questions, but the Supreme Court reversed his conviction. The Court said Congress does not have unlimited power to investigate the private lives......

Words: 2131 - Pages: 9

Sql Tutorial

...SQL Tutorial SQL TUTORIAL Simply Easy Learning by tutorialspoint.com tutorialspoint.com i ABOUT THE TUTORIAL SQL Tutorial SQL is a database computer language designed for the retrieval and management of data in relational database. SQL stands for Structured Query Language. This tutorial will give you quick start with SQL. Audience This reference has been prepared for the beginners to help them understand the basic to advanced concepts related to SQL languages. Prerequisites Before you start doing practice with various types of examples given in this reference, I'm making an assumption that you are already aware about what is database, especially RDBMS and what is a computer programming language. Copyright & Disclaimer Notice All the content and graphics on this tutorial are the property of tutorialspoint.com. Any content from tutorialspoint.com or this tutorial may not be redistributed or reproduced in any way, shape, or form without the written permission of tutorialspoint.com. Failure to do so is a violation of copyright laws. This tutorial may contain inaccuracies or errors and tutorialspoint provides no guarantee regarding the accuracy of the site or its contents including this tutorial. If you discover that the tutorialspoint.com site or this tutorial content contains some errors, please contact us at webmaster@tutorialspoint.com TUTORIALS POINT Simply Easy Learning Table of Content SQL Tutorial .................................................................

Words: 39505 - Pages: 159

Database Sql

...Matharu, Rajdeep Unit 1 True/False Questions 1) At its simplest, a database can be seen as a collection of related data. - True 2) A delimited file is a file where the length of the file is limited. - False 3) A delimited file is one in which the data is separated by a character such as a comma. - True 4) All fixed length files are of the same length. - False 5) In relational databases, logical design is kept separate from physical design. - True 6) A hierarchical database is designed with a tree-like structure that resembles a file system. - True 7) Codd defined the core principles of a relational database in 1970. - True 8) Data redundancy improves the integrity of a database. - False 9) In a diagram, crows feet notation conveys more information about the relationships. - True 10) A primary key uniquely identifies each row in a database table. - True 11) In a relational database, all data is kept in tables, even the information about the tables. - True 12) SQL is the language used by relational databases to create objects and to manipulate and retrieve data. - True 13) An entity is someone who is interested in the database. - False 14) In a statement of scope, a constraint is a limit on what the database will do. - True 15) Oracle is a popular relational database management system. 16) A relational database management system does not include tools for backing up and restoring databases. 17)......

Words: 307 - Pages: 2

Sql Book

... A GUIDE TO SQL Eighth Edition This page intentionally left blank A G U I D E TO S Q L Eighth Edition Philip J. Pratt Grand Valley State University Mary Z. Last University of Mary Hardin-Baylor Australia • Brazil • Japan • Korea • Mexico • Singapore • Spain • United Kingdom • United States A Guide to SQL, Eighth Edition Philip J. Pratt, Mary Z. Last Vice President, Publisher: Jack Calhoun Editor-in-Chief: Alex von Rosenberg Senior Acquisitions Editor: Charles McCormick, Jr. Product Manager: Kate Hennessy Development Editor: Jessica Evans Editorial Assistant: Bryn Lathrop Marketing Director: Brian Joyner Marketing Manager: Bryant Chrzan Marketing Communications Manager: Libby Shipp Marketing Coordinator: Suellen Ruttkay Content Project Manager: Matt Hutchinson Art Director: Stacy Jenkins Shirley, Marissa Falco Cover Designer: Joseph Sherman Cover Image: Getty Images/Taxi/Chris Bell Manufacturing Coordinator: Denise Powers © 2009 Course Technology, Cengage Learning ALL RIGHTS RESERVED. No part of this work covered by the copyright hereon may be reproduced, transmitted, stored, or used in any form or by any means graphic, electronic, or mechanical, including but not limited to photocopying, recording, scanning, digitizing, taping, Web distribution, information networks, or information storage and retrieval systems, except as permitted under Section 107 or 108 of the 1976 United States Copyright Act, without the prior written permission of the publisher...

Words: 48772 - Pages: 196

Sql Database

...dwqwdlqkdmqwkldnqwkldnwkdnwqdldkwd Solutions To Workshop Exercises Chapter 1: SQL and Data 4 Chapter 2: SQL: The Basics 13 Chapter 3: The WHERE and ORDER BY Clauses 20 Chapter 4: Character, Number, and Miscellaneous Functions 27 Chapter 5: Date and Conversion Functions 42 Chapter 6: Aggregate Functions, GROUP BY and HAVING 57 Chapter 7: Equijoins 73 Chapter 8: Subqueries 108 Chapter 9: Set Operators 126 Chapter 10: Complex Joins 137 Chapter 11: Insert, Update, and Delete 164 Chapter 12: Create, Alter, and Drop Tables 178 Chapter 13: Indexes, Sequences, and Views 188 Chapter 14: The Data Dictionary, Scripting, and Reporting 197 Chapter 15: Security 213 Chapter 16: Regular Expressions and Hierarchical Queries 222 Chapter 17: Exploring Data Warehousing Features 235 Chapter 18: SQL Optimization 248 Chapter 1: SQL and Data In this chapter, you learned about data, how data is organized in tables, and how the relationships among the tables are depicted in a schema diagram. Based on your newly acquired knowledge, design a schema diagram based on the fictional ACME Construction Company. Draw on your own work experience to design the following components. 1. Draw boxes for these three tables: EMPLOYEE, POSITION, and DEPARTMENT. Solution: See the solution for Exercise 3. 2. Create at least three columns for each of the tables and designate a primary key for each table. Solution: See the solution for Exercise 3. 3. Create relationships among......

Words: 6586 - Pages: 27

File

...Chapter 4 1. How can you create a file called history by using a redirection operator? >history 2. Wait one minute or more and then change the timestamp on the history file you just created. touch history 3. Back up the history file to the file history.bak. history >history.bak 4. Sort the corp_phones1 file by the last four digits of the phone number. sort –n –k3 corp_phones1 5. Create and use a command that displays only the last names and telephone numbers (omitting the area code) of people in the corp_phones2 file. Place a space between the telephone number and the last name. cut –c 5-20 corp_phone1>corp_phones2 6. Assume you have a subdirectory named datafiles directly under your current working directory. What command can you use to copy the data1 and data2 files from your current working directory to the datafiles directory? cp data1 data2 ./datafiles 7. Assume you have four files: accounts1, accounts2, accounts3, and accounts4. Write the paste command that combines these files and separates the fields on each line with a “/” character, displaying the results to the screen. paste –d / accounts1 accounts2 accounts3 accounts4 8. How would you perform the action in Discovery Exercise 7, but write the results to the file total_accounts? paste –d / accounts1 accounts2 accounts3 accounts4 >total_accounts 9. Assume you have 10 subdirectories and you want to locate all files that end with the extension......

Words: 662 - Pages: 3

File

...at it is very cheaper rates than traditional proposal and can also significantly so lower than all over IT expenses, at the same time that will for us very convenient and scalable charging models have to appears and that making that cloud even look more attractive. Convenience and continuous availability: The cloud service offers to public cloud service that are available whenever the end-user may be locate that he can access. This representation enables easily can access to information and helps the needs of users in different time zone or different place and geographic locations also that we can access, if we see side benefit, explain booms since it is very easier than ever to access we also view and modification shared documents and files. Increased storage capacity: The cloud computing can supports or accommodates and store huge more data if we compare to a personal computer this offers almost to store unlimited for storage capacity, it supports us don’t worries about running out of storages space & at the same time that we can store huge data. Backup and recovery: In this backup and recovering data is stored into cloud and not on physical device. And sometimes the clouds itself backup the data from the local computers. And it is flexible and easy in providing the backup and recovery services. Disadvantages of cloud computing: Slow speed: It takes longer duration while uploading and downloading of large data from the cloud. Security and privacy: If we talk......

Words: 762 - Pages: 4

Sql & Qbe

...SQL & QBE There are three typical operations that are done in querying databases (relational algebra): (1) Project—select columns [SELECT in SQL] (2) Restrict—select rows [WHERE] (3) Join—select columns and merge on rows that meet conditions [FROM] & [WHERE] Relational algebra is not used in current systems. It is a conceptual/theoretical way to manipulate RDBs. Structured Query Language (SQL) is a widely used language that retrieves and updates data in tables and views (manipulate RDBs). QBE is a user interface that simplifies SQL procedures. Other than some minor syntax differences, SQL is standardized. It is very powerful—i.e. you can do almost anything with data tables that you want. It is also simple to use. SQL is set based—returns a subset of tables referenced. Action queries enable user to change, insert, create, and delete data sets (tables). Selection queries retrieve and display data. Parameter queries prompt for input information. Dynasets are temporary tables that Access uses to store data resulting from a query. Tables must be related if used in a query. Natural join (equijoin or inner join)—most common kind of join. Two tables are joined on the common (join) column. The WHERE (=) statement specifies the join column(s) in which the rows have to match. Outer join (full)—all rows from both tables are included in output table (left and right outer joins would include all rows in one table but only the matches from the other). ...

Words: 1410 - Pages: 6

No Sql Databases

...particular NoSQL solution on the above mentioned factors. 1. Introduction Until recently, Relational database systems have been on the forefront of data storage and management operations. The advent of mobile applications that requires real time analysis like GPS based services, banking and social media has led to huge unstructured data being produced every second. Traditional RDBMS systems have found it difficult to cater to these huge chunks of unstructured data, as RDBMS mainly stores structured data in tabular format. Also, the unstructured data being mapped to a relational database results in increase in complexity as it uses expensive infrastructure to model the same. Also, even if the data model fits into SQL, platter of features provided by SQL becomes an overhead. Relational schema becomes a burden on applications which are trying to store data in multiple forms like videos, blogs and images etc. A new methodology for data management was introduced for the management of unstructured data known as NoSQL (Not Only Structured Query Language). NoSQL covers a broader topic of data structuring, storage and aggregation via various implementation approaches. It can store unstructured data and provide real time analysis to back up the web service applications. It gives up on conventional benchmarking of database management principles like Atomicity, Consistency, Isolation and Durability, to attain flexible data handling. Also, it provides inbuilt data......

Words: 4246 - Pages: 17

Sql Injection.

...due to a SQL injection flaw in a web application that communicate with a database. Over ten years have passed since a famous hacker coined the term “SQL injection” and it is still considered one of the major application threats. A lot has been said on this vulnerability, but not all of the aspects and implications have been uncovered, yet. This paper aim is to collate some of the existing knowledge, introduce new techniques and demonstrate how to get complete control over the database management system's underlying operating system, file system and internal network through SQL injection vulnerability in over-looked and theoretically not exploitable scenarios. This paper also discuss about the prevention from the SQL Injection, not only in ORACLE but also in PHP, C#, JAVA and other languages. INDEX ABSTRACT………………………………………………………………………………….....02 INTRODUCTION……………….…………………………….…….………………………….04 BLIND SQL INJECTION…………………………………….………………………………..05 SQL INJECTION OVERVIEW…………………………….………………………………....06 CATEGORIES OF SQL INJECTION ATTACKS…………………………………………..07 WHAT’S VULNERABLE…………………………………………………………..…………08 WHAT’S NOT VULNERABLE…………………………………………………….………….08 SQL INJECTION METHODS……………………………………….……………….……….09 SQL MANIPULATION………………………………………………………..……………….09 CODE INJECTION……………………………………………………….……………………10 FUNCTION CALL INJECTION……………………………………………………………….11 BUFFER OVERFLOWS………………………………………………………………………13 SQL INJECTION TESTING METHODOLOGY………………………………………….....14 PREVENTING SQL......

Words: 3449 - Pages: 14

Sql Plus

...Introduction to Oracle9i: SQL Instructor Guide • Volume 1 40049GC11 Production 1.1 October 2001 D33993 Authors Copyright © Oracle Corporation, 2000, 2001. All rights reserved. Nancy Greenberg Priya Nathan This documentation contains proprietary information of Oracle Corporation. It is provided under a license agreement containing restrictions on use and disclosure and is also protected by copyright law. Reverse engineering of the software is prohibited. If this documentation is delivered to a U.S. Government Agency of the Department of Defense, then it is delivered with Restricted Rights and the following legend is applicable: Technical Contributors and Reviewers Josephine Turner Martin Alvarez Anna Atkinson Don Bates Marco Berbeek Andrew Brannigan Restricted Rights Legend Use, duplication or disclosure by the Government is subject to restrictions for commercial computer software and shall be deemed to be Restricted Rights software under Federal law, as set forth in subparagraph (c)(1)(ii) of DFARS 252.227-7013, Rights in Technical Data and Computer Software (October 1988). This material or any portion of it may not be copied in any form or by any means without the express prior written permission of Oracle Corporation. Any other copying is a violation of copyright law and may result in civil and/or criminal penalties. Laszlo Czinkoczki Michael Gerlach Sharon Gray Rosita Hanoman Mozhe Jalali Sarah Jones Charbel......

Words: 33197 - Pages: 133