Example: bachelor of science

Course Notes on Databases and Database Management …

Course Notes onDatabases and Database Management SystemsDatabases and Database Management Systems: Summary Databases Database Management systems Schema and instances General view of DBMS architecture Various levels of schema Integrity constraint Management Notion of data model Database languages and interfaces Other DBMS functions Roles and functions in Database management1 Database - Management Systems, October 7, 2008 1 Database A collection of related data with3logically coherentstructure3inherentmeaning3purpos e, for intended users and applications3varyingsize3scope,contentof varying breadth3physical organizationof varying complexity3various applications withpossibly-conflicting objectives3persistence.

Database Management Systems (DBMSs) † DBMS: a collection of general-purpose, application-independent programs providing services to 3 deflne the structure of a database, i.e., data types and constraints that the data will have to satisfy 3 manage the storageof data, safely for long periods of time, on some storage medium controled by the DBMS 3 manipulate a database, with e–cient user ...

Tags:

  Database, System, Management, Time, On databases and database management

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of Course Notes on Databases and Database Management …

1 Course Notes onDatabases and Database Management SystemsDatabases and Database Management Systems: Summary Databases Database Management systems Schema and instances General view of DBMS architecture Various levels of schema Integrity constraint Management Notion of data model Database languages and interfaces Other DBMS functions Roles and functions in Database management1 Database - Management Systems, October 7, 2008 1 Database A collection of related data with3logically coherentstructure3inherentmeaning3purpos e, for intended users and applications3varyingsize3scope,contentof varying breadth3physical organizationof varying complexity3various applications withpossibly-conflicting objectives3persistence.

2 Existence over a long period of time2 Database = a collection of related data with3a logically coherentstructure(can be characterized as a whole)3some inherentmeaning(represents some partial view of a portion of the realworld)3a specificpurpose, an intended group of users and applications (a databaseembodies a biased,operational view on the world; Database Management isnot after modeling the world in general, maybe philosophy or ontology are)3a largelyvarying size(from a personal list of addresses to the National Registerof Persons)3a scope orcontentof varying breadth (from a personal list of addresses to amultimedia encyclopedia)3aphysical organization of varying complexity(from a manual personallist, managed with simple files, to huge multi-user Databases with geographicallydistributed data and access)

3 3logically-coordinatedobjectives, data is defined once for a community of users,and accessed byvarious applicationswith specific needsDatabase- Management Systems, October 7, 2008 2 Database Management Systems (DBMSs) DBMS: a collection of general-purpose,application-independent programsproviding services to3define the structureof a Database , , data types and constraints thatthe data will have to satisfy3manage the storageof data, safely for long periods of time , on some storagemedium controled by the DBMS3manipulate a Database , with efficient user interfaces to query the databaseto retrieve specific data, update the Database to reflect changes in the world,generate reports from the data3manage Database usage.

4 Users with their access rights, performance op-timization, sharing of data among several users, security from accidents orunauthorized use3monitorand analyze Database usage3 DBMS have similarities with operating systems: both manage memory, process schedul-ing, I/O, communication In addition, DBMSs implement many data- Management functions Other name for DBMS: Database system , Database manager DBMSs typically do not use the file system of the operating system of the machinewhere they are installed. Instead, the define their own richer file organizations andaccess methodsDatabase- Management Systems, October 7, 2008 3 Example of a DatabaseStudentStudNameStudNoClassDeptSm ith171 CSBrown82 CSCourseCourseNameCourseNoCreditsDeptInt roduction to CSCS13104 CSData StructuresCS33204 CSDiscrete MathematicsMA24103 MADatabase ManagementCS33803 CSPrerequisiteCourseNoPrereqNoCS3380CS33 20CS3380MA2410CS3320CS1310 SessionSessIdentCourseNoSemesterYearProf essor85MA2410 Fall96 King92CS1310 Fall96 Anderson102CS3320 Spring97 Knuth112MA2410 Fall97 Chang119CS1310 Fall97 AndersonGradeReportStudNoSessIdentGrade1 711214171191288516892168102144 Important Functions on a Database Structure definition.

