+ All Categories
Home > Documents > In Computer Concepts, we can say A query is to make a...

In Computer Concepts, we can say A query is to make a...

Date post: 21-Mar-2021
Category:
Upload: others
View: 2 times
Download: 0 times
Share this document with a friend
15
Database Management System & Database Connection Basic Concepts of DBMS and connection with DB and Applications Explained What is Query? To ask a question about something, particularly in order to convey one's doubts about it or to check its validity or accuracy. In Computer Concepts, we can say A query is to make a request for any specific information from a database. Data vs. Information Data – by definition it is a collection of raw and unprocessed facts such as charts, reports, inventory, scores, names, addresses, diagrams or drawings and maps. It is the collection of raw facts collected from any specific environment for a specific purpose; it may be numerical or non-numerical. Information – it is the “data” that has already been manipulated and transformed into something useful or meaningful information a result of processing of input of raw data through a computer’s processing mechanism DATA EXAMPLE DATABASE (DB) DB is a data structure that can store metadata (data about data). In general, we can say it is an organized collection of information stored in computerized format. DB is basically a computerized representation of any organizational flow(repository) of information and technique of reliable, scalable and secure data storage. .
Transcript
Page 1: In Computer Concepts, we can say A query is to make a ...techexe.net/wp-content/uploads/2017/09/DBMS1.pdfRecord Based Data Model This is the second type of data models available to

Database Management System & Database Connection

Basic Concepts of DBMS and connection with DB and Applications Explained

What is Query?

To ask a question about something, particularly in order to convey one's doubts about it or to check its

validity or accuracy.

In Computer Concepts, we can say “A query is to make a request for any specific information

from a database.

Data vs. Information

Data – by definition it is a collection of raw and unprocessed facts such as charts, reports, inventory, scores, names, addresses, diagrams or drawings and maps. It is the collection of raw facts collected from any specific environment for a specific purpose; it may be numerical or non-numerical.

Information – it is the “data” that has already been manipulated and transformed into something useful or meaningful information a result of processing of input of raw data through a computer’s processing mechanism

DATA EXAMPLE

DATABASE (DB)

DB is a data structure that can store metadata (data about data). In general, we can say it is an

organized collection of information stored in computerized format.

DB is basically a computerized representation of any organizational flow(repository) of information and

technique of reliable, scalable and secure data storage.

.

Page 2: In Computer Concepts, we can say A query is to make a ...techexe.net/wp-content/uploads/2017/09/DBMS1.pdfRecord Based Data Model This is the second type of data models available to

Advantages of Databases

As database is a shared collection of related data, DB Administrators designed it as to get related

information among multiple (concerned) users within the organization.

This is a typical database system environment and it introduces the following advantages:

Data Sharing

As the data for different departmental applications is placed at same place (FUU DBMS) . This leads to major benefit of data sharing i.e, library and examination can take benefit with student’s enrollment software of registration department and doesn’t need to store students’ data separately.

Data Independence Physically data and programs are independent of each other, so data is protected in both physical and logical aspects.

Page 3: In Computer Concepts, we can say A query is to make a ...techexe.net/wp-content/uploads/2017/09/DBMS1.pdfRecord Based Data Model This is the second type of data models available to

Controlled Redundancy we don’t need to duplicate the data , however data duplication normally perform in the databases, but this duplication is on purpose and controlled.

Better Data Integrity Integrity of data is very important because all the processing and getting information is based on data stored in FUU Students DB. DBMS plays very important role here as all data is being managed and maintained by the FUU DBMS, it provides many features to ensure the data integrity to provide reliable data.

Relationship between DB & DBMS

Page 4: In Computer Concepts, we can say A query is to make a ...techexe.net/wp-content/uploads/2017/09/DBMS1.pdfRecord Based Data Model This is the second type of data models available to

Now, to get linked DBMS with any application interface program, following diagram shows EMBA_ASSIGNMENTS linked to EMBA_FUU_2017 to get result for those students who submitted assignments, passed or failed etc.

Page 5: In Computer Concepts, we can say A query is to make a ...techexe.net/wp-content/uploads/2017/09/DBMS1.pdfRecord Based Data Model This is the second type of data models available to

The duties and responsibilities for each role of programmer, administrator and designer to store,

access and display data can be illustrated as follows, which can also be accessible for end-user, if

required.

Page 6: In Computer Concepts, we can say A query is to make a ...techexe.net/wp-content/uploads/2017/09/DBMS1.pdfRecord Based Data Model This is the second type of data models available to

