Friday, August 28, 2020

Automatic SQL Tuning Sets (ASTS) in Oracle 19c and 20c

A well performing SQL statement starts all of sudden to misbehave? Fixing such queries is very much embedded into Oracle Autonomous’ strategy and here is how Automatic SQL Tuning Sets help.

Oracle Database 19c and Oracle Database 20c, Oracle Database Exam Prep, Oracle Database Tutorial and Material

What is the Automatic SQL Tuning Set? – Nigel Bayliss explains it all in a short informative blog post where he describes it as a system-maintained SQL tuning set that is an incredibly useful source of historic SQL performance metrics and execution plans. You can use ASTS to repair SQL performance regressions very quickly using SQL plan management.

An example of how to fix a SQL statement using SQL Plan management can be found in a previous post of Nigel entitled Repairing SQL Performance Regression with SQL Plan Management. Check this github example or who to “fix a misbehaving SQL query”.

Automatic SQL Tuning Sets were introduced in Oracle 19.7 where they were enabled by default. In 19.8 and 20c, they are disabled by default and MOS Doc ID 2686869.1 gives examples on how to enable and disable them:

exec DBMS_AUTO_TASK_ADMIN.ENABLE(
Client_Name => 'Auto STS Capture Task',
Operation => NULL,
Window_name => NULL);
You can check if the task is disabled or enabled by running:

SELECT Task_Name, Enabled 
FROM DBA_AUTOTASK_SCHEDULE_CONTROL
WHERE Task_Name = 'Auto STS Capture Task';
The MOS note above shows also how to check the amount of space consumed by all SQL tuning sets and also the statement counts per SQL tuning set:

SELECT 
Decode(SQLSet_Name,'SYS_AUTO_STS','ASTS','NON-ASTS'), count(*)
FROM DBA_SQLSet_Statements
GROUP BY Decode(SQLSet_Name,'SYS_AUTO_STS','ASTS','NON-ASTS');

Oracle recommends that you enable ASTS and one reason for this is that Automatic Indexing relies on the ASTS.

In 20c, the data dictionary views related to ASTS changed a bit, so the queries form 19c will not work. Oracle moved it to DBA_AUTOTASK_SETTINGS.

The 20c run the following:

SELECT Task_Name, Enabled, Interval Task_Interval_in_Seconds
FROM DBA_AUTOTASK_SETTINGS
WHERE Task_Name = 'Auto STS Capture Task';

You can check details about the status of the task by running:

SELECT Task_Name, Status
FROM DBA_AUTOTASK_SCHEDULE_CONTROL
WHERE Task_Name = 'Auto STS Capture Task';

Do not worry that Oracle captures a lot of SQL statements – that is the idea after all as you improve the likelihood that you can repair queries that previously ran very quickly and did not show up in AWR. SQL statement performance regressions are repaired automatically and the automatic mode is enabled by setting the DBMS_SPM parameter ALTERNATE_PLAN_BASELINE to AUTO on supported platforms and it is currently equivalent to “AUTOMATIC_WORKLOAD_REPOSITORY+CURSOR_CACHE+SQL_TUNING_SET”.

Oracle Database 19c and Oracle Database 20c, Oracle Database Exam Prep, Oracle Database Tutorial and Material

Thursday, August 27, 2020

Difference between Relational database and NoSQL

Relational Database, Database NoSQL, Database Exam Prep, Database Prep, Database Certification

1. Relational Database:


RDBMS stands for Relational Database Management Systems. It is most popular database. In it, data is store in the form of row that is in the form of tuple. It contain numbers of table and data can be easily accessed because data is store in the table.

2. NoSQL:


NoSQL Database stands for a non-SQL database. NoSQL database doesn’t use table to store the data like relational database. It is used for storing and fetching the data in database and generally used to store the large amount of data. It supports query language and provides better performance.

Difference between Relational database and NoSQL :


