Top Banner
Pre-Graduate Diploma in Network Engineering University of Greenwich Advanced Database Management System (ADBMS) No Assignment Description Page No TASK1 Identify the DBMS Kernel & Toolkit 3 Key Phases of DB development process 4 Navigational Database 5 Critical components in organization 6 Data Warehouse / Data Mart 6 Online Analytical Processing 6 Data Mining 7 Network Database Application 7 Universal Servers 8 Data Models – Data Structure, Integrity and manipulation 9 Classic Data Model 9 Hierarchical data model 9 Network Data Model 10 Object Oriented Data Model 10 Deductive Data Model 11 TASK2 Provide the output when SQL code run 12 Provide the output when SQL code run 12 Express request in SQL – manage more than one employee 13 TASK3 Create DB Directed by tutor – Assumptions you make table 14 Appropriate tool produce for activities 14 -------------------------------------------- 1 Student’s Signature / Date
24
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: DBMS 1 (2)

Pre-Graduate Diploma in Network Engineering

University of Greenwich

Advanced Database Management System (ADBMS)

No Assignment Description Page No

TA

SK

1

Identify the DBMS Kernel & Toolkit  3Key Phases of DB development process 4Navigational Database 5Critical components in organization 6Data Warehouse / Data Mart 6Online Analytical Processing 6Data Mining 7Network Database Application 7Universal Servers 8Data Models – Data Structure, Integrity and manipulation 9Classic Data Model 9Hierarchical data model 9Network Data Model 10Object Oriented Data Model 10Deductive Data Model 11

TASK2Provide the output when SQL code run 12Provide the output when SQL code run 12Express request in SQL – manage more than one employee 13

TASK3Create DB Directed by tutor – Assumptions you make table 14Appropriate tool produce for activities 14

TASK4 Implementation and SQL Applications 15 - 17

-------------------------------------------- 1

Student’s Signature / Date

Page 2: DBMS 1 (2)

Total number of pages including this cover page.

Submission Date 07-01-2012 Due Date 07-01-2012

Student's ID Class Code

Student's Full Name Anthonige Indika Pradeep

Lecturer's Name Mr. Azeem

-------------------------------------------- 2

Student’s Signature / Date

Page 3: DBMS 1 (2)

1) Two important pieces of RDBMS architecture are the kernel, which is the software, and the data dictionary, which consists of the system-level data structures used by the kernel to manage the database

 

-------------------------------------------- 3

Student’s Signature / Date

Database SystemsKernel

DBMS Kernel

Data Organisation

Transaction Management

Access Mechanisms

Query Management

Database Security

Database Recovery

Page 4: DBMS 1 (2)

Database Development Process

2) Database development is a systematic process that moves from concept to design to implementation. It also takes into account the needs of potential users and the operational and/or business processes in the organization.

The process of developing a database depends on advanced planning. Before a database can be created, developers must decide what data should be included and how the database should be structured.

Herewith I have break in to key phases of database development process. Also describe the tasks associated with each of the key steps.

Define Business ProcessesDefine business processes: Many database development efforts begin by defining the key business and/or operational processes within the organization. Developers first create high-level models showing the major activity steps associated with marketing, sales, production, human resource management, public relations, research and development, and so on. Taken together, these process maps represent an enterprise-wide model of the organization and its core processes.

Determine the Scope of the Database Development effortDetermine scope of database development effort: The next step in the database development effort is to select one process or a set of related processes for further analysis and improvement.

Define the Information needsOnce a business process (or set of processes) has been selected, the next step is to define the information needs of users involved in or affected by the business process.

Develop Conceptual DesignA basic understanding of these needs is used to create a conceptual design for the database. At this stage, a conceptual data model is created that illustrates relationships between information sources, users, and business process steps.

Develop Logical Data ModelThe conceptual data model is used to develop a logical data model based on one of the primary DBMS types: relational, hierarchical, network, or object-oriented approaches.

Develop physical designWith the logical data model in hand, developers move to the physical design, which involves determining the specific storage and access methods and structures.

