Study your flashcards anywhere!

Download the official Cram app for free >

  • Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

How to study your flashcards.

Right/Left arrow keys: Navigate between flashcards.right arrow keyleft arrow key

Up/Down arrow keys: Flip the card between the front and back.down keyup key

H key: Show hint (3rd side).h key

A key: Read text to speech.a key

image

Play button

image

Play button

image

Progress

1/16

Click to flip

16 Cards in this Set

  • Front
  • Back
Define Constraints?
A contraint allows the database designer to enforce business rules about the data stored in the database's tables and the relationships between tables.
What are the types of table constraints?
1- Not Null (needs a value, it doesnot have to be unique)
2- Unique Key (every value in the column must be unique but null values are allowed).
3- Primary Key (unique values in the column but can't have null)
4- Foreign Key (Every value in the column must match with a value in another column in this table or another table, otherwise the value is null)
5- Check (The value must match one of the specified value in this column).
Where does the constraint informations are stored?
They are stored in DD Views
1- DBA_CONSTRAINTS
2- DBA_CONS_COLUMNS.
Give SQL Example of adding a Primary Key?
SQL>ALTER TABLE DEPT add constraint DEPT_PK primary key (DEPTNO);
SQL>CREATE TABLE EMP(empno number(4) constraint EMP_PK primary key, empname varchar2(10), deptno number(2) constraint EMP_PK_DEPTNO references DEPT(deptno))
Define Segment?
A segment is defined as any entity that consumes physical storage within the database.
What are the types of segments?
1- Table (stores data in rows and columns)
2- Index(Improves access to the table data)
3- Rollback (to maintain read consistency and perform transaction recovery)
4- Partition (Divides table into smaller, more manageable pieces for performance purposes)
Define Extent?
Each Oracle segment is made up of continous chun of storage space in the database called extent.
What is the minimum and maximum size of a segment in terms of extents?
At least 1 extent per segment but a segment can have as many as 2 Billion extents.
Define Blocks?
Each extent is made up of smaller chunks of space called blocks.
What is the minimum and maximum size of a extent in terms of blocks?
The minimum size of an extent is 5 blocks.
What is the size of blocks?
The default size of a block is determined at the time of database creation.
The common database block sizes are 2KB, 4KB, 8KB and 16KB.
What is a block composed of?
It is made up of Operating System blocks whose size is determined by the operating system, the most common size is 512 bytes.
What are the types of SQL Statement?
1-Queries created using SQL
2-DML (Insert, Update and Delete)
3-DDL (Create, Alter, Drop)
4-DCL (Grant and Revoke)
What are the benefits of PL/SQL on SQL?
SQL doesnot support:
1- Condition Testing
2- Looping
3- Exception Handling.
What are the types of PL/SQL Objects?
1- Anonymous Block (a block of PL/SQL code that is not stored in the database, but instead its embedded in a form, webpage, or SQL script)
2-Procedure (the code in the database which performs a specific action)
3- Function (the PL/SQL code that is stored in the database and return a value)
4- Package(collection of related functions and procedures)
5- Trigger(the code which runs whenever some activity occurs).
What are the categories of Oracle Server Architecture?
1- User-related processes
2- Oracle Instance (memory structure)
3- Database (physical file structure).