Sunteți pe pagina 1din 18

ABAP Workbench Basic Database concepts Normalization Techniques

Repository
1. Consists of All the development objects such as the programs, Programs Function modules, Definitions of database tables and other objects. 2. Is used to keep both objects defined by SAP as well as objects defined by customers. 3. Is in the database and is always independent of the client, meaning a Repository object can be accessed from any client. 4. Apart from the Repository, the database also contains application and Customizing tables, which are usually client-specific, that is, they have a client column.

Cross Client representation of Repository

Structure of Repository

Is subdivided according to application components Within an application component (e.g., MM) there are several packages containing relevant objects for a more detailed logical subdivision. Whenever a Repository object is created, it must be assigned to a package.

ABAP Workbench Tools

Hope all of you know the Transaction code for Each tools

Basic Database concepts

Basic Data base Concepts : RDBMS


Relational Database Management System A Relational database management system (RDBMS) is a database management system (DBMS) that is based on the relational model RDBMS is the basis for SQL, and for all modern database systems like MS SQL Server, IBM DB2, Oracle, MySQL, and Microsoft Access

Basic Data base Concepts : SQL definition


Structured Query Language Is a non-procedural, English-like language processes data in groups of records rather than one record at a time such as Store Data Modify Data Retrieve data Delete data Create tables Modify tables Delete tables

Basic Data base Concepts : SQL topics


SQL Statements SELECT INSERT UPDATE DELETE CREATE TABLE ALTER TABLE RENAME TRUNCATE DROP SQL Clauses WHERE ORDER BY GROUP BY HAVING SQL Operators Logical Operators Comparison Operators LIKE, IN, ISNULL, BETWEEN..AND

Basic Data base Concepts : SQL topics Cont..


SQL Integrity Constraints Primary Key Constraint Foreign Key Constraint Not Null Constraint Unique Key Constraint Check Constraint Other SQL Topics Commands Aliases Group Functions JOINS VIEWS Sub-query Index GRANT, REVOKE

Basic Data base Concepts : SQL Types


DDL Data Definition Language (DDL) statements are used to define the database structure:

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

Basic Data base Concepts : SQL Types Cont


DML Data Manipulation Language (DML) statements are used for managing data.

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 LOCK TABLE - control concurrency
TCL Transaction Control (TCL) statements are used to manage the changes made by DML statements. It allows statements to be grouped together into logical transactions COMMIT - save work done ROLLBACK - restore database to original since the last COMMIT

Basic Data base Concepts : SQL Types Cont


DCL Data Control Language (DCL) statements. Some examples: GRANT - gives user's access privileges to database REVOKE - withdraw access privileges given with the GRANT command

Normalization techniques

Normalization
Is the process of efficiently organizing data in a database. To eliminate redundant data (storing the same data in more than one table)

To ensure data dependencies make sense (only storing related data in a table)

Normal forms
The database community has developed a series of guidelines for ensuring that databases are normalized normal forms and are numbered from one through five (1NF to 5NF).

Normalization Cont. First Normal Form( 1NF)


Eliminate duplicative columns from the same table Example Table: Manager Master Before Normal Manager Subordinate1 Subordinate2 Subordinate3 Subordinate4 Step 1 Manager Subordinates Step 2 ManagerID SubordinateID

Second Normal Form( 2NF) Removing duplicate data


Meet all the requirements of the first normal form. Remove subsets of data that apply to multiple rows of a table and place them in separate tables. Create relationships between these new tables and their predecessors through the use of foreign keys Example Table: CustomerMaster Before Normal CustNum FirstName LastName Address City State ZIP After Normal Customer Master CustNum FirstName LastName ZIP

City Master ZIP City State

Normalization Cont. Third Normal Form( 3NF)


Eliminate columns that are not fully dependent on Primary key(s) Example Table: Sales Order Before Normal Order Number Customer Number Unit Price Quantity Total After Normal Order Number Customer Number Unit Price Quantity N.B: Total can be computed on the fly..

S-ar putea să vă placă și