Create and test databaseOnce this step is complete, developers can go ahead and create the database using whatever DBMS has been selected. Small amounts of data can be entered into the database for testing purposes. This is also the time to start developing sample screens and reports to determine if the database design will meet the predefined requirements. It is much easier to revise and change the database during this testing phase, before all of the data have been entered. The term prototyping refers to the iterative process used to try different report formats and input screens to determine their suitability and effectiveness.

-------------------------------------------- 4

Student’s Signature / Date

Page 5: DBMS 1 (2)

3) Navigational access is traditionally associated with the network and hierarchical model of database interfaces and has evolved into set-oriented systems.

Navigational techniques use "pointers" and "paths" to navigate among data records (also known as "nodes"). This is in contrast to the relational model (implemented in relational databases), which strives to use "declarative" or logic programming techniques in which you ask the system for what you want instead of how to navigate to it.

4) Database and Database Systems are very critical components of developing applications within the organization. We discussed below applications and mentioned further information.

-------------------------------------------- 5

Student’s Signature / Date

Page 6: DBMS 1 (2)

a) Data Warehouse / Data Mart

Data Warehouse is a single organizational repository of enterprise wide data across many or all

subject areas. The Data Warehouse is the authoritative repository of all the fact and dimension

data (that is also available in the data marts) at an atomic level.

Data Mart is a specific, subject oriented, repository of data designed to answer specific questions

for a specific set of users. So an organization could have multiple data marts serving the needs of

marketing, sales, operations, collections, etc. A data mart usually is organized as one

dimensional model as a star-schema (OLAP cube) made of a fact table and multiple dimension

tables.

http://www.e2eanalytix.com/images/services_clip_image001.jpg

b) On line Analytical ProcessingOnline Analytical Processing is a technology that uses multidimensional view of aggregate data for quicker access to strategic information.

http://www.cs.washington.edu/education/courses/cse100/99au/FIT100-99.L9/sld020.htm

c) Data Mining

-------------------------------------------- 6

Student’s Signature / Date

Page 7: DBMS 1 (2)

Data Mining is an analytic process designed to explore data (usually large amounts of data - typically business or market related) in search of consistent patterns and/or systematic relationships between variables, and then to validate the findings by applying the detected patterns to new subsets of data.

The ultimate goal of data mining is prediction - and predictive data mining is the most common type of data mining and one that has the most direct business applications. The process of data mining consists of three stages:

(1) The initial exploration, (2) Model building or pattern identification with validation / verification (3) Deployment (i.e., the application of the model to new data in order to generate predictions)

http://finntrack.co.uk/images/DiagramDataMining.jpg

d) Network Database Application

Database systems have been impacted leading by developments in Internet technologythrough so-called Web-enabled or network database applications.

Users access such applications through a Web browser on their desktop system. Browser software access and display Web pages sited on a Web server identified by a universal resource locator (URL).

http://www.unique-databases.co.uk/Images/Network3s.png

e) Universal Servers

Traditional database applications support structured data such as numbers or character

-------------------------------------------- 7

Student’s Signature / Date

Page 8: DBMS 1 (2)

strings. Newer applications such as network database applications demand the ability tostore and manipulate more complex data types such as image data, audio data and video data.

Many contemporary DBMS are hence casting themselves as so-called universal servers.

The universal server approach involves the extension of DBMS to support bothtraditional and non-traditional data. Non-traditional data is generally supported throughuser-defined data types (UDTs) and user-defined functions (UDFs). UDTs also known asabstract data types define non-standard data structures. UDFs permit the users of adatabase to alter and manipulate UDTs.

http://unvtec.com/ESW/Images/ev1_servers%5B1%5D.jpg?xcache=4605

5. A data model is a collection of concepts that can be used to describe the structure of a

database.

The set of concepts that defines a data model may be divided into three major parts:

-------------------------------------------- 8

Student’s Signature / Date

Page 9: DBMS 1 (2)

Data Structure - A set of principles concerned with how data is structured. Data manipulation - A set of principles concerned with how data is operated on.