5 Declare 5 files or relations + data types, (StudName, StudentNo, Class, Dept) Population: input data about specific students, courses, prerequisites,.. Querying3 Which are the prerequisites of the Database Course ?3 List students who got grade 14 or 16 for the Database Course in 1993 Reporting: prepare diplomas, with standard text, interspersed with name ofstudent, courses taken, name of degree, grades, etc. Modification, update of population3 Create a new session for the Database course3 Enter a grade 16 for Smith in the Database Session Modification of structure, of schema3 Create a new relation for instructors3 Add Address attribute to relation Student5 Database - Management Systems, October 7, 2008 4 Transient and Persistent Data In practice, information systems often require persistent data Data: relevant facts about the domain of interest3persistent: continues to exist even when the system is not active3transient.

6 Created while an application is running and not needed when theapplication has terminated Persistent data must be stored in secondary memory (not just in computer mem-ory) and organized to be made available to several applications6 Data and Database Schema Fundamental hypothesis of Database modeling: the information containedin a Database is represented on two levels: (1)data(large, frequently modified)and (2)structure of data(small, stable in time ) Database schema: description of DB structure, accessible by programsDatabase = Data TypeMetadataStructureSchemaIntensionCata logDirectoryData dictionary + InstancesOccurrencesDataExtensionPopulat ion DBMS software is application-independent it consults the databasestructure in the data dictionary to understand and execute application programs7 Database - Management Systems, October 7, 2008 5 Ontologyis another more recent term for designating the structure of an applicationdomain (= schema information valid for several related applications)

7 Various Levels of Schema A DBMS provides users with3aconceptual representationof information from the point of view of users3aphysicalorinternal representationwith the implementation details Both are necessary, but each has its purpose Users refer to the conceptual representation and the DBMS ensures the corre-spondence with the physical representation The success of relational technology has demonstrated that physical conceptscan be hidden from users and that there are substantial advantages for doing so8 Technical vocabulary:logicalversusphysicalconcepts :3logical(old terminology) orconceptual(current terminology) information: dealswith the user view on data (in terms ofconceptsfamiliar to actors in the appli-cation domain)3physicalor internal concepts.

8 Concern the implementation of conceptual con-cepts into the hardware/software infrastructure (this is a technological area) Database - Management Systems, October 7, 2008 6 Gross Architecture of DB and DBMS SoftwareMetadataSoftwareDBMS Software to ProcessQueries / ProgramsSoftware to AccessStored DataSystemDatabaseApplication Programs /QueriesUsers / Programmers Data9 Data Structures in the Conceptual SchemaStudentStudNameStudNoClassDeptCour seCourseNameCourseNoCreditsDeptPrerequis iteCourseNoPrereqNoSessionSessIdentCours eNoSemesterYearProfessorGradeReportStudN oSessIdentGrade10 Database - Management Systems, October 7, 2008 7 In addition to data structures, the schema also comprises3the definition of domains for data elements (attributes)

9 3the specification of constraints, to refine the data-structure part of the schemaData Structures in the Physical Schema Student records are stored in a file as follows:Data Item NameStarting positionLength (bytes)Name130 StudentNumber314 Class354 Department3943length of Student records = 42 bytes3the file is ordered by values of the Name field3the file is indexed on Name11 Database - Management Systems, October 7, 2008 8 Support of External Views A single Database usually serves the needs of a community of users differentperspectives orviewson the same data are often natural View: some subset of the Database or some restructuring of the Database suitedfor an application Views are redundant with the basic definition of the Database (they may or maynot be stored explicitly, this is an efficiency issue) DBMS takes care of the correspondence between views and Database data View definitions are part of the Database schema Other terms for view.

10 Subschema, external schema, derived relation12 More on Views Relations in a Database comprisebase relationsandviews(users do not necessarilyhave to know which is which) Applications access the Database through views, without necessarily knowing aboutthe whole Database Views may be3queried3combined in queries with base relations3used to define other views3in general, NOT updated freelyDatabase- Management Systems, October 7, 2008 9A View for Preparing DiplomasDiploma DataStudNameStudentTranscript CourseNameGradeSemesterYearSmithIntroduc tion to CS12 Fall97 Discrete Mathematics14 Fall97 BrownDiscrete Mathematics16 Fall96 Introduction to CS16 Fall96 Data Structures14 Spring97 Database Management16 Fall9713 View Diploma Data is read-only (data cannot be entered into the Database or modifiedor deleted thru Diploma Data) View definition, define view (new attr.)


Related search queries