RELATIONAL DATABASE NOSQL
It is used to handle data coming in low velocity.  It is used to handle data coming in high velocity.
It gives only read scalablity.   It gives both read and write scalablity. 
It manages structured data.   It manages all type of data.
Data arrives from one or few locations.   Data arrives from many locations. 
It supports complex transactions.   It supports simple transactions. 
It has single point of failure.   No single point of failure. 
It handles data in less volume.   It handles data in high volume.
Transactions written in one location. Transactions written in many locations.
Deployed in vertical fashion.   Deployed in Horizontal fashion. 

Wednesday, August 26, 2020

Difference between Database and DBMS

Oracle Database, Oracle DBMS, Oracle Database Tutorial and Material, Database Exam Prep, Database Learning

A collection of related pieces of data, whose purpose is to solve the data management needs of an institution is called a Database.

Database Management Systems (DBMS), on the other hand, are very complex software which save the data on the secondary storage devices and which are used to manipulate databases.

Difference between Database and DBMS :


CATEGORY DATABASE DBMS 
Storage Besides computers, databases can even be maintained in physical ledgers, books or papers. In a database management system (DBMS), all the records are maintained only on a computer.
Data Retrieval  The retrieval of information from the databases can be done manually, through queries or by using programs (C, C++, Java etc.).  We can retrieve the data from the database management system through queries written in SQL. 
Speed  As databases can be handled manually or via computers, when SQL is not used to retrieve information, it can be very slow.  As a computer system is involved in a database management system, the retrieval of information is very quick. 
Access  The databases are not designed for a large number of people who can access data at the same time, rather it is designed for a very small number of people (preferably few people) who access data at different times.  The database management system is designed for a large number of people who can access the data at the same time. 
Data Manipulation  In case of the databases, very less information can be modified at a time.  In the database management system (DBMS), a lot of information can be changed at one time (as it can have many users using it at the same time). 
Backup and Recovery  The databases do not ensure that the data will be available after failure arises.  The database management system (DBMS) ensures that the data will always be available even after system failures. 

Monday, August 24, 2020

Introduction of 3-Tier Architecture in DBMS

DBMS 3-tier Architecture


DBMS 3-tier architecture divides the complete system into three inter-related but independent modules as shown below:

Oracle DBMS, Oracle Database Certification, Oracle Database Learning, Oracle Database Exam Prep

1. Physical Level: At the physical level, the information about the location of database objects in the data store is kept. Various users of DBMS are unaware of the locations of these objects.In simple terms,physical level of a database describes how the data is being stored in secondary storage devices like disks and tapes and also gives insights on additional storage details.

2.Conceptual Level: At conceptual level, data is represented in the form of various database tables. For Example, STUDENT database may contain STUDENT and COURSE tables which will be visible to users but users are unaware of their storage.Also referred as logical schema,it describes what kind of data is to be stored in the database.

3. External Level: An external level specifies a view of the data in terms of conceptual level tables.  Each external level view is used to cater to the needs of a particular category of users. For Example, FACULTY of a university is interested in looking course details of students, STUDENTS are interested in looking at all details related to academics, accounts, courses and hostel details as well. So, different views can be generated for different users. The main focus of external level is data abstraction.

Data Independence


Data independence means a change of data at one level should not affect another level. Two types of data independence are present in this architecture:

1. Physical Data Independence: Any change in the physical location of tables and indexes should not affect the conceptual level or external view of data. This data independence is easy to achieve and implemented by most of the DBMS.

2. Conceptual Data Independence: The data at conceptual level schema and external level schema must be independent. This means a change in conceptual schema should not affect external schema. e.g.; Adding or deleting attributes of a table should not affect the user’s view of the table. But this type of independence is difficult to achieve as compared to physical data independence because the changes in conceptual schema are reflected in the user’s view.

Phases of database design


Database designing for a real-world application starts from capturing the requirements to physical implementation using DBMS software which consists of following steps shown below:

Oracle DBMS, Oracle Database Certification, Oracle Database Learning, Oracle Database Exam Prep

Conceptual Design: The requirements of database are captured using high level conceptual data model. For Example, the ER model is used for the conceptual design of the database.

Logical Design: Logical Design represents data in the form of relational model. ER diagram produced in the conceptual design phase is used to convert the data into the Relational Model.

Physical Design: In physical design, data in relational model is implemented using commercial DBMS like Oracle, DB2.

Advantages of DBMS