Data integrity - A set of principles concerned with determining which states are valid for

a database.

a) Classic Data Model

These are the hierarchical, network and relational data models. The hierarchical datamodel is an extension of the primitive data model discussed above. The network is anextension of the hierarchical approach. The relational data model is a fundamentaldeparture from the hierarchical and network approaches.

a) Hierarchical Data Model

The hierarchical data model organizes data in a tree structure. There is a hierarchy of parent and child data segments. This structure implies that a record can have repeating information, generally in the child data segments.

Data in a series of records, which have a set of field values attached to it. It collects all the instances of a specific record together as a record type. These record types are the equivalent of tables in the relational model, and with the individual records being the equivalent of rows. To create links between these record types, the hierarchical model uses Parent Child Relationships. These are a 1:N mapping between record types. This is done by using trees, like set theory used in the relational model, "borrowed" from maths. For example, an organization might store information about an employee, such as name, employee number, department, salary.

The organization might also store information about an employee's children, such as name and date of birth. The employee and children data forms a hierarchy, where the employee data represents the parent segment and the children data represents the child segment. If an employee has three children, then there would be three child segments associated with one employee segment. In a hierarchical database the parent-child relationship is one to many. This restricts a child segment to having only one parent segment. Hierarchical DBMSs were popular from the late 1960s, with the introduction of IBM's Information Management System (IMS) DBMS, through the 1970s.

b) Network Data Model

The popularity of the network data model coincided with the popularity of the hierarchical data model. Some data were more naturally modeled with more than one

-------------------------------------------- 9

Student’s Signature / Date

Page 10: DBMS 1 (2)

parent per child. So, the network model permitted the modeling of many-to-many relationships in data.

In 1971, the Conference on Data Systems Languages (CODASYL) formally defined the network model. The basic data modeling construct in the network model is the set construct.

A set consists of an owner record type, a set name, and a member record type. A member record type can have that role in more than one set, hence the multiparent concept is supported. An owner record type can also be a member or owner in another set.

The data model is a simple network, and link and intersection record types (called junction records by IDMS) may exist, as well as sets between them . Thus, the complete network of relationships is represented by several pairwise sets; in each set some (one) record type is owner (at the tail of the network arrow) and one or more record types are members (at the head of the relationship arrow). Usually, a set defines a 1:M relationship, although 1:1 is permitted. The CODASYL network model is based on mathematical set theory.

b) Object Oriented Data Model

Object DBMSs add database functionality to object programming languages. They bring much more than persistent storage of programming language objects. Object DBMSs extend the semantics of the C++, Smalltalk and Java object programming languages to provide full-featured database programming capability, while retaining native language compatibility.

A major benefit of this approach is the unification of the application and database development into a seamless data model and language environment. As a result, applications require less code, use more natural data modeling, and code bases are easier to maintain.

Object developers can write complete database applications with a modest amount of additional effort. According to Rao (1994), "The object-oriented database (OODB) paradigm is the combination of object-oriented programming language (OOPL) systems and persistent systems.

In contrast to a relational DBMS where a complex data structure must be flattened out to fit into tables or joined together from those tables to form the in-memory structure, object DBMSs have no performance overhead to store or retrieve a web or hierarchy of interrelated objects. This one-to-one mapping of object programming language objects to database objects has two benefits over other storage approaches: it provides higher performance management of objects, and it enables better management of the complex interrelationships between objects. This makes object DBMSs better suited to support applications such as financial portfolio risk analysis systems, telecommunications service applications, World Wide Web document structures, design and manufacturing systems, and hospital patient record systems, which have complex relationships between data.

c) Deductive Data Model

Deductive Data Model provides a unified approach to definition of Data Structures and Procedures.

-------------------------------------------- 10

Student’s Signature / Date

Page 11: DBMS 1 (2)

• Deductive Data Model provides a possibility to retrieve not only explicitly stored data but logically inferred data as well.

• In other words, deductive database systems are able to make logical conclusions

Task 2

i.

-------------------------------------------- 11