Database Design Phase The design phase is basically the analysis phase that how data will be stored and access and

how different entities (objects, items) will be related with each other. In general, we represent database design graphically because it provides an ease in design and adds flexibility for the understanding of the systems easily.

Database Modeling Database modeling or data model is the process of creating the logical structure of the database. It determines the logical structure of a DB , primarily determines the manner in which the data to be stored, controlled and manipulated.

Page 7: In Computer Concepts, we can say A query is to make a ...techexe.net/wp-content/uploads/2017/09/DBMS1.pdfRecord Based Data Model This is the second type of data models available to

Types of Data Models are of mainly two types, one is Semantic Data Model and other one is Record based data model. Semantic Data Model Semantic Further can be divided into two types, ER & Object Oriented Data model

ER- Data Model Describes inter-related things of interest in a specific domain of knowledge , in following Model domain of knowledge is STUDENT .

Object oriented data model Object oriented data model (OODM) is based on Object-oriented database management system (OODBMS) that can combine database capabilities with object-oriented programming language (Such as C++) capabilities. In object oriented model , data and their relationships combines with a single structure called “OBJECT “. Through OODBMS, programmers can develop the product and store, replicate or modify them as objects treating as new object.

Page 8: In Computer Concepts, we can say A query is to make a ...techexe.net/wp-content/uploads/2017/09/DBMS1.pdfRecord Based Data Model This is the second type of data models available to

Record Based Data Model This is the second type of data models available to use and has three basic types Hierarchical Data Model is a ROOT based model , here ROOT is Department

Network Data model is where several entities can be accessed through several ways

Relational Data model is where data can be organized in two-dimensional tables called relations. Both are related to each other.

Page 9: In Computer Concepts, we can say A query is to make a ...techexe.net/wp-content/uploads/2017/09/DBMS1.pdfRecord Based Data Model This is the second type of data models available to

SQL - Structured Query Language

QL is an abbreviation for query language.SQL is a standardized query language for requesting information from a database. First called as SEQUEL (structured English query language) which was designed by IBM in 1975. First introduced as a fully functional commercial database system in 1979 by Oracle Corporation. SQL can support multiple databases and enable several users on a local-area network to access the databases.

The standardization of SQL makes it as an excellent tool for Web site design for example amazon ,ebay, alibaba etc. to store data properly and securely . the standard SQL commands (using DML) such as "Select", "Insert", "Update", "Delete", "Create", and "Drop" can be used to accomplish almost everything that one needs to do with a database.

SQL can be used for any type of interaction with the database through DBMS. It can be used for creating tables, insertion in the table and deletion as we well and other operations also. Data Manipulation Language DML is somehow similar to computer programming language . we use DML as a set of “CRUD” (CREATE , READ , UPDATE & DELETE ) for “Data” in a database.

Page 10: In Computer Concepts, we can say A query is to make a ...techexe.net/wp-content/uploads/2017/09/DBMS1.pdfRecord Based Data Model This is the second type of data models available to

Below is a selection from the "Customers" table in the sample database:

Customer ID Customer Name Address City Postal Code

1 SHAKEEL

B-6 Str. 57 Karachi 12209

2 SINAN BTK 15A-P4 Islamabad. 05021

3 MUGHAL R-155 Rawalpindi 05023

4 ATIF

BLVD 2.. Lahore 10156

5 LAIBA R-255 Faisalabad 958 22

SELECT SYNTAX

SELECT column1, column2, ... FROM table_name;

SELECT Column Example

The following SQL statement selects the "CustomerName" and "City" columns from the

"Customers" table:

Example

SELECT CustomerName, City FROM Customers;

The following SQL statement selects all the columns from the "Customers" table:

Example

SELECT * FROM Customers;

Page 11: In Computer Concepts, we can say A query is to make a ...techexe.net/wp-content/uploads/2017/09/DBMS1.pdfRecord Based Data Model This is the second type of data models available to

INSERT SYNTAX

The following SQL statement inserts a new record in the "Customers" table:

Example

INSERT INTO Customers (CustomerName, ContactName, Address, City, PostalCode, Country)

VALUES ('Fatima', 'A- 21', 'Nawabshah', '400006');

CustomerID CustomerName Address City PostalCode

1 SHAKEEL

B-6 Str. 57 Karachi 12209

2 SINAN BTK 15A-P4 Islamabad. 05021

3 MUGHAL R-155 Rawalpindi 05023

4 ATIF

BLVD 2.. Lahore 10156

5 LAIBA R-255 Faisalabad 958 22

6 FATIMA A-21 Nawabshah 400006 UPDATE SYNTAX