DBMS helps in efficient organization of data in database which has following advantages over typical file system:

◓ Minimized redundancy and data inconsistency: Data is normalized in DBMS to minimize the redundancy which helps in keeping data consistent. For Example, student information can be kept at one place in DBMS and accessed by different users.This minimized redundancy is due to primary key and foreign keys

◓ Simplified Data Access: A user need only name of the relation not exact location to access data, so the process is very simple.

◓ Multiple data views: Different views of same data can be created to cater the needs of different users. For Example, faculty salary information can be hidden from student view of data but shown in admin view.

◓ Data Security: Only authorized users are allowed to access the data in DBMS. Also, data can be encrypted by DBMS which makes it secure.

◓ Concurrent access to data: Data can be accessed concurrently by different users at same time in DBMS.

◓ Backup and Recovery mechanism: DBMS backup and recovery mechanism helps to avoid data loss and data inconsistency in case of catastrophic failures.

Friday, August 21, 2020

DBMS Architecture 2-Level, 3-Level

Two tier architecture:


Two tier architecture is similar to a basic client-server model. The application at the client end directly communicates with the database at the server side. API’s like ODBC,JDBC are used for this interaction. The server side is responsible for providing query processing and transaction management functionalities. On the client side, the user interfaces and application programs are run. The application on the client side establishes a connection with the server side in order to communicate with the DBMS.

An advantage of this type is that maintenance and understanding is easier, compatible with existing systems. However this model gives poor performance when there are a large number of users.

Oracle Database Certification, Database Learning, Oracle Database Exam Prep, Oracle Database Certification

Three Tier architecture:


In this type, there is another layer between the client and the server. The client does not directly communicate with the server. Instead, it interacts with an application server which further communicates with the database system and then the query processing and transaction management takes place. This intermediate layer acts as a medium for exchange of partially processed data between server and client. This type of architecture is used in case of large web applications.

Advantages:

◉ Enhanced scalability due to distributed deployment of application servers. Now,individual connections need not be made between client and server.

◉ Data Integrity is maintained. Since there is a middle layer between client and server, data corruption can be avoided/removed.

◉ Security is improved. This type of model prevents direct interaction of the client with the server thereby reducing access to unauthorized data.

Disadvantages:

Increased complexity of implementation and communication. It becomes difficult for this sort of interaction to take place due to presence of middle layers.

Three-TierArchtecture


Oracle Database Certification, Database Learning, Oracle Database Exam Prep, Oracle Database Certification

Thursday, August 20, 2020

Difference between Database System and Data Warehouse

Oracle Database System, Oracle Data Warehouse, Oracle Database Exam Prep


Database System:


Database System is used in traditional way of storing and retrieving data. The major task of database system is to perform query processing. These systems are generally referred as online transaction processing system. These systems are used day to day operations of ans organization.

Data Warehouse:


Data Warehouse is the place where huge amount of data is stored. It is meant for users or knowledge workers in the role of data analysis and decision making. These systems are supposed to organize and present data in different format and different forms in order to serve the need of the specific user for specific purpose. These systems are referred as online analytical processing.

Difference between Database System and Data Warehouse:


DATABASE SYSTEM DATA WAREHOUSE 
It supports operational processes.   It supports analysis and performance reporting.
Capture and maintain the data.   Explore the data.
Current data.   Multiple years of history. 
Data is balanced within the scope of this one system.   Data must be integrated and balanced from multiple system. 
Data is updated when transaction occurs.   Data is updated on scheduled processes. 
Data verification occurs when entry is done.   Data verification occurs after the fact. 
100 MB to GB.   100 GB to TB. 
ER based.   Star/Snowflake.
Application oriented.   Subject oriented. 
Primitive and highly detailed.   Summarized and consolidated. 
Flat relational.   Multidimensional. 

Wednesday, August 19, 2020

Disadvantages of DBMS

Oracle Database Tutorial and Materials, Database Exam Prep, Database Learning, Database Guides

There are many advantages and disadvantages of DBMS (Database Management System). Disadvantages of DBMS are explained as following below.

1. Increased Cost:


These are different types of costs:

1.1 Cost of Hardware and Software –

