Sie sind auf Seite 1von 4

DBMS 1) Write about Data Security b) Data Redundancy c)Data Isolation d) Program/Data Dependence: Data Security: The data

as maintained in the flat file(s) is easily accessible and therefore not secure. Example: Consider the Banking System. The Customer_Transaction file has details about the total available balance of all customers. A Customer wants information about his account balance. In a file system it is difficult to give the Customer access to only his data. Thus enforcing security constraintsfor the entire file or for certain data items are difficult. 2) Write about Data Redundancy Data Redundancy: Often the same information is duplicated in two or more files. The duplication of data also called redundancy leads to higher storage cost and access cost. It also lead to data inconsistency For Example, assume the same data is repeated in two or more files. If change is made to data in one file, it is required that the change be made to the data in the other file as well. If this is not done, it will lead to error during access of the data. Example: Assume Customers details such as Cust_Last_Name, Cust_Mid_Name, Cust_First_Name, Cust_Email is stored both in the Customer_Details file and the Customer_Fixed_Deposit file. If the Email ID of one Customer, for example, Langer S. Justin changes from Langer_Justin@yahoo.com to Langer_Justin@rediffmail.com, the Cust_Email has to be updated in both the files; otherwise it will lead to inconsistent data. However, one can design file systems with minimal redundancy. Data redundancy is sometimes preferred. Example: Assume the Customers details such as Cust_Last_Name, Cust_Mid_Name, Cust_First_Name and Cust_Email are not stored in the Customer_Fixed_Deposit file. If it is required to get this information about the customer along with his fixed deposit details, it would mean that the details be retrieved from two files. This would mean an increased overhead. It is thus preferred to store the information in the Customer_Fixed Deposit file itself. 3) Write about Data Isolation Data Isolation: Data Isolation means that all the related data is not available in one file. Generally, the data is scattered in various files, and the files may be in different formats, therefore writing new application programs to retrieve the appropriate data is difficult. 4) Write about Program/Data Dependence:

Program/Data Dependence: Under the traditional file approach, application programs are dependent on the master and transaction file(s) and vice-versa. Changes in the physical format of the master file(s), such as addition of a data field requires that the change must be made in all the application programs that access the master file. Consequently, for each of the application programs that a programmer writes or maintains, the programmer must be concerned with data

management. There is no centralized[3] execution of the data management functions. Data management is scattered among all the application programs. 5) Write about candidate key. Candidate Key An attribute, or group of attributes, that is sufficient to distinguish every tuple in the relation from every other one. A candidate key is all those set of attributes which can uniquely identify a row. Any subset of these set of attributes would not identify a row uniquely 6) Write about Primary key. Primary key The candidate key that is chosen to perform the identification task is called the primary key. Every tuple must have, by definition, a unique value for its primary key. A primary key which is a combination of more than one attribute is called a composite primary key . 7) What is foreign key? A foreign key is a copy of a primary key that has been exported from one relation into another to represent the existence of a relationship between them. Foreign key values do not (usually) have to be unique. Foreign keys can also be null. 8) Write about DDL. DDL is Data Definition Language statements. Some examples: CREATE to create objects in the database ALTER to alter the structure of the database DROP to delete objects from the database TRUNCATE to remove all records from a table. The space allocated for the records is also removed 9) Write about DML. DML is Data Manipulation Language statements. Some examples: SELECT to retrieve data from the database INSERT to insert data into a table UPDATE to update existing data within a table DELETE to delete all records from a table. The space allocated for the records remains intact 10) Write about DCL. DCL is Data Control Language statements. Some examples: GRANT to give user access privileges to database objects REVOKE to withdraw access privileges given with the GRANT command COMMIT to save the work done ROLLBACK to restore database to original since the last COMMIT. 11) Explain about Between BETWEEN: The BETWEEN operator is used to test a range. BETWEEN A AND B evaluates to TRUE if the value is greater than or equal to A and less than or equal to B. If NOT is used, the result is the reverse

12)

Explain about IN and NOT IN The IN and NOT IN operators are used to test a membership condition. When using the NOT IN operator, if any value in the list or the result returned from the sub query is NULL, the query returns no rows.

13)

Explain about Like Operator The LIKE operator is used to perform pattern matching. The pattern-search character % is used to match any character and any number of characters. The pattern-search character _ is used to match any single character.

14)

Explain aggregate function min MIN function has the syntax MIN([{DISTINCT | ALL }] <x>), where x is an expression. This function returns the lowest value in the expression x. If the expression x is a date data type, it returns a DATE. For dates, the minimum is the earliest date. If the expression x is a numeric data type, it returns a NUMBER. For numbers, the minimum is the smallest number. If the expression is a character data type, it returns a VARCHAR2. for character strings, the minimum is the one that sorts lowest based on the database character set

15)

Explain aggregate function max MAX function has the syntax MAX([{DISTINCT | ALL }] <x>), where x is an expression. This function returns the highest value in the expression x. If the expression x is a date data type, it returns a DATE. For dates, the maximum is the latest date. If the expression x is a numeric data type, it returns a NUMBER. For numbers, the maximum is the largest number. If the expression is a character data type, it returns a VARCHAR2. for character strings, the maximum is the one that sorts highest based on the database character set

16)

Explain aggregate function max AVG function has the syntax AVG ( [DISTINCT | ALL] <n>), where n is a numeric expression. The AVG function returns the mean of the expression n. If neither DISTINCT nor ALL is specified in the function call, the default is ALL.

17)

Explain aggregate function count The COUNT function returns the number of rows in the query. The asterisk (*) is a special quantity it counts all rows in the result set, regardless of NULLs.

18)

Explain Cartesian Join A Cartesian join occurs when data is selected from two or more tables and there is no common relation specified in the WHERE clause. If you do not specify a join condition for the tables listed in the FROM clause, Oracle joins each row from the first table to every row in the second table.

19)

Explain Inner Join The most common operator used to relate two tables is the equality operator (=). If you relate two tables using an equality operator, it is an equality join, also known as equijoin. This type of join combines rows from two tables that have equivalent values for the specified columns. A simple join is also known as an inner join, because it returns only the rows that satisfy the join condition.

20)

Explain Sub Query A sub-query is a query within a query. A sub-query answers the queries that have multiple parts; the sub-query answers one part of the question, and the parent query answers the other part. When you nest many sub-queries, the innermost query is evaluated first. SubQueries can be used in SELECT , FROM, WHERE and HAVING clauses.

21)

Explain Exists operator The EXISTS operator is always followed by a sub-query in parentheses. EXISTS evaluates to TRUE if the sub-query returns at least one row

22)

Explain about view A view is a customized representation of data from one or more tables. The tables that the view is referencing are known as base tables. A view can be considered as a stored query or a virtual table. Only the query is stored in the Oracle data dictionary; the actual data is not copied anywhere. This means that creating views does not take any storage space, other than the space in dictionary.

Das könnte Ihnen auch gefallen