...1. Explain DML, DDL, DCL and TCL statements with examples? Answer: DDL Data Definition Language (DDL) statements are used to define the database structure or schema. Some examples: * CREATE - to create objects in the database * ALTER - alters the structure of the database * DROP - delete objects from the database * TRUNCATE - remove all records from a table, including all spaces allocated for the records are removed * COMMENT - add comments to the data dictionary * RENAME - rename an object DML Data Manipulation Language (DML) statements are used for managing data within schema objects. Some examples: * SELECT - retrieve data from the a database * INSERT - insert data into a table * UPDATE - updates existing data within a table * DELETE - deletes all records from a table, the space for the records remain * MERGE - UPSERT operation (insert or update) * CALL - call a PL/SQL or Java subprogram * EXPLAIN PLAN - explain access path to data * LOCK TABLE - control concurrency DCL DCL is abbreviation of Data Control Language. It is used to create roles, permissions, and referential integrity as well it is used to control access to database by securing it. * GRANT - gives user's access privileges to database * REVOKE - withdraw access privileges given with the GRANT command TCL Transaction Control (TCL) statements are used to manage the changes made by DML statements. It allows...
Words: 2240 - Pages: 9
...Model–view–controller (MVC) is a software architectural pattern for implementing user interfaces. It divides a given software application into three interconnected parts, so as to separate internal representations of information from the ways that information is presented to or accepted from the user. The Model View ViewModel (MVVM) is an architectural pattern used in software engineering that originated from Microsoft as a specialization of the Presentation Model design pattern introduced by Martin Fowler.[1] Largely based on the model–view–controller pattern (MVC), MVVM is a specific implementation targeted at UI development platforms which support the event-driven programming in Windows Presentation Foundation (WPF) and Silverlight on the .NET platforms using XAML and .NET languages. Technically different, but similar, Presentation Model design patterns are available in HTML5 through AngularJS,[2][3] KnockoutJS, Ext JS,[4] Vue.js,[5] and for Java the ZK framework (Model-View-Binder). What is garbage collection? Garbage collection is a CLR feature which automatically manages memory. Programmers forget to release the objects while coding ..... Laziness (Remember in VB6 where one of the good practices is to set object to nothing). CLR automatically releases objects when they are no longer in use and refernced. CLR runs on non-deterministic to see the unused objects and cleans them. One side effect of this non-deterministic feature is that we cannot assume an object is destroyed...
Words: 1735 - Pages: 7
...Part 1: Question and Answer Question 1: Difference between Indexed Table and Indexed View.. Indexes on table are generally always used. You will have at least one unique index and one of the indexes will be clustered. Indexes on views are generally only applied as an optimization technique. Indexes on the view can improve performance using the views. Question 2: Clustered VS non-clustered index Question 3: Explain HIP table A: Heap table is a table that does not have any Clustered Index. Question 4: Maximum number of columns a table can have for SQL Server 2000, 2005, 2008 and 2012 A: 1024 Question 5: Difference between Delete and Truncate Delete and Truncate they both delete data. Difference is Delete keeps a record in the log file but truncate does not keep any record in the log file. So if you do a truncate operation you won't have any option to recover at a later time. Question 6: What is rollback? A: Rolls back an explicit or implicit transaction to the beginning of the transaction, or to a savepoint inside the transaction. You can use ROLLBACK TRANSACTION to erase all data modifications made from the start of the transaction or to a savepoint. It also frees resources held by the transaction. ROLLBACK { TRAN | TRANSACTION } [ transaction_name | @tran_name_variable | savepoint_name | @savepoint_variable ] [ ; ] Question 7: Difference between Primary Key and Unique Key Primary key does not allow...
Words: 1489 - Pages: 6
...1. INTRODUCTION Oracle has many tools such as SQL * PLUS, Oracle Forms, Oracle Report Writer, Oracle Graphics etc. SQL * PLUS: The SQL * PLUS tool is made up of two distinct parts. These are • Interactive SQL: Interactive SQL is designed for create, access and manipulate data structures like tables and indexes. • PL/SQL: PL/SQL can be used to developed programs for different applications. Oracle Forms: This tool allows you to create a data entry screen along with the suitable menu objects. Thus it is the oracle forms tool that handles data gathering and data validation in a commercial application. Report Writer: Report writer allows programmers to prepare innovative reports using data from the oracle structures like tables, views etc. It is the report writer tool that handles the reporting section of commercial application. Oracle Graphics: Some of the data can be better represented in the form of pictures. The oracle graphics tool allows programmers to prepare graphs using data from oracle structures like tables, views etc. SQL (Structured Query Language): Structured Query Language is a database computer language designed for managing data in relational database management systems(RDBMS), and originally based upon Relational Algebra. Its scope includes data query and update, schema creation and modification, and data access control. SQL was one of the first languages for Edgar F. Codd's relational model in his influential 1970 paper, "A Relational...
Words: 4763 - Pages: 20
...your group’s collective responses to the class. Due to some particular circumstances, if you are not able to attend a tutorial session, make sure to: a) let your tutor know asap the reason(s) you missed the class by email; b) submit your answers to the tutorial questions by its due date electronically using Moodle. Before attempting the following tutorial activities, you need to learn this week’s lecture slides. To gain more understanding of the topics covered in this week review Chapters: Chapters: 8.5, 7.2.7, 3.2.2 and 3.3 of your textbook. ASSESSABLE TASKS OF THE WEEK Objectives: * Review DDL and DML statements * Investigate views, indexes, data integrity and data security Activities: 1. Discuss the difference between DDL and DML. DDL Data Definition Language (DDL) statements are used to define the database structure or schema. Some examples: * CREATE – to create objects in the database * ALTER –...
Words: 889 - Pages: 4
...------------------------------------------------- // Interface ------------------------------------------------- // ------------------------------------------------- public interface IChoice ------------------------------------------------- { ------------------------------------------------- string Buy(); ------------------------------------------------- } ------------------------------------------------- A new class will be added and this class we will be called factory class. This class sits between the client class and the business class and based on user choice it will return the respective class object through the interface. It will solve problem 3// ------------------------------------------------- // Factory Class ------------------------------------------------- // ------------------------------------------------- public class FactoryChoice ------------------------------------------------- { ------------------------------------------------- static public IChoice getChoiceObj(string cChoice) ------------------------------------------------- { ------------------------------------------------- IChoice objChoice=null; ------------------------------------------------- if (cChoice.ToLower()...
Words: 4323 - Pages: 18
...DBMS vs. RDBMS • Relationship among tables is maintained in a RDBMS whereas this not the case DBMS as it is used to manage the database. • DBMS accepts the ‘flat file’ data that means there is no relation among different data whereas RDBMS does not accepts this type of design. • DBMS is used for simpler business applications whereas RDBMS is used for more complex applications. • Although the foreign key concept is supported by both DBMS and RDBMS but its only RDBMS that enforces the rules. • RDBMS solution is required by large sets of data whereas small sets of data can be managed by DBMS. 1. What is database? A database is a collection of information that is organized. So that it can easily be accessed, managed, and updated. 2. What is DBMS? DBMS stands for Database Management System. It is a collection of programs that enables user to create and maintain a database. 3. What is a Database system? The database and DBMS software together is called as Database system. 4. What are the advantages of DBMS? I. Redundancy is controlled. II. Providing multiple user interfaces. III. Providing backup and recovery IV. Unauthorized access is restricted. V. Enforcing integrity constraints. 5. What is normalization? It is a process of analysing the given relation schemas based on their Functional Dependencies (FDs) and primary key to achieve the properties (1).Minimizing redundancy, (2). Minimizing insertion, deletion and update anomalies. 6. What...
Words: 3541 - Pages: 15
...2. Why is the relational database model most commonly used today? What impact does it have on data integrity? * The idea came from Edgar F Codd in 1970 he worked for IBM at the time * Advantage is the tables define the relationships among themselves by mean of repeating an attribute or column from one table in another table “called Keys” * One of the problems was data redundancy; means to store the same data in more than place in the database * Codd’s theoretical design minimized redundancy * The impact is; the complexity of the design, its easy to create a hard to use database, or hard to fine the data you entered into the database. So a well-designed database = data integrity and flexibility. 3. Distinguish between data integrity and redundancy. * Data integrity = to the accuracy and quality of the data * Redundancy = refers to data that is repeated in multiple places in a database. 4. What is an entity? * An object of concern to a database, such as a customer or sale. Used in the logical design phase of a database. The main key that starts the gathering of data into one place. 5. What are attributes? * A quality that describes or defines some aspect of a...
Words: 2656 - Pages: 11
...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 Solutions...
Words: 19188 - Pages: 77
...use herder() function for redirection of pages. It is important to notice that header() must be called before any actual output is seen.. 2) what does the error message "header already sent" mean? Ques: 10 How we can upload videos using PHP? Ans: When want to upload videos using PHP we should follow these steps: 1.first you have to encrypt the the file which you want to upload by using "multipart-form-data" to get the $_FILES in the form submition. 2.After getting the $_FILES['tmp_name'] in the submition 3.By using move_uploaded_file (tmp_location,destination) function in PHP we can move the file from original location. 3) What is the difference between $name and $$name? $name is variable where as $$name is reference variable like $name=sonia and $$name=singh so $sonia value is singh. 4) What are the differences between require and include? Both include and require used to include a file but when included file not found Include send Warning where as Require send Fatal Error . 5) Can we use include ("xyz.PHP") two...
Words: 5893 - Pages: 24
...terminal files (B) When you need to fetch file metadata [a] (C) None (D) All the above 2. Difference between getc and fgetc (a) fgetc can be implemented as macro, where as getc cannot be implemented as macro (b) getc can be implemented as macro, where as fgetc cannot be implemented as a macro [b] (c) getc is used to write a character and fgetc to read a character (d) fgetc to write a character and getc to read a character 3. rewinddir returns (a) 0 (b) -1 [c] (c) no value (d) error (4) The functions which change the execution mode of the program from user mode to kernel mode are known as (a)...
Words: 1393 - Pages: 6
...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: 38789 - Pages: 156
...® OCA Oracle Database 11g: SQL Fundamentals I Exam Guide (Exam 1Z0-051) ABOUT THE AUTHORS John Watson (Oxford, UK) works for BPLC Management Consultants, teaching and consulting throughout Europe and Africa. He was with Oracle University for several years in South Africa, and before that worked for a number of companies, government departments, and NGOs in England and Europe. He is OCP qualified in both database and Application Server administration. John is the author of several books and numerous articles on technology and has 25 years of experience in IT. Roopesh Ramklass (South Africa), OCP, is an independent Oracle specialist with over 10 years of experience in a wide variety of IT environments. These include software design and development, systems analysis, courseware development, and lecturing. He has worked for Oracle Support and taught at Oracle University in South Africa for several years. Roopesh is experienced in managing and executing IT development projects, including infrastructure systems provisioning, software development, and systems integration. About the Technical Editor Bruce Swart (South Africa) works for 2Cana Solutions and has over 14 years of experience in IT. Whilst maintaining a keen interest for teaching others, he has performed several roles including developer, analyst, team leader, administrator, project manager, consultant, and lecturer. He is OCP qualified in both database and developer roles. He has taught at Oracle University...
Words: 150089 - Pages: 601
...1 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 ...
Words: 42387 - Pages: 170
...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