This is the first disadvantage of database management system. This is because for DBMS, it is mandatory to have a high speed processor and also a large memory size because now a days there is a large amount of data in every field which needs to be store safely and with a security.
The requirement of these large amount of space and a high speed processor needs an expensive hardware and an expensive software too. That is, there is a requirement of sophisticated hardware and software which means that we need to upgrade the hardware which is used for file-based system. Hardware and Software, both requires maintenance which costs very high. All the operating, Training (all levels including programming, application development, and database administration), licensing, and regulation compliance costs very high.

1.2 Cost of Staff Training –

Educated staff (database administrator, application programmers, data entry operations) who maintains the database management system also requires good amount. We need the database system designers to be hired along with application programmers. Alternatively the services of some software house need to be taken. So there is a lot of money which needs to be spent for developing software.

1.3 Cost of Data Conversion –

We need to convert our data into database management system, there is a requirement of lot of money as it adds on to the cost of the database management system. This is because, for this conversion we need to hire database system designers whom we have to pay a lot of money and also services of some software house will be required. All this shows that a high initial investment for hardware, software and trained staff is required by DBMS. So, altogether Database Management System results in a costlier system.


2. Complexity:



Oracle Database Tutorial and Materials, Database Exam Prep, Database Learning, Database Guides
As we all know that now a days all companies are using the database management system as it fulfils lots of requirement and also solves the problem. But a problem arises, that is all these functionality has made database management system an extremely complex software. For the proper requirement of DBMS it is very important to have a good knowledge of it by the developers, DBA, designers and also the end users. This is because if any one of them do not acquire a proper and complete skills than this may lead to data loss or database failure.

These failure may lead to bad design decisions due to which there may be a serious and bad consequences for the organization. So this complex system needs to be understood by everyone using it. As it cannot be managed very easily. All this shows that database management system is not a child’s game as it cannot be managed very easily. It requires a lot of management. A good staff is needed to manage this database at times when it becomes very complicated to decide where to pick data from and where to save it.

3. Currency Maintenance:


This is very necessary to keep your system current because efficiency which is one of the biggest factor and need to be overlook must be maximised. That is we need to maximise the efficiency of the database system to keep our system current. For this, frequent updation must be performed on all the components as new threats come daily. DBMS should be updated according to the current scenario. Also, security measures must be implemented. Due to advancement in database technology, training cost tends to be significant.

4. Performance:


Traditional file system is written for small organizations and for some specific applications due to which performance is generally very good. But for the small scale firms, DBMS does not give a good performance as its speed is very slow. As a result some applications will not run as fast as they could. Hence it is not good to use DBMS for the small firms. Because performance is a factor which is overlooked by everyone. If performance is good than everyone (developers, designers, end users) will use it easily and it will be user friendly too. As speed of the system totally depends on the performance so performance needs to be good.

5. Frequency Upgrade/Replacement Cycles:


Now a days in this world we need to stay up-to-date about the latest technologies, developments arriving in the market. Frequent upgrade of the products is done by the DBMS vendors in order to add new functionality to the systems. New upgrade versions of the software often come bundled. Sometimes these updates also need hardware upgrades. Sometimes these changes and updates are so fast that the users find it difficult to work with that system because it is not easy to learn new commands and understand them again when the new upgrades are done. All these upgrades also cost money in order to train users, designers etc. to use the new features.

Monday, August 17, 2020

Advantages of DBMS over File system

Oracle Database Tutorial and Materials, Database Exam Prep, Oracle Database Prep, Oracle Database Certifications

What is File System?


A File Management system is a DBMS that allows acces to single files or tables at a time. In a File System, data is directly stored in set of files. It contains flat files that have no relation to other files (when only one table is stored in single file, then this file is known as flat file).

What is DBMS?


Oracle Database Tutorial and Materials, Database Exam Prep, Oracle Database Prep, Oracle Database Certifications
A Database Management System (DBMS) is a system software that allows users to efficiently define, create, maintain and share databases. Defining a database involves specifying the data types, structures and constraints of the data to be stored in the database. Creating a database involves storing the data on some storage medium that is controlled by DBMS. Maintaining a database involves updating the database whenever required to evolve and reflect changes in the miniworld and also generating reports for each change. Sharing a database involves allowing multiple users to access the database. DBMS also serves as an interface between the database and end users or application programs. It provides control access to the data and ensures that data is consistent and correct by defining rules on them.

An application program accesses the database by sending queries or requests for data to the DBMS. A query causes some data to be retrieved from database.

Advantages of DBMS over File system –


◉ Data redundancy and inconsistency – Redundancy is the concept of repetition of data i.e. each data may have more than a single copy. The file system cannot control redundancy of data as each user defines and maintains the needed files for a specific application to run. There may be a possibility that two users are maintaining same files data for different applications. Hence changes made by one user does not reflect in files used by second users, which leads to inconsistency of data. Whereas DBMS controls redundancy by maintaining a single repository of data that is defined once and is accessed by many users. As there is no or less redundancy, data remains consistent.

◉ Data sharing –

File system does not allow sharing of data or sharing is too complex. Whereas in DBMS, data can be shared easily due to centralized system.

◉ Data concurrency –

Concurrent access to data means more than one user is accessing the same data at the same time. Anomalies occur when changes made by one user gets lost because of changes made by other user. File system does not provide any procedure to stop anomalies. Whereas DBMS provides a locking system to stop anomalies to occur.

◉ Data searching – For every search operation performed on file system, a different application program has to be written. While DBMS provides inbuilt searching operations. User only have to write a small query to retrieve data from database.

◉ Data integrity –

There may be cases when some constraints need to be applied on the data before inserting it in database. The file system does not provide any procedure to check these constraints automatically. Whereas DBMS maintains data integrity by enforcing user defined constraints on data by itself.

◉ System crashing –

In some cases,systems might have crashes due to various reasons. It is a bane in case of file systems because once the system crashes, there will be no recovery of the data that’s been lost. A DBMS will have the recovery manager which retrieves the data making it another advantage over file systems.

◉ Data security –

A file system provides a password mechanism to protect the database but how longer can the password be protected?No one can guarantee that. This doesn’t happen in the case of DBMS. DBMS has specialized features that help provide shielding to its data.

DBMS is continuously evolving from time to time. It is power tool of data storage and protection. In the coming years, we will get to witness an AI based DBMS to retrieve database of ancient eras.

Friday, August 14, 2020

ACID Properties in DBMS

A transaction is a single logical unit of work which accesses and possibly modifies the contents of a database. Transactions access data using read and write operations.

In order to maintain consistency in a database, before and after the transaction, certain properties are followed. These are called ACID properties.

Oracle Database Study Materials, Database Learning, Database Exam Prep

Atomicity


By this, we mean that either the entire transaction takes place at once or doesn’t happen at all. There is no midway i.e. transactions do not occur partially. Each transaction is considered as one unit and either runs to completion or is not executed at all. It involves the following two operations.

—Abort: If a transaction aborts, changes made to database are not visible.

—Commit: If a transaction commits, changes made are visible.

Atomicity is also known as the ‘All or nothing rule’.

Consider the following transaction T consisting of T1 and T2: Transfer of 100 from account X to account Y.

Oracle Database Study Materials, Database Learning, Database Exam Prep

If the transaction fails after completion of T1 but before completion of T2.( say, after write(X) but before write(Y)), then amount has been deducted from X but not added to Y. This results in an inconsistent database state. Therefore, the transaction must be executed in entirety in order to ensure correctness of database state.

Consistency


This means that integrity constraints must be maintained so that the database is consistent before and after the transaction. It refers to the correctness of a database. Referring to the example above,
The total amount before and after the transaction must be maintained.

Total before T occurs = 500 + 200 = 700.
Total after T occurs = 400 + 300 = 700.

Therefore, database is consistent. Inconsistency occurs in case T1 completes but T2 fails. As a result T is incomplete.

Isolation


This property ensures that multiple transactions can occur concurrently without leading to the inconsistency of database state. Transactions occur independently without interference. Changes occurring in a particular transaction will not be visible to any other transaction until that particular change in that transaction is written to memory or has been committed. This property ensures that the execution of transactions concurrently will result in a state that is equivalent to a state achieved these were executed serially in some order.

Let X= 500, Y = 500.

Consider two transactions T and T”.

Oracle Database Study Materials, Database Learning, Database Exam Prep

Suppose T has been executed till Read (Y) and then T’’ starts. As a result , interleaving of operations takes place due to which T’’ reads correct value of X but incorrect value of Y and sum computed by
T’’: (X+Y = 50, 000+500=50, 500)
is thus not consistent with the sum at end of transaction:
T: (X+Y = 50, 000 + 450 = 50, 450).
This results in database inconsistency, due to a loss of 50 units. Hence, transactions must take place in isolation and changes should be visible only after they have been made to the main memory.

Durability:


This property ensures that once the transaction has completed execution, the updates and modifications to the database are stored in and written to disk and they persist even if a system failure occurs. These updates now become permanent and are stored in non-volatile memory. The effects of the transaction, thus, are never lost.

The ACID properties, in totality, provide a mechanism to ensure correctness and consistency of a database in a way such that each transaction is a group of operations that acts a single unit, produces consistent results, acts in isolation from other operations and updates that it makes are durably stored.

Thursday, August 13, 2020

Difference between File System and DBMS

Prerequisite – DBMS over File system


A File Management system is a DBMS that allows acces to single files or tables at a time. In a File System, data is directly stored in set of files. It contains flat files that have no relation to other files (when only one table is stored in single file, then this file is known as flat file).

1. File System :


File system is basically a way of arranging the files in a storage medium like hard disk. File system organizes the files and helps in retrieval of files when they are required. File systems consists of different files which are grouped into directories. The directories further contain other folders and files. File system performs basic operations like management, file naming, giving access rules etc.

Example:

NTFS(New Technology File System), EXT(Extended File System).

Database File System, DBMS, Oracle Database Certification, Database Learning

2. DBMS(Database Management System) :


Database Management System is basically a software that manages the collection of related data. It is used for storing data and retrieving the data effectively when it is needed. It also provides proper security measures for protecting the data from unauthorized access. In Database Management System the data can be fetched by SQL queries and relational algebra. It also provides mechanisms for data recovery and data backup.

Example:

Oracle, MySQL, MS SQL server.

Database File System, DBMS, Oracle Database Certification, Database Learning

Difference between File System and DBMS :


FILE SYSTEM DBMS 
File system is a software that manages ad organizes the files in a storage medium within a computer. 
DBMS is a software for managing the database.
Redundant data can be present in a file system. 
In DBMS there is no redundant data. 
It doesn’t provide backup and recovery of data if it is lost. 
It provides backup and recovery of data even if it is lost. 
There is no efficient query processing in file system. 
Efficient query processing is there in DBMS. 
There is less data consistency in file system. 
There is more data consistency because of the process of normalization. 
It is less complex as compared to DBMS. 
It has more complexity in handling as compared to file system. 
File systems provide less security in comparison to DBMS. 
DBMS has more security mechanisms as compared to file system. 
It is less expensive than DBMS. 
It has a comparatively higher cost than a file system. 

Tuesday, August 11, 2020

Differences between Operational Database Systems and Data Warehouse

Operational Database Systems, Data Warehouse, Database Study Material, Database Exam Prep, Database Certifications

The Operational Database is the source of data for the information distribution center. It incorporates point by point data utilized to run the day to day operations of the trade. The information as often as possible changes as upgrades are made and reflect the current esteem of the final transactions.

Operational Database Systems, Data Warehouse, Database Study Material, Database Exam Prep, Database Certifications
Operational Database Administration Frameworks too called as OLTP (Online Transactions Processing Databases), are utilized to oversee energetic information in real-time.

Data Stockroom Frameworks serve clients or information specialists within the reason of information investigation and decision-making. Such frameworks can organize and show data in particular designs to oblige the differing needs of different clients. These frameworks are called as Online-Analytical Processing (OLAP) Frameworks.

Difference between Operational Database and Data Warehouse:


