Components of an object type - attributes in pl/sql, PL-SQL Programming

Assignment Help:

Attributes:

Just similar to variable, an attribute is declared with a name and datatype. The name should be exclusive within the object type. The datatype can be any Oracle type excluding:

(i) LONG & LONG RAW

(ii)NCHAR, NCLOB, & NVARCHAR2

(iii)ROWID & UROWID

(iv)The PL/SQL-specific types BINARY_INTEGER (and its subtypes), PLS_INTEGER, BOOLEAN, RECORD, REF CURSOR, %TYPE, & %ROWTYPE

(v)The types defined within the PL/SQL package

You cannot initialize an attribute in its declaration by using the assignment operator or the DEFAULT clause. You cannot also impose the NOT NULL constraint on an attribute. Though, an object can be stored in the database tables on which you can impose the constraints.

The type of data structure formed by the set of attributes depends on the real-world object being modeled. For illustration, a rational number can present, that has a numerator and a denominator, you require only two INTEGER variables. On another hand, to present a college student, you require quite a few VARCHAR2 variables to hold the name, status, address, phone number, and so on, in addition to a VARRAY variable to hold the courses and grades.

The data structure can be mush complex. For illustration, the datatype of an attribute can be another object type (known as the nested object type). That lets you construct a complex object type from the simpler object types. Some object types like lists, queues, and trees are dynamic, meaning that they can grow as they are used. The Recursive object types, that contain direct or indirect references to themselves, permit for highly complicated data models.


Related Discussions:- Components of an object type - attributes in pl/sql

Fetching across commits, Fetching Across Commits The FOR UPDATE clause...

Fetching Across Commits The FOR UPDATE clauses acquire exclusive all row locks. All rows are locked when you open the cursor, and when you commit your transaction they are unl

Block structure in pl/sql, Block Structure The PL/SQL is a block-struct...

Block Structure The PL/SQL is a block-structured language. That is, the fundamental units (procedures, anonymous blocks, and functions) that make up a PL/SQL program are logi

Declarations in sql-pl/sql, Declarations in SQL Your program stores value...

Declarations in SQL Your program stores values in the variables and constants. As the program executes, the value of the variables can change, but the values constants cannot.

Full time system administrator, Need Windows and Linux system Administrator...

Need Windows and Linux system Administrator We are seeking a part time system administrator to take care of our servers. Your things to do would add, but not limited to: -

Sql, If two relations R and S are joined, then the non matching tuples of b...

If two relations R and S are joined, then the non matching tuples of both R and S are ignored in __________________.

Difference between 9i & 10g, Difference between 9i & 10G When Oracle r...

Difference between 9i & 10G When Oracle releases any new databases then it are having some discrepancy with them. But 10G is having much difference than oracle 9i has. Oracle

Understanding nested tables, Understanding Nested Tables Within the data...

Understanding Nested Tables Within the database, the nested tables can be considered as one-column database tables. The Oracle stores the rows of a nested table in no specific o

Using aggregation on nested tables - sql, Using Aggregation on Nested Table...

Using Aggregation on Nested Tables Example is the most direct translation of its counterpart in the theory book that can be obtained in SQL but it is so over-elaborate that no

Example of cast operator - sql, Example of Cast Operator So long as C...

Example of Cast Operator So long as CAST is used as shown, we could obtain the total marks for each exam in similar fashion, using SUM (Mark) AS TotalMarks. However, this giv

Tautologies, Tautologies: Above given table allows us to read the trut...

Tautologies: Above given table allows us to read the truth of the connectives in the next manner. Just expect we are looking at row three. It means this says that, if there P

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd