Professional Documents
Culture Documents
Data
Data is nothing piece of Information , that needs to be stored. In computer term, data is referred as Information. It should be performed for any business. It is stored on Computer system.
Database
Database is any organized collection of data. Collection of related information stored in an organized manner. Purpose is Store and Retrieve information. Database must implement the SQL request. It needs to be Stored, Organized, Accessed, Protected & Manipulated. ACID Model is one of the most important concepts of Database Theory.
Acid Model
ACID refers basic properties of Database transaction. Atomicity All or nothing , entire transaction fails if part of query fails. Consistency Only valid data is written to database. Isolation Multiple simultaneous transactions dont impact each other Durability Committed transactions to database will never be lost.
Page | 1
DBS
DBS Stands for Data Base System. It is also called as DBMS , collection of records stored into the database Database & DBMS software together called as Data Base System.
Functions of DBMS
Data definitions Data manipulations Multiuser access control Data Security & Data Integrity Data Dictionary & Performance Data Backup , Recovery & Concurrency Data transformation & presentation Database language & Application programming interfaces. Database communication Interfaces & Storage management.
DBMS Disadvantages
Cost of Data conversion and cant be organize complex data easily. Migration , Software & Hardware is high Cost. Power dependency - Database damage. DBMS softwares are complex and internal training required to staffs. Possible for some un authorized users to access the database. Implementing a DBMS can be more expensive, especially for largest organizations. (FILE PROCESSING SYSTEM to DBMS)
Page | 2
RDBMS Entry
RDBMS = DBMS + REFERENTIAL INTEGRITY In 1970 , Codd introduced theory of relational database. Thirteen rules defined by codd for RDBMS. RDBMS manages relationship among multiple tables .
10g Database Administration BASICS 4. Active online catalog based on the relational model The system is required to support an online, inline, relational catalog that is accessible to authorized users by means of their regular query language. 5. Comprehensive data sublanguage rule The system must support a least one relational language that (a) has a linear syntax, (b) can be used both interactively and within application programs, and (c) supports data definition operations (including view definitions), Data manipulation operations (updates well as retrieval), security & integrity constraints and transaction management operations (begin, commit , and rollback ). 6. View updating rule All views that are theoretically updatable must be updatable by the system. 7. High-level insert, update, and delete The system must support set-at-a-time INSERT, UPDATE & DELETE operators. 8. Physical data independence Application programs and ad hoc programs are logically unaffected when physical access methods or storage structures are altered. 9. Logical data independence Logical data independence--Application programs and ad hoc programs are logically unaffected, to the extent possible, when changes are made to the table structures.
Page | 4
10g Database Administration BASICS 10. Integrity independence Integrity constraints must be specified separately from application programs and stored in the catalog. It must be possible to change such constraints as and when appropriate without unnecessarily affecting existing applications. 11. Distribution independence Existing applications should continue to operate successfully (a) when a distributed version of the DBMS is first introduced; (b) when existing distributed data is redistributed around the system. 12. The non subversion rule If the system provides a low-level (record-at-a-time) interface, then that interface cannot be used to subvert the system (e.g.) bypassing a relational security or integrity constraint.
Page | 5
Table
Table
Table
Table
e Table
Table
Table
Table
Key Field
Table Table
Table
Table
RDBMS
RDBMS stands for Relational Database Management System. Designed by E.F Codd year of 1970. Relational Model is based on relational algebra. RDBMS follows ACID property. Relational Database Multi table. Relational model represents data in the form of table. Datas are stored as rows and columns in multiple tables. Table is two dimensional array contains ROWS & Columns. RDBMS stores data in tables with relationships to other tables. RDBMS makes data to be relational between multiple tables. Normalization works to check database table consistency.
Foregin key concept is supported by RDBMS it enforces the rule Tables having relationship to each other tables connected through keyfield.
Page | 6
Table / Relation
Internal working access datas are relational manner that is RDBMS. Main advantage of an RDBMS is that it checks for referential integrity (relationship between related records using Foreign Keys). You can set the constraints in an RDMBS such that when a particular record is changed, related records are updated / deleted automatically.
RDBMS Terminology
Relational Term Relation , Entity Tuple Cardinality Attribute Degree Primary key Domain Informal Equivalents Table Row , Record No of rows Column , Field No of columns Unique Identifier Set of legal values
Page | 7
Page | 8
Page | 9
10g Database Administration BASICS Simplified Oracle10g installation Transparent Data Encryption Temporary tablespace group Transport tablespace across Platforms Undo Advisor
Version Supported Parameters Unsupported Parameters Dynamic Performance Views (V$) Fixed Views (X$) Events (Waits) Statistics Latches Background Processes (Fixed SGA)
GRID Computing
Grid computing enables the creation of a single IT infrastructure that can be shared by multiple business processes. Oracle software is specifically designed for grid computing, delivering a higher quality of service to those business processes at a much lower cost.
Page | 10
SQL
SQL means Structured Query Language. Originally developed for IBMs (DB2) product in IBM laboratory. SQL pronounced (ess-que-el) not sequel. 1970 IBM invented high level database language is called SQL. Sql enables to select, insert, modify & delete the information in a database. Sql Performs system security functions & set user permissions on tables and databases. It handles online transaction processing within an application. SQL transfers data between different databases. SQL's greatest benefits are that it is truly a
cross-platform language and a cross-product language. GUI tools for sql TOAD, SQL Developer. Sql allows to modify structure of the database can easily create new database objects such as tables, indexes, views, sequences STATIC SQL Statement cant be altered at run time. Statements are hard coded in the program and executed as-is at runtime. Static sql is faster and more secure than dynamic sql. Dynamic Sql statements is constructed and executed at program execution time. Dynamic sql provides more flexibility. SQL3 is an extension of the SQL standard that supports object-relational extensions. SQL3 was finalized in 1999. ORACLE BASICS Explored by Thiyagu Gunasekaran
Page | 11
10g Database Administration BASICS a schema is set of metadata (data dictionary) used by database. Schema is collection of database objects including logical structures owned bySpecific user. Objects including tables, indexes, views, stored-procedures etc,.. create user command creates user, can create objects. create schema will not create schema. It allows to create multiple tables views etc. DDL, DML, DCL, TCL commands DDL Statements are used to define the database structure or schema. 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 except table structure COMMENT - add comments to the data dictionary RENAME - rename an object DML statements are used for managing data within schema objects. SELECT - retrieve data from the a database INSERT - insert data into a table UPDATE - updates or adding any data within a table, specified columns DELETE - deletes all records from a table, 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 SELECT Oracle still recommends to consider SELECT as DML command not data retrieval (DRL) command.
Page | 13
10g Database Administration BASICS DCL Statements almost belongs Database administration privileges GRANT - gives user's access privileges to database REVOKE - withdraw access privileges given with the GRANT command TCL Commands are used to manage changes made by DML commands COMMIT - save work done SAVEPOINT - identify a point in a transaction to which can later roll back ROLLBACK - restore database to original since the last COMMIT SET TRANSACTION - Change transaction options like isolation level and what rollback segment to use. Somemore points to remember : GRANT- to allow specified users to perform specified tasks. REVOKE- to cancel previously granted or denied permissions. DDL commands are auto commit. DBCC -(Database Console Commands) statements check the physical and logical consistency of a database.
Page | 14