OPERATIONAL DATABASE DATA WAREHOUSE 
Operational frameworks are outlined to back high-volume exchange preparing.   Data warehousing frameworks are regularly outlined to back high-volume analytical processing (i.e., OLAP).
operational frameworks are more often than not concerned with current data.  Data warehousing frameworks are ordinarily concerned with verifiable information. 
Data inside operational frameworks are basically overhauled frequently agreeing to need.  Non-volatile, unused information may be included routinely. Once Included once in a while changed. 
It is planned for real-time commerce managing and processes.  It is outlined for investigation of commerce measures by subject range, categories, and qualities. 
Relational databases are made for on-line value-based Preparing (OLTP)  Data Warehouse planned for on-line Analytical Processing (OLAP) 
Operational frameworks are ordinarily optimized to perform quick embeds and overhauls of cooperatively little volumes of data.  Data warehousing frameworks are more often than not optimized to perform quick recoveries of moderately tall volumes of information. 
Data In  Data out 
Operational database systems are generally application-oriented.   While data warehouses are generally subject-oriented. 

Monday, August 10, 2020

Difference between Single User and Multi User Database Systems

A criterion for classifying a database system is according to the number of users who can use the system concurrently. It can be divided into single-user and multi-user database systems.

1. Single User Database Systems :


In these DBMS, at one time, only a single user can access the database. Hence, the user can use all the resources at all times. All these systems are used for personal usage, such as personal computers experience. In this type of DBMS, both the physical and application layer can be used by the user.

Example –

Personal Computers

2. Multi User Database Systems :


These DBMSs supports two or more than two users accessing the database simultaneously. Multi-user systems contains all the mini-computers and mainframe computers. In mainframe computer, the database may exist on a single computer and in other computers, the database may be distributed in multiple computers. Multiple users can update data while working together simultaneously.

Example –

Databases of Banks, insurance agencies, stock exchanges, supermarkets, etc.

Difference between Single User and Multi User Database Systems :


SINGLE USER DATABASE SYSTEMS MULTI USER DATABASE SYSTEMS 
A DBMS is single-user if at most one user at a time can use the system. A DBMS is multi-user if many/multi users can use the system and hence access the database concurrently.
Single-User DBMSs are mostly restricted to personal computer systems.  Most DBMSs are multi user, like databases of airline reservation systems, banking databases, etc. 
Single user databases do not have multiprogramming thus, single CPU can only execute at most one process at a time.  Multiple users can access databases and use computer systems simultaneously because of the concept of Multiprogramming. 
Example: Personal Computers.   Example: Databases of Banks, insurance agencies, stock exchanges, supermarkets, etc. 

A single central processing unit (CPU) can only execute at most one process at a time. However, multi-programming operating systems execute some commands from one process, then suspend that process and execute some commands from the next process, and so on. A process is resumed at the point where it was suspended whenever it gets its turn to use the CPU again.

Hence, concurrent execution of processes is actually interleaved, as illustrated in figure below –

Database Exam Prep, Database Study Materials, Database Prep, Database Learning

The above figure shows two processes, A and B, executing concurrently in an interleaved fashion.

Interleaving keeps the CPU busy when a process requires an input or output (I/O) operation, such as reading a block from disk. The CPU is switched to execute another process rather than remaining idle during I/O time

Interleaving also prevents a long process from delaying other processes. If the computer system has multiple hardware processors (CPUs), parallel processing of multiple processes is possible, as illustrated by processes C and D in the above figure.

Friday, August 7, 2020

A Fully Refreshed Oracle Audit Vault and Database Firewall for Auditing and Monitoring

DB Exam Study, DB Tutorial and Material, Database Learning, DB Guides, DB Exam Prep

Organizations today have hundreds or even thousands of databases, applications, and operating systems where user and administrator activities need to be audited and monitored for security and compliance reasons.  That oversight requires continuous collection and analysis of huge amounts of activity data in order to run reports and generate alerts on anomalous activities for further investigation. Of course, network monitoring and database auditing solutions have existed for several years, but organizations must now rethink how to achieve 360-degree visibility while facing shrinking IT resources and considering not just today’s demands, but also those of tomorrow.

