You are on page 1of 19

Pre-Graduate Diploma in Network Engineering University of Greenwich Advanced Database Management System (ADBMS)

No

Assignment Description
Identify the DBMS Kernel & Toolkit Key Phases of DB development process Navigational Database Critical components in organization Data Warehouse / Data Mart Online Analytical Processing Data Mining Network Database Application Universal Servers Data Models Data Structure, Integrity and manipulation Classic Data Model Hierarchical data model Network Data Model Object Oriented Data Model Deductive Data Model Provide the output when SQL code run Provide the output when SQL code run Express request in SQL manage more than one employee Create DB Directed by tutor Assumptions you make table Appropriate tool produce for activities Implementation and SQL Applications

Page No
3

4 5 6 6 6 7 7 8 9 9 9 10 10 11 12 12 13 14 14 15 - 17

TASK2

TASK3 TASK4

-------------------------------------------Students Signature / Date

TASK1

Total number of pages including this cover page. Submission Date Student's ID Student's Full Name Lecturer's Name Anthonige Indika Pradeep Mr. Azeem 07-01-2012 Due Date Class Code 07-01-2012

-------------------------------------------Students Signature / Date

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

-------------------------------------------Students Signature / Date

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 Processes Define 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 effort Determine 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 needs Once 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 Design A 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 Model The 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 design With 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 database Once 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. -------------------------------------------Students Signature / Date 4

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.

-------------------------------------------Students Signature / Date

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

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 Processing


Online 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 -------------------------------------------Students Signature / Date 6

c) Data Mining
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 technology through 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 -------------------------------------------Students Signature / Date 7

e) Universal Servers
Traditional database applications support structured data such as numbers or character strings. Newer applications such as network database applications demand the ability to store 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 both traditional and non-traditional data. Non-traditional data is generally supported through user-defined data types (UDTs) and user-defined functions (UDFs). UDTs also known as abstract data types define non-standard data structures. UDFs permit the users of a database to alter and manipulate UDTs.

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

-------------------------------------------Students Signature / Date

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: 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 data model is an extension of the primitive data model discussed above. The network is an extension of the hierarchical approach. The relational data model is a fundamental departure 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.

-------------------------------------------Students Signature / Date

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 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. -------------------------------------------Students Signature / Date 10

c) Deductive Data Model


Deductive Data Model provides a unified approach to definition of Data Structures and Procedures. 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

-------------------------------------------Students Signature / Date

11

Task 2
i.

ii.

-------------------------------------------Students Signature / Date

12

iii.

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)

-------------------------------------------Students Signature / Date

13

Task 3 i). Primary key of the EMP table = EMPNO 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 _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)

[No_of

-------------------------------------------Students Signature / Date

14

Task 4 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] [dbo].[EMP]([EMPNO])) FOREIGN KEY ([BOSSNO]) REFERENCES

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

-------------------------------------------Students Signature / Date

15

SELECT WRK.DEPTNAME, COUNT(*) AS EmpCount FROM EMP WRK, EMP BOSS WHERE WRK.BOSSNO = BOSS.EMPNO AND WRK.EMPSALARY >= BOSS.EMPSALARY GROUP BY WRK.DEPTNAME;

SELECT DISTINCT DEPTNAME FROM EMP WHERE DEPTNAME <> 'Management' AND DEPTNAME NOT IN (SELECT WRK.DEPTNAME FROM EMP WRK, EMP BOSS WHERE WRK.BOSSNO = BOSS.EMPNO AND WRK.EMPSALARY >= BOSS.EMPSALARY);

-------------------------------------------Students Signature / Date

16

Quarry
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)

Relationship

Output

-------------------------------------------Students Signature / Date

17

Thanking You!

-------------------------------------------Students Signature / Date

18

-------------------------------------------Students Signature / Date

19

You might also like