Software Engineering Body of Knowledge (v3) (2014) (811503), страница 68
Текст из файла (страница 68)
In a sense, a database isa generalization and expansion of data structures.But the difference is that a database is usuallyexternal to individual programs and permanent inexistence compared to data structures. Databasesare used when the data volume is large or logical13-18 SWEBOK® Guide V3.0relations between data items are important. Thefactors considered in database design include performance, concurrency, integrity, and recoveryfrom hardware failures.12.1. Entity and SchemaThe things a database tries to model and store arecalled entities.
Entities can be real-world objectssuch as persons, cars, houses, and so forth, or theymay be abstract concepts such as persons, salary,names, and so forth. An entity can be primitivesuch as a name or composite such as an employeethat consists of a name, identification number,salary, address, and so forth.The single most important concept in a databaseis the schema, which is a description of the entiredatabase structure from which all other databaseactivities are built. A schema defines the relationships between the various entities that compose adatabase. For example, a schema for a companypayroll system would consist of such things asemployee ID, name, salary rate, address, and soforth.
Database software maintains the databaseaccording to the schema.Another important concept in database is thedatabase model that describes the type of relationship among various entities. The commonlyused models include relational, network, andobject models.12.2. Database Management Systems (DBMS)Database Management System (DBMS) components include database applications for the storage of structured and unstructured data and therequired database management functions neededto view, collect, store, and retrieve data from thedatabases.
A DBMS controls the creation, maintenance, and use of the database and is usuallycategorized according to the database model itsupports—such as the relational, network, orobject model. For example, a relational databasemanagement system (RDBMS) implements features of the relational model. An object databasemanagement system (ODBMS) implements features of the object model.12.3. Database Query LanguageUsers/applications interact with a databasethrough a database query language, which is a specialized programming language tailored to database use. The database model tends to determinethe query languages that are available to accessthe database.
One commonly used query language for the relational database is the structuredquery language, more commonly abbreviated asSQL. A common query language for object databases is the object query language (abbreviated asOQL). There are three components of SQL: DataDefinition Language (DDL), Data ManipulationLanguage (DML), and Data Control Language(DCL). An example of an DML query may looklike the following:SELECT Component_No, QuantityFROM COMPONENTWHERE Item_No = 100The above query selects all the Component_Noand its corresponding quantity from a databasetable called COMPONENT, where the Item_Noequals to 100.12.4. Tasks of DBMS PackagesA DBMS system provides the followingcapabilities:• Database development is used to define andorganize the content, relationships, and structure of the data needed to build a database.• Database interrogation is used for accessingthe data in a database for information retrievaland report generation.
End users can selectively retrieve and display information andproduce printed reports. This is the operationthat most users know about databases.• Database Maintenance is used to add, delete,update, and correct the data in a database.• Application Development is used to developprototypes of data entry screens, queries,forms, reports, tables, and labels for a prototyped application.
It also refers to the use of4th Generation Language or application generators to develop or generate program code.Computing Foundations 13-1912.5. Data ManagementA database must manage the data stored in it.This management includes both organization andstorage.The organization of the actual data in a databasedepends on the database model. In a relationalmodel, data are organized as tables with differenttables representing different entities or relationsamong a set of entities. The storage of data dealswith the storage of these database tables on disks.The common ways for achieving this is to use files.Sequential, indexed, and hash files are all used inthis purpose with different file structures providingdifferent access performance and convenience.12.6. Data MiningOne often has to know what to look for beforequerying a database.
This type of “pinpointing”access does not make full use of the vast amountof information stored in the database, and in factreduces the database into a collection of discreterecords. To take full advantage of a database, onecan perform statistical analysis and pattern discovery on the content of a database using a technique called data mining. Such operations can beused to support a number of business activitiesthat include, but are not limited to, marketing,fraud detection, and trend analysis.Numerous ways for performing data mininghave been invented in the past decade and includesuch common techniques as class description,class discrimination, cluster analysis, associationanalysis, and outlier analysis.13. Network Communication Basics[8*, c12]A computer network connects a collection ofcomputers and allows users of different computers to share resources with other users.
A networkfacilitates the communications between all theconnected computers and may give the illusionof a single, omnipresent computer. Every computer or device connected to a network is calleda network node.A number of computing paradigms have emergedto benefit from the functions and capabilitiesprovided by computer networks. These paradigmsinclude distributed computing, grid computing,Internet computing, and cloud computing.13.1. Types of NetworkComputer networks are not all the same andmay be classified according to a wide variety ofcharacteristics, including the network’s connection method, wired technologies, wireless technologies, scale, network topology, functions, andspeed. But the classification that is familiar tomost is based on the scale of networking.• Personal Area Network/Home Network is acomputer network used for communicationamong computer(s) and different information technological devices close to one person.
The devices connected to such a network may include PCs, faxes, PDAs, andTVs. This is the base on which the Internetof Things is built.• Local Area Network (LAN) connects computers and devices in a limited geographicalarea, such as a school campus, computer laboratory, office building, or closely positionedgroup of buildings.• Campus Network is a computer network madeup of an interconnection of local area networks(LANs) within a limited geographical area.• Wide area network (WAN) is a computernetwork that covers a large geographic area,such as a city or country or even across intercontinental distances. A WAN limited to acity is sometimes called a Metropolitan AreaNetwork.• Internet is the global network that connectscomputers located in many (perhaps all)countries.Other classifications may divide networks intocontrol networks, storage networks, virtual private networks (VPN), wireless networks, pointto-point networks, and Internet of Things.13.2. Basic Network ComponentsAll networks are made up of the same basic hardware components, including computers, network13-20 SWEBOK® Guide V3.0interface cards (NICs), bridges, hubs, switches,and routers.
All these components are called nodesin the jargon of networking. Each component performs a distinctive function that is essential forthe packaging, connection, transmission, amplification, controlling, unpacking, and interpretationof the data. For example, a repeater amplifies thesignals, a switch performs many-to-many connections, a hub performs one-to-many connections,an interface card is attached to the computer andperforms data packing and transmission, a bridgeconnects one network with another, and a router isa computer itself and performs data analysis andflow control to regulate the data from the network.The functions performed by various networkcomponents correspond to the functions specifiedby one or more levels of the seven-layer OpenSystems Interconnect (OSI) networking model,which is discussed below.13.3. Networking Protocols and StandardsComputers communicate with each other usingprotocols, which specify the format and regulations used to pack and un-pack data.
To facilitateeasier communication and better structure, network protocols are divided into different layerswith each layer dealing with one aspect of thecommunication. For example, the physical layers deal with the physical connection betweenthe parties that are to communicate, the data linklayer deals with the raw data transmission andflow control, and the network layer deals with thepacking and un-packing of data into a particularformat that is understandable by the relevant parties. The most commonly used OSI networkingmodel organizes network protocols into sevenlayers, as depicted in Figure 13.5.One thing to note is that not all network protocols implement all layers of the OSI model.
Forexample, the TCP/IP protocol implements neitherthe presentation layer nor the session layer.There can be more than one protocol for eachlayer. For example, UDP and TCP both work onthe transport layer above IP’s network layer, providing best-effort, unreliable transport (UDP) vs.reliable transport function (TCP). Physical layerprotocols include token ring, Ethernet, fast Ethernet, gigabit Ethernet, and wireless Ethernet. Datalink layer protocols include frame-relay, asynchronous transfer mode (ATM), and Point-toPoint Protocol (PPP).
Application layer protocolsinclude Fibre channel, Small Computer SystemInterface (SCSI), and Bluetooth. For each layeror even each individual protocol, there may bestandards established by national or internationalorganizations to guide the design and development of the corresponding protocols.Application LayerPresentation LayerSession LayerTransport LayerNetwork LayerData link LayerPhysical LayerFigure 13.5. The Seven-Layer OSI Networking Model13.4. The InternetThe Internet is a global system of interconnectedgovernmental, academic, corporate, public, andprivate computer networks.