We are thrilled to announce that the fully revamped and refreshed Oracle Audit Vault and Database Firewall 20 is now available to help you meet auditing and monitoring requirements for your databases whether they are on-premises or on the cloud. Oracle Audit Vault and Database Firewall 20 brings not just improved ease-of-use and wider coverage, but also enhancements to address enterprise requirements for extensibility, scale, and security.

We upgraded the user interface engine to give a modern, responsive, and intuitive look and feel.  We simplified and optimized the UI for common workflows and easier navigation.  Both Audit Vault and Database Firewall components can now be managed from the same console, centralizing the administrative activities.

To reduce the cost of operations, we brought the proven best practices through single-click provisioning of out-of-the-box audit policies for Oracle databases.  Along with dozens of out-of-the-box reports on the activity data from across all your resources, you can easily filter reports by a given user, IP address, type of activity, time period, or any combination.  For Oracle databases, we can provide both the before and after values for transactions on specific tables or schemas, making it easy to track the lifecycle of sensitive data.

We extended coverage by collecting audit data from PostgreSQL in addition to our existing support for Oracle, MySQL, Microsoft SQL Server, SAP Sybase, and IBM Db2 LUW databases.  With our rich and extensible audit collection framework, you can collect and analyze audit data from almost any system that generates an audit trail.  Our collector framework now reads audit data stored in JSON or XML files, database tables, or available via RESTful API - making it possible to collect audit data from databases such as MongoDB via a simple attribute mapping table. 

Database Firewall continues to stand out as a major differentiator through its highly accurate grammar analysis of the SQL statements, and its ability to identify anomalous SQL traffic.  The multi-stage database firewall analyzes different contextual conditions to implement access control policies without impacting the database.  At the simplest level, it can allow or deny SQL statements based on connection metadata such as IP address, OS user name and database user name.  Next, Database Firewall uses allow-list and deny-list rules on clusters of SQL statements to block and raise alerts on SQL injection attempts well before the SQL has even reached the database.  Finally, the Database Firewall can enforce policies based on table names and even the type of SQL statement.

To simplify deployment across complex networks, customers can now use the Host Monitor agent on Windows (in addition to Linux, AIX, Solaris) to forward a copy of the SQL traffic to the Database Firewall independent of the actual network topology.

In response to customer feedback, we added support for automatically archiving the audit data to low-cost storage locations after a predefined time period.  For centralized user management, we now support authentication and authorization with Microsoft Active Directory and OpenLDAP.

Oracle Audit Vault and Database Firewall 20 supports both network-based SQL monitoring and database auditing with the needed scale and flexibility that enterprise organizations demand. It implements the ever-important ‘trust but verify’ security principle and can serve as the first line of defense for your data assets.

Source: oracle.com

Wednesday, August 5, 2020

Difference between CouchDB and Relational Database

Database CouchDB, Relational Database, Oracle Database Tutorial and Material, Database Guides, Database Exam Prep

1. CouchDB:


Apache CouchDB is an open-source document-oriented NoSQL database that uses multiple formats and protocols to store, transfer, and process its data, it uses JSON to store data, JavaScript as its query language using MapReduce, and HTTP for an API. It was developed by Apache Software Foundation and initially released in 2005. It is written in Erlang.

2. Relational Database:


RDBMS stands for Relational Database Management Systems. It is most popular database. In it, data is store in the form of row that is in the form of tuple. It contain numbers of table and data can be easily accessed because data is store in the table. This Model was proposed by E.F. Codd.

Difference between CouchDB and Relational Database:


COUCHDB RELATIONAL DATABASE 
It is developed by Apache Software Foundation and initially released in 2005. It is developed by Oracle on May 1995.
It is written in Erlang language.   It is developed in C and C++ languages. 
The primary database model for CouchDB is the Document Store.  The primary database model for a relational database is client/server model. 
It can handle only one connection at a time.  It can handle multiple connections simultaneously. 
It does support XML data format.  It does not support XML data format. 
In CouchDB, there is no predefined datatypes.  It supports predefined data types such as float, date, number, etc. 
It does not support Secondary indexes.  It supports secondary indexes. 
It does not support ACID transactions.  It provides ACID transactions. 
It supports Map Reduce method.  It does not support Map-Reduce method. 
It has no Data Schema.  It has Data Schema.