Posts

Tutorial DDL SQL

Image
DDL Part 1 Objectives After completing this lesson, you should be able to do the following: • Create tables • Alter table definitions • Drop, rename, and truncate tables *Lesson Aim In this lesson, you learn about tables, the main database objects, and their relationships to each other. You also learn how to create , alter, and drop tables.* Outline • Naming Rules • DDL Syntax – Creating Table – Altering Table – Dropping Table Naming Rules Table names and column names: • Must begin with a letter • Must be 1–30 characters long • Must contain only A–Z, a–z, 0–9, _, $, and # • Must not duplicate the name of another object owned by the same user The CREATE TABLE Statement You must have: – CREATE TABLE privilege – A storage area Ex. CREATE TABLE [ schema .] table ( column datatype [DEFAULT expr ][, ...]); The CREATE TABLE Statement – schema is the same as the owner’s name – table is the name of the table – D...

OQL LEAGUE

OQL LEAGUE 1.1 Introduction In this chapter, we describe an object query language named OQL, which supports the ODMG data model. It is complete and simple. It deals with complex objects without privileging the set construct and the select-from-where clause. We first describe the design principles of the language in Section 1.2, then we introduce in the next sections the main features of OQL. We explain the input and result of a query in Section 1.3. Section 1.4 deals with object identity. Section 1.5 presents the path expressions. In Section 1.6, we show how OQL can invoke operations and Section 1.7 describes how polymorphism is managed by OQL. Section 1.8 concludes this part of the presentation of the main concepts by exemplifying the property of operators composition. Finally, a formal and complete definition of the language is given in Section 1.9. For each feature of the language, we give the syntax, its semantics, and an example. Alternate syntax for some features are...