Student’s Signature / Date

Page 12: DBMS 1 (2)

ii.

iii. SELECT EMP.BOSSNO AS Managers_EMP_NO, COUNT(EMP.EMPNO) AS [No_of

-------------------------------------------- 12

Student’s Signature / Date

Page 13: DBMS 1 (2)

_Employees_Coordinate], EMP_1.EMPFNAME AS First_Name FROM EMP LEFT OUTER JOIN EMP AS EMP_1 ON EMP.BOSSNO = EMP_1.EMPNO GROUP BY EMP.BOSSNO, EMP_1.EMPFNAME HAVING (COUNT(EMP.EMPNO) > 1)

Task 3

i). Primary key of the EMP table = EMPNO

-------------------------------------------- 13

Student’s Signature / Date

Page 14: DBMS 1 (2)

I get some alias for assist above task. I create alias table of EMP table. These alias creating for create relationship without circular reference. As a result of it can create relationship between EMP table BOSSNO and EMO_1 table EMPNO fields.

ii). .

SELECT EMP.BOSSNO AS Managers_EMP_NO, COUNT(EMP.EMPNO) AS [No_of _Employees_Coordinate], EMP_1.EMPFNAME AS First_Name FROM EMP LEFT OUTER JOIN EMP AS EMP_1 ON EMP.BOSSNO = EMP_1.EMPNO GROUP BY EMP.BOSSNO, EMP_1.EMPFNAME HAVING (COUNT(EMP.EMPNO) > 1)

Task 4

-------------------------------------------- 14

Student’s Signature / Date

Page 15: DBMS 1 (2)

Creating table

CREATE TABLE [dbo].[EMP](

[EMPNO] [int] NOT NULL,

[EMPFNAME] [varchar](75) NOT NULL,

[EMPSALARY] [varchar](75) NULL,

[DEPTNAME] [varchar](150) NOT NULL,

[BOSSNO] [int] NULL,

CONSTRAINT [PK_EMP] PRIMARY KEY CLUSTERED ([EMPNO]),

CONSTRAINT [FK_EMP_EMP] FOREIGN KEY ([BOSSNO]) REFERENCES [dbo].[EMP]([EMPNO]))

Insert Data

INSERT INTO EMP (EMPNO, EMPNAME, EMPSALARY, DEPTNAME, BOSSNO)VALUES (1, 'Ali', 75000, 'Management', NULL);

-------------------------------------------- 15

Student’s Signature / Date

Page 16: DBMS 1 (2)

SELECT WRK.DEPTNAME, COUNT(*) AS EmpCountFROM EMP WRK, EMP BOSSWHERE WRK.BOSSNO = BOSS.EMPNO ANDWRK.EMPSALARY >= BOSS.EMPSALARYGROUP BY WRK.DEPTNAME;

SELECT DISTINCT DEPTNAME FROM EMPWHERE DEPTNAME <> 'Management'AND DEPTNAME NOT IN(SELECT WRK.DEPTNAMEFROM EMP WRK, EMP BOSSWHERE WRK.BOSSNO = BOSS.EMPNOAND WRK.EMPSALARY >= BOSS.EMPSALARY);

-------------------------------------------- 16

Student’s Signature / Date

Page 17: DBMS 1 (2)

Quarry

SELECT EMP.BOSSNO AS Managers_EMP_NO, COUNT(EMP.EMPNO) AS [No_of _Employees_Coordinate], EMP_1.EMPFNAME AS First_NameFROM EMP LEFT OUTER JOIN EMP AS EMP_1 ON EMP.BOSSNO = EMP_1.EMPNOGROUP BY EMP.BOSSNO, EMP_1.EMPFNAMEHAVING (COUNT(EMP.EMPNO) > 1)

Relationship

Output

-------------------------------------------- 17

Student’s Signature / Date

Page 18: DBMS 1 (2)

Thanking You!

-------------------------------------------- 18

Student’s Signature / Date

Page 19: DBMS 1 (2)

-------------------------------------------- 19

Student’s Signature / Date