UPDATE Table

The following SQL statement updates the first customer (CustomerID = 1) with a new contact

person and a new city.

Example

UPDATE Customers

SET ContactName = 'LAIBA', City= 'Hyderabad'

WHERE CustomerID = 5

Page 12: In Computer Concepts, we can say A query is to make a ...techexe.net/wp-content/uploads/2017/09/DBMS1.pdfRecord Based Data Model This is the second type of data models available to

DELETE SYNTAX

DELETE Example

The following SQL statement deletes the customer "SHAKEEL" from the "Customers" table:

Example

DELETE FROM Customers

WHERE CustomerName='SHAKEEL';

For practice – go to https://www.w3schools.com/sql/

Benefits of Standard SQL: Following are the major benefits of SQL:-

1. Reduced training cost 2. Application portability 3. Application longevity 4. Reduced dependence on a single vendor 5. Cross-system communication

Page 13: In Computer Concepts, we can say A query is to make a ...techexe.net/wp-content/uploads/2017/09/DBMS1.pdfRecord Based Data Model This is the second type of data models available to

Benefits of DBMS for an E-Commerce Website

According to IBM , e-business or e-commerce is the transformation of commerce business processes through the use of Internet technologies". The main objective of the EDI (electronic Data Interchange) is to eliminate the need of paper work and enhance efficiency and response time of the business processes. Role of DBMS in E-Business:

DBMS now-a-days is one of the most necessary tool to run e-Business for functioning every business process with the most comprehensive and sophisticated way. These functions may be knowledge of markets, customers, products and services. DBMS provides the key relations (Relational DBMS) with all functions, competitors, employee skills and its regulatory environments.

Showing Relational DBMS concept with Product ID and Order ID among CUSTOMER, ORDER AND PRODUCT Tables

.

Database Infrastructure (Should be Scalable)

As normally e-commerce data is scattered across multiple servers to handle the huge demand on good ecommerce site. The database designers should design database with failover option in HA ( High Availability ) mode , i.e. a backup server will take over as active database(s) to ensure the website accessibility .

Page 14: In Computer Concepts, we can say A query is to make a ...techexe.net/wp-content/uploads/2017/09/DBMS1.pdfRecord Based Data Model This is the second type of data models available to

Choosing a scalable database

It depends on the E-Commerce website interaction scenarios with the users , when to use MS-SQL or when to use ORACLE, it depends on the input/output factor of the underlying software , i.e. if we design application software with .NET Technologies , we normally use MS-SQL and whenever we design the application software with the real use of a RDMS concept , we choose ORACLE .

The main difference in between MS SQL Server and ORACLE is MSSQL organizes all objects, such as tables, views, and procedures by database names whereas In ORACLE, all the objects are grouped by schemas, which are a subset collection of database objects and all the database objects are shared among all schemas and users.

Many other established DBs are which we can use depends upon our interaction scenarios are DB2, MySQL , PostgreSQL , SQLite and Sybase.

One more reason to be conscious while choosing best to fit DBs with our website because normally we need good Caching and indexing factor with our ecommerce site for speedy transactions which automatically leads to increasing scalability

Disaster Recovery or business continuity is only possible with scalable database - to avoid losing customers we must keep our website running to maintain sales.

Key features for E-Commerce Site Database; normally we need following tables (IDs) while designing

DBs.

1. Customers-It includes personal data of each customer such as name, DOB, address etc. This table generates customer ID.

2. Statements- It includes details about the transactions such as customer ID who make the orders

following with the product ID, the order month, the price of the product, the receipt type, the payment method (with visa card or deposit money in the bank) and the bank account details.

3. Materials-In includes the information about the materials, their type and the country where it

made , it defines the material ID.

4. Payment-Delivery-it includes the payments receivable and post, depends upon the orders, i.e which orders have been delivered or pending.

5. Products-It sets the product ID based on order statements, i.e. the type of furniture and its

material ID are also to be mentioned.

6. E-mail Addresses- It includes with customer ID that either the customer has email address or not.

7. Staff- It includes all personal details of all employees.

Page 15: In Computer Concepts, we can say A query is to make a ...techexe.net/wp-content/uploads/2017/09/DBMS1.pdfRecord Based Data Model This is the second type of data models available to

8. Photos- A very important table that includes photo details of almost all the materials which

are accomplished by the customer ID that has to make the order, these photos can be accessible through QR Code displayed with every item on ecommerce website .

9. Excise data-It includes tax office belongings with each customer, mentioning NTN customer

number.


Recommended