Introduction to Database Systems Ch. 1, Ch. 2Teaching StaffCommunicationTextbooksThe Study of DatabasesCourse OutlinePrerequisiteRequirementsGradingThe Course ProjectWhat is a Database System?Why Use a DBMS?What Does a DBMS Offer?How to Use a DBMSData Model & DB SchemaEntity-Relationship ModelRelational ModelAbstract levels of DB SchemaExample: University DatabaseData IndependenceDatabase LanguageWho Are Happy w/ Databases?Structure of a DBMSSummaryLook AheadIntroduction to Database SystemsCh. 1, Ch. 2Mr. John OrtizDept. of Computer ScienceUniversity of Texas at San AntonioLecture 1 Introduction 2Teaching StafInstructor: Mr. John OrtizOffice: TBDPhone: NULLEmail: [email protected] hour: 6 – 7pm, T & R, after any classTA: NULLLecture 1 Introduction 3CommunicationWeb page of Dr. Zhang: -use as a GUIDE ONLY http://www.cs.utsa.edu/~wzhang/cs3743/homeContains everything about the course: syllabus, announcement, assignments, project, lecture notes, etc.Generally, I will use Dr. Zhang’s outline, but do not expect my tests to look like any of hisMailing list: [email protected] 1 Introduction 4TextbooksRequired textbook:Fundamentals of Database Systems, 3rd Edition, by R. Elmasri & S. NavatheRecommended textbook:Oracle8 Programming, A Primer, by R. SunderramanOther books: Reserved in JPL under instructor’s nameLecture 1 Introduction 6The Study of DatabasesSeveral aspects:Modeling and design of databasesDatabase programming: querying and update operationsDatabase implementationDatabase study cuts across many fields of Computer Science: OS, languages, AI, Logic, multimedia, theory, ...?Lecture 1 Introduction 7Course OutlineFrom a user perspectiveBasic concepts: database, DBMS, …Data modeling: ER, relational, OO, …Database design: logical & physical designUse of databases: query, update, loading, …Database applications: design, implementingFrom a system perspectiveData storage: device, structure, access, …Query processing, optimizationTransaction processing, and more …Lecture 1 Introduction 10PrerequisiteProgramming (either C/C++ or Java)Unix operating systemData structure & algorithmMathematics (logic, sets, algebra, …)Lecture 1 Introduction 11RequirementsRead, read, readTextbooks, System manual, …Practice, practice, practiceHomework, projectPlay with sample programs, examples in books, your own ideas, …Communicate, communicate, communicateWith instructor, TA, each other, …Be honestNo cheating, plagiarism, …Lecture 1 Introduction 12GradingAssignments 150 ptsProject 200 ptsMidterm I 150 ptsMidterm II 150 ptsFinal Exam 300 ptsIntangibles 50 ptsLecture 1 Introduction 13The Course ProjectGoalDevelop a realistic database applicationGain experience in team workTopic? Your choice with my approval, be creativeTeam4 members, elect a leader, complete self-organizing, collaboration, overcome diferencesMilestonesProgress in 5 partsLecture 1 Introduction 14What is a Database System?Database System = Database + DBMSA Database isA large, integrated collection of dataModels a real-world enterprise.Entities (e.g., students, courses)Relationships (e.g., Mary takes CS123)A Database Management System (DBMS) is a software package designed to store and manage databases easily and efficiently.Lecture 1 Introduction 15Why Use a DBMS?Suppose we need to build a university information system. How do we store the data? (use file structures…)query the data? (write programs…)Update data safely? (more programs…)provide diferent views on the same data? (registrar versus students) (more prog…)deal with crashes? (more prog…)Way too complicated! Go buy a DBMS!Lecture 1 Introduction 16What Does a DBMS Ofer?Efficient data storage.Abstract data model.Query & data manipulation language.Diferent views of the data.Data integrity & security.Support application development.Concurrent access by multiple users.Crash recovery.Data analysis, mining, visualization, …Lecture 1 Introduction 17How to Use a DBMSRequirements modeling (conceptual)Decide what entities should be part of the application and how they are relatedSchema design and database creationDecide on a database schemaDefine the schema to the DBMSLoad data into the databaseAccess to dataUse a database languageWrite database application programsUse database application programsLecture 1 Introduction 18Data Model & DB SchemaA data model is a collection of concepts for describing data in a DB, includingObjectsRelationships among objectsConstraints on objects & relationships Operations on objects & relationshipsA schema is a description of a particular collection of data, using a given data model.An instance is a particular set of data in the DB.Lecture 1 Introduction 19Entity-Relationship ModelA popular conceptual model.Concepts include entities, relationships, constraints. (see p.63 in text)Courses EnrolledSID NameCIDCreditsmnStudentsAgeGPACnameGradeLecture 1 Introduction 20Relational ModelThe most widely used logical model today.Concepts include: tables, constraints, operations, … Students(sid: string, name: string, login: string, age: integer, gpa:real) Courses(cid: string, cname:string, credits:integer) Enrolled(sid:string, cid:string, grade:string)Lecture 1 Introduction 21Abstract levels of DB SchemaViews describe how users see the data. Conceptual schema defines logical structure using a data modelPhysical schema describes the files and indices used.Physical SchemaConceptual SchemaView 1 View 2 View 3Lecture 1 Introduction 22Example: University DatabaseA View for registrar officeCourse_info(cid:string,enrollment:integer)The conceptual schema: Students(sid: string, name: string, login:string, age: integer, gpa:real) Courses(cid: string, cname:string, credits:integer) Enrolled(sid:string, cid:string, grade:string)the physical schema:Relations stored as unordered files. Index on first column of Students.Lecture 1 Introduction 23Data IndependenceDBMS is able to hide details of lower level schema from clients of higher level schemaLogical data independence: Protects views from changes in logical (conceptual) structure of data.Physical data independence: Protects conceptual schema from
View Full Document