Introduction to Databases
|
|
|
- Claire Hampton
- 10 years ago
- Views:
Transcription
1 Introduction to Databases PWSP CLASS DATABASE MAAGEMET ISTRUCTOR: SAJAY GOEL FEBRUARY 26-27, /4/2007 Sanjay Goel, School of Business, University at Albany
2 Databases Learning Objectives Learn need for relational databases Create Entity-Relationship Diagrams Learn the process of database normalization Learn the constructs of SQL Design and Implement relational databases using Microsoft Access 3/4/2007 Sanjay Goel, School of Business, University at Albany 2
3 Databases Data and Information Data is an individual fact or multiple facts, or a value, or a set of values, but is not significant to a business in and of itself. What does this mean: 7/3/2002 Giving data context, or meaning, turns it into information. Date of change of bankruptcy law 7/3/2002 3/4/2007 Sanjay Goel, School of Business, University at Albany 3
4 Databases What is a database A database is simply a bunch of information (data) stored on a computer. This could be a list of all your clients, a list of the products you sell, the results of a chess tournament or everyone in your family tree. If you run a matrimonial agency you probably have a spreadsheet with all your clients names and addresses on your computer The top of the spreadsheet are typically column headings: ame, Address, Telephone umber, Address, etc. The spreadsheet might have customer ID numbers and other data This is your client table in the database In your filing cabinet, you might have a separate folder for every project you ve worked on. This folder contains the project number, the name (or ID number) of the client, a description of the project, the current status, the budget and a completion date. This is your projects table in the database. 3/4/2007 Sanjay Goel, School of Business, University at Albany 4
5 Databases eed A database is required to keep track of things The climatic patterns over the last thousand years Data from celestial microscopes of the night sky umber of kids born with a mole on their finger umber of fishes which spawn in Alaska umber of people who also buy crackers along when they buy milk. As we will see, unlike a list or spreadsheet, a database can store complex information more efficiently than a simple list 3/4/2007 Sanjay Goel, School of Business, University at Albany 5
6 Databases Role Database is required to: Organize data. Retrieve information. Remember you store data in a database you retrieve information from the database. 3/4/2007 Sanjay Goel, School of Business, University at Albany 6
7 Databases Properties Persistence Data can be stored as long as required (i.e. magnetic disks rather than computer memory) Retrieve information. Sharing Can be used by multiple users simultaneously Unless two people are trying to change the same data at the same time they should be able to operate independently Interrelated Link information about different elements to provide a complete picture 3/4/2007 Sanjay Goel, School of Business, University at Albany 7
8 DATABASE COMPOETS 3/4/2007 Sanjay Goel, School of Business, University at Albany 8
9 Database Components Database System The four components of a database system are: Users Database Application Database Management System (DBMS) Database Database Application Database Management System (DBMS) Database 3/4/2007 Sanjay Goel, School of Business, University at Albany 9
10 Database Components User A user of a database system will Use a database application to track things Use forms to enter, read, delete and query data Produce reports 3/4/2007 Sanjay Goel, School of Business, University at Albany 0
11 Database Components Database A database is a self-describing collection of related records The database itself contains the definition of its structure Metadata is data describing the structure of the database data Tables within a relational database are related to each other 3/4/2007 Sanjay Goel, School of Business, University at Albany
12 Database Components Database Management System (DBMS) A database management system (DBMS) serves as an intermediary between database applications and the database The DBMS manages and controls database activities The DBMS creates, processes and administers the databases it controls Database management system (DBMS) has two goals. Add, delete and update data in the database. Provide various ways to view data in a database. 3/4/2007 Sanjay Goel, School of Business, University at Albany 2
13 Database Components DBMS Functions Create databases Create tables Create supporting structures Read database data Modify database data (insert, update, delete) Maintain database structures Enforce rules Control concurrency Provide security Perform backup and recovery 3/4/2007 Sanjay Goel, School of Business, University at Albany 3
14 Database Components Applications A database application is a set of one or more computer programs that serves as an intermediary between the user and the DBMS Functions of Database Applications include Create and process forms Process user queries Create and process reports Execute application logic Control database applications 3/4/2007 Sanjay Goel, School of Business, University at Albany 4
15 Database Components Desktop Database Systems Desktop database systems typically support single users Have one application Have only a few tables Have a few records Database Application Database Management System (DBMS) Database e.g. MS Access 3/4/2007 Sanjay Goel, School of Business, University at Albany 5
16 Database Components Organizational Database Systems Typically multi-user systems Include more than one application and several databases Involve multiple computers Are complex in design (large # of tables and records) Database Application Java Database Application C# Database Application VB Database Management System (DBMS) e.g. Oracle, SQL Server 3/4/2007 Sanjay Goel, School of Business, University at Albany 6 Database
17 RELATIOAL DATABASE 3/4/2007 Sanjay Goel, School of Business, University at Albany 7
18 Databases Example (Collection of Books) ISB Title AuID Auame AuPhone PubI Pubame PubPhone Price D Macbeth 5 Shakespeare Alpha Press $ Fairie Queene 7 Spencer Big House $ Hamlet 5 Shakespeare Alpha Press $ Emma Austen -- Big House $ Main Street 9 Smith Small House $ Main Street 0 Jones Small House $ Iliad 3 Homer Big House $ On Liberty 8 Mill Big House $ Visual Basic 4 Roman Big House $ C++ 4 Roman Big House $ Ulysses 6 Joyce Alpha Press $ Balloon 2 Grumpy Small House $ Balloon 3 Sleepy Small House $ Balloon Snoopy Small House $ Moby Dick 2 Melville Small House $ Jane Eyre Austen -- 3 Small House $ King Lear 5 Shakespeare Alpha Press $ /4/2007 Sanjay Goel, School of Business, University at Albany 8
19 Databases Why Use a Database? Most databases worth maintaining are quite complex. Library of congress contains 6 million records Social Security Database Department of Motor Vehicles Database Why can t we use a flat file like we had in word? Redundancy Redundancy is unnecessary repetition of data Wasted Storage Database Anomalies 3/4/2007 Sanjay Goel, School of Business, University at Albany 9
20 Databases Redundancy Book Database Multiple values in the column of a database e.g. some books are authored by multiple authors. There are three choices Accommodate multiple authors in multiple rows (one for each author) Complete information about a book is repeated as many times as there are authors. (causing large redundancy) Have multiple columns for the authors in each row. You have to determine the max number of authors a priori A lot of the fields will go unused Add all the author names in one column Searching and sorting become very hard. 3/4/2007 Sanjay Goel, School of Business, University at Albany 20
21 Databases Redundancy Library of Congress Library of Congress Example 0,000 publishers 6 million records Each address on average 50 characters long Assuming each character takes 2 bytes, the difference in storage is: (6,000, ) * 50 * 2 bytes ~.6 gbytes Duplication of address alone requires.6 gigabytes of storage 3/4/2007 Sanjay Goel, School of Business, University at Albany 2
22 Databases Redundancy Project Database In a list, each row is intended to stand on its own. So, the same information may be entered several times E.g. Consider a list of Projects that include the Project Manager s ame, ID, and Phone. If the same person is managing 5 projects his information would be repeated 0 times In a list, each row may contain information on more than one theme. As a result, needed information may appear in the lists only if information on other themes is also present E.g. A list of Projects may include Project Manager information (ame, ID, and Phone Extension) and Project information (ame, ID, StartDate, Budget) in the same row. 3/4/2007 Sanjay Goel, School of Business, University at Albany 22
23 Databases Anomalies A table anomaly is a structure for which a normal database operation cannot be executed without information loss or full search of the data table Three types of anomalies Insertion Deletion Update 3/4/2007 Sanjay Goel, School of Business, University at Albany 23
24 Databases Insertion Anomalies Insertion anomaly occurs when extra data beyond the desired data must be added to the database If we need to add a new publisher to the database, but we do not have any book by that publisher. we will need to add a new line and put ULL values in all but publisher related columns. Also ISB column which is supposed to be unique will have numerous null values. 3/4/2007 Sanjay Goel, School of Business, University at Albany 24
25 Databases Update Anomalies An update anomaly occurs when it is necessary to update multiple rows to modify a single fact. If the phone number of a publisher changes then all the entries of the publisher need to be changed. For instance changing the phone number of Big House publisher requires changing the phone number 6 times. Why is this bad? 3/4/2007 Sanjay Goel, School of Business, University at Albany 25
26 Databases Deletion Anomalies A deletion anomaly occurs whenever deleting a row inadvertently causes other data to be deleted. If we lose a book and delete a row containing the book, we lose the information of the publisher if it is the only book by that publisher. If we remove books Macbeth, Hamlet, Ulysses, and King Lear we lose all information about Alpha Press and Shakespeare. 3/4/2007 Sanjay Goel, School of Business, University at Albany 26
27 Databases Relational Design To create a relational database Break table into a collection of smaller tables. Define relationships among the table Each smaller table has a heading which contains the table definition a body which contains the content The relationships are created by having common columns among tables Matching values in the rows demonstrate relationships These relationships are used to join tables while designing queries 3/4/2007 Sanjay Goel, School of Business, University at Albany 27
28 Databases Relational Design 3/4/2007 Sanjay Goel, School of Business, University at Albany 28
29 Databases Relational Design Increased complexity Instead of simply sorting on columns in a table we need to gather information from multiple tables. Relational Integrity Relational integrity should be maintained while changing data. For instance if we delete publishers we can not let the books by that publisher reside in the books database as dangling references. Inadvertent data loss During the design care must be taken to not lose any data For instance without the books author table we will not know how to relate the books and authors. 3/4/2007 Sanjay Goel, School of Business, University at Albany 29
30 Databases Entities A database stores information about things encountered in real life i.e. person, places, things, or events. An entity is something of importance to a user that needs to be represented in a database An entity represents one theme or topic In an entity-relationship model thus entities are restricted to things that can be represented by a single table In the book database example Books, Authors & Publishers are the entities? All possible entities for a given entity type constitute the entity class. The subset of the entities from the entity class contained in a database is called an entity set 3/4/2007 Sanjay Goel, School of Business, University at Albany 30
31 Databases Entities Cont d An entity class stays constant whereas an entity set can change. For the given book database Book is an entity Set of all possible books in the world is the entity class The subset of the 4 books in the book table is the entity set 3/4/2007 Sanjay Goel, School of Business, University at Albany 3
32 Databases Relation A relation is a two-dimensional table that has specific characteristics The table dimensions, like a matrix, consist of rows and columns Characteristics of a Relation Rows contain data about an entity Columns contain data about attributes of the entity Cells of the table hold a single value All entries in a column are of the same kind Each column has a unique name The order of the columns is unimportant The order of the rows is unimportant o two rows may be identical 3/4/2007 Sanjay Goel, School of Business, University at Albany 32
33 Databases Attributes Properties of the entities that describe their behavior are called the attributes. Attribute values are the actual entries in each cell of a database table. The attributes have three main purposes Represent the real data in the database. e.g. in the book table the title and price are the describing attributes Uniquely identify entities within an entity class. e.g. ISB in the book table, PubID in the publisher table, and AuID in the author table provide unique identity to a book, publisher or an author. Define relationship of one entity with another entity 3/4/2007 Sanjay Goel, School of Business, University at Albany 33
34 Databases Attributes A set of multiple attributes can describe an entity uniquely so it is not absolutely essential to have an identifying attribute however it is useful to have these for the purpose of efficiency. e.g. for all the U.S. residents ame, race, color, height are attributes that describe the data while Social Security umber is the identifying entity. What are the attributes that we need for our three entities? Books: Title, Price, ISB Authors: AuID, AuPhone, Auame Publishers: Pubame, PubPhone, PubID 3/4/2007 Sanjay Goel, School of Business, University at Albany 34
35 Databases Attributes (Observations) From the books attributes there is no way to identify the publisher and author. We need to add more attributes to describe the relationships. We need to distinguish between the unique attribute for an entity set vs. unique attribute for an entity class. e.g. Book database: Title is a unique attribute for the current set of books, however, there are many books in the world with the same titles. ISB on the other hand is a unique identifier for the book. e.g. Adult males living in the U.S.: A lot of them have the same name, (probably the same age), however, SS is a unique identifier. Even though Publisher can probably be uniquely identified by the Publisher ame & Phone umber, we have added PubID to make identification more efficient. The attributes and the unique identifier selection is context dependent and is the job of the database designer. 3/4/2007 Sanjay Goel, School of Business, University at Albany 35
36 Databases Keys & Superkeys A key is one (or more) columns of a relation that is (are) used to identify a row A set of attributes from the set of all the attributes for a given entity is called the super key for the entity class. {ISB} is the superkey for the Book entity {PubID} or {Pubame, PubPhone} are the superkeys for the Publishers entity class. There can be multiple superkeys for a given entity. Superkeys should be evaluated on the basis of entity class not the entity set Unique identifier for books in a database of 4 books may not work when additional books are added to the table 3/4/2007 Sanjay Goel, School of Business, University at Albany 36
37 Databases Candidate Keys and Primary Key A superkey is called a candidate key if no proper subset of the superkey is also a key. i.e. a candidate key is a minimal superkey. e.g. Both {ISB} and {ISB, Title} are superkeys for the books table since they both uniquely identify the Book. However it is not necessary to include the Title in the superkey. A table may have multiple candidate keys A primary key is a candidate key chosen to be the main key for the relation If you know the value of the primary key, you will be able to uniquely identify a single row 3/4/2007 Sanjay Goel, School of Business, University at Albany 37
38 Databases Composite Keys A composite key is a key that contains two or more attributes For a key to be unique, often it must become a composite key To identify a family member, you need to know a FamilyID, a Firstame, and a Suffix (e.g., Jr.) The composite key is: (FamilyID, Firstame, Suffix) One needs to know the value of all three columns to uniquely identify an individual 3/4/2007 Sanjay Goel, School of Business, University at Albany 38
39 Databases Relationships A table may be related to other tables For example An Employee works in a Department A Manager controls a Project Relationships form associations between multiple entities e.g. Book is written by an author umber of entities in a relationship is called the degree of a relationship Binary relationship involves two entities Ternary relationship involves three entities Supplier Quotation Mother Father Child 3/4/2007 Sanjay Goel, School of Business, University at Albany 39
40 Databases Foreign Keys To preserve relationships, foreign keys are created A foreign key is a primary key from one table placed into another table The key is called a foreign key in the table that received the key 3/4/2007 Sanjay Goel, School of Business, University at Albany 40
41 Databases Binary Relationships There are three kinds of binary relationships One-to-one (:): A single entitiy instance of one type is related to a single entity instance of another type One-to-Many (:): A single entity instance of one type relates to many entity instances of another type Many-to-Many (:M): A single entity instance of one type relates to many entity instances of another type & vice versa Locker Publisher Author : : :M Employee Book Book 3/4/2007 Sanjay Goel, School of Business, University at Albany 4
42 Databases Binary Relationships One-to-one relationships are rare since they can be substituted by adding one or more extra attributes in one of the tables to model the attributes of the other. A strong justification is required for having such a relationship e.g. Passwords are kept in a separate table for reasons of security. e.g. If one of the fields contains a large data set it is maintained in a separate table for efficiency 3/4/2007 Sanjay Goel, School of Business, University at Albany 42
43 Databases Binary Relationships Cardinality specifies (maximum) number of instances of an entity that relate to one instance of another entity e.g. Basketball team and starting players have cardinality of 5 Ordinality describes the minimum number of instances of an entity that relate to one instance of another entity if the minimum number is zero the relationship is optional if the minimum number is greater than zero the relationship is mandatory 3/4/2007 Sanjay Goel, School of Business, University at Albany 43
44 Databases Weak Entities Weak entities are those that can not exist unless another entity also exists in the database Entity that is not weak is a strong entity Employee : Dependent The employee can exist without a dependent but not vice versa Building : Apartment In this case the appartment address is a composite of building number and appartment number, so apartment can t exist without building. (Such entities are also called id-dependent entities) The entity should not only depend physically but also logically to avoid ambiguities Advisor : Student Even though a business rule says that each student should have an advisor student is still a strong entity 3/4/2007 Sanjay Goel, School of Business, University at Albany 44
45 Databases Weak Entities By business rule order would have a sales person associated with it but this is not a logical necessicty this order is not a weak entity SalesPerson : Order Prescription can not logically exist without a patient thus it is a weak entity Patient : Prescription Thus a weak entity is the one with an ordinality (minimum cardinality) of and a logical dependence on another entity 3/4/2007 Sanjay Goel, School of Business, University at Albany 45
46 Databases Examples University Database Entities: Students, faculty, courses, offerings, enrollments Relationships: facutly teach offerings, students enroll in offernings, offereings made of courses Water Utility Database Entities: Customers, meters, bills, payments, meter readings Relationships: bills sent to customers, customers make payments, customers read meters Hospital Database Entities: Patients, providers, treatments, diagnoses, symptoms Relationships: patients have symptoms, providers prescribe treatments, providers make diagnoses 3/4/2007 Sanjay Goel, School of Business, University at Albany 46
47 E-R DIAGRAMS 3/4/2007 Sanjay Goel, School of Business, University at Albany 47
48 ER-Diagrams Definition They provide a way to pictorially depict the entities, attributes and relationships. These are also called semantic networks. There are three elements of the ER-Diagram Entities are represented by labeled rectangles. The label is the name of the entity. Attributes are represented by oval boxes and contain the name of the entity Relationships are represented by a diamond connected to the two entities using solid lines (cardinality of many is represented by an infinity sign, cardinality of is represented by a ) Weak entities are represented by a rectangle curved at the corners and the relationship triangle curved at the corners 3/4/2007 Sanjay Goel, School of Business, University at Albany 48
49 ER-Diagrams Book Database Among book authors there are people who are not primary authors but are contributors. e.g. illustrators, indexers etc. Each has a different level based on the contribution A separate entity can be used to represent contributors Attributes: Level and Type. Let us now define the relationships. A Book is written by authors A Book is published by a publisher A Contributor is an author Once this semantic model is created we need to create a relational database with this semantic model. 3/4/2007 Sanjay Goel, School of Business, University at Albany 49
50 E-R Diagrams Book Database Title Auame ISB Price AuID AuPhone Books M Written By Authors Published By Is A Publishers Contributor PubID PubPhone ConID ConLevel Pubame ConType 3/4/2007 Sanjay Goel, School of Business, University at Albany 50
51 E-R Diagrams Interior Designer An interior designers who specializes in home kitchen designs offers a variety of seminars at home shows, kitchen and appliance stores, and other public locations. The seminars are free; she offers them as a way of building her customer base. She earns revenue by selling books and videos and instructs people on kitchen design. She also offers custom-design consulting services. Her business is in selling products to the attendees at her seminars. She would like to develop a database to keep track of customers, the seminars that they have attended, and the purchases that they have made. Please determine the entities, attributes and relationships that should exist in the database and draw an E-R diagram. (Source: Database Concepts by Kroenke) 3/4/2007 Sanjay Goel, School of Business, University at Albany 5
52 E-R Diagrams Interior Designer Date Custame Location Title ConRate Time Seminar Consulting SeminarID M Attended By Requests ProdQty CustID Customer M Buys Product CustPhone CustAddr Cust ProdPrice ConID ConType ProdID ProdType ConHours Prodame 3/4/2007 Sanjay Goel, School of Business, University at Albany 52
53 E-R Diagrams Interior Designer Time SeminarID Date Location Seminar Attendance SeminarID CustID M Attended By Customer M Custame CustPhone CustID CustAddr Cust Title Requests Buys CustID ProdID Date Purchase Quantity ConRate Consulting ProdQty Product ConID ConType ProdID ProdType ConHours Prodame ProdType 3/4/2007 Sanjay Goel, School of Business, University at Albany 53
54 E-R Diagrams Supplier An organization purchases items from a number of suppliers. It keeps track of the items purchased from each supplier, and it also keeps a record of suppliers' addresses. Items are identified by ITEM-TYPE and have a DESCRIPTIO. There may be more than one such address for each supplier, and the price charged by each supplier for each item is stored. Suppliers are identified by SUPPLIER-ID. 3/4/2007 Sanjay Goel, School of Business, University at Albany 54
55 E-R Diagrams Supplier (Base) SupStreet Prodame SupCity SupPhone ProdID ProdDesc SupZip Address Items M ProdType Has SupID Supplier Supplies Supame SupPhone 3/4/2007 Sanjay Goel, School of Business, University at Albany 55
56 E-R Diagrams Supplier (Expanded) SupStreet SupCity SupPhone SupZip Address Has ProdType SupPhone SupID Supplier Supplies M Items Prodame ProdDesc Supame Purchase ProdID SupID ProdID Date Quantity 3/4/2007 Sanjay Goel, School of Business, University at Albany 56
57 E-R Diagrams Hospital A hospital stores data about patients, their admission and discharge from departments and their treatments, For each patient, we know the name, address, sex, social security number, and insurance code (if existing). For each department, we know the department's name, its location, the name of the doctor who heads it, the number of beds available, and the number of beds occupied. Each patient gets admitted at a given date and discharged at a given date. Each patient goes through multiple treatments during hospitalization; for each treatment, we store its name, duration, and the possible reactions to it that the patient may have. 3/4/2007 Sanjay Goel, School of Business, University at Albany 57
58 E-R Diagrams Hospital Date Time ssn Admission fname lname PatientSS DepartmentId id sex Patients M M M Admitted To Departments location name PatientSS TreatmentID Pat/Treatment Insurance name duration Get Occupy has A head id Treatments Occupancy Beds type Description id 3/4/2007 Sanjay Goel, School of Business, University at Albany 58
59 . Each E-R Diagrams Building building in an organization has a different BUILDIG-AME and a BUILDIG-ADDRESS. The meeting rooms in each building have their own ROOM-O in the building, and each room has a specified SEATIG-CAPACITY. Rooms are available for hire for meetings, and each hire period must start on the hour. The hour and LEGTH-OF-USE are recorded. Each hire is made by a group in the organization, and groups are identified by a GROUP-O and have a COTACT-PHOE. The equipment required for each hire period also are recorded. Each facility has an EQUIP-O and a DESCRIPTIO. 3/4/2007 Sanjay Goel, School of Business, University at Albany 59
60 E-R Diagrams Building umber Description Equipment Get Rental Equipmento Date starttime length MeetingId MeetingId number name M Meeting ContactPhone Groupumber RoomId id Group M M Rents Room Capacity id head Get has A id Building type 3/4/2007 Sanjay Goel, School of Business, University at Albany 60
61 . A E-R Diagrams Projects company has a number of employees. The attributes of EMPLOYEE include Employee_ID (identifier), ame, Address, and Birthdate. The company also has several projects. Attributes of PROJECT include Project_ID (identifier), Project_ame, and Start-date. An employee s billing rate may vary by project and the company wishes to record the applicable billing rate (Billing_Rate) for each employee when assigned to a particular project. 3/4/2007 Sanjay Goel, School of Business, University at Albany 6
62 E-R Diagrams Projects ProjectId EmployeeID BillingRate hours Assignment id StartDate EndDate name Address Employee M Rents Project id ame DateOfBirth StartDate 3/4/2007 Sanjay Goel, School of Business, University at Albany 62
63 . A E-R Diagrams Chemists laboratory has several chemists who work on one or more projects. Chemists also may use certain kinds of equipment on each project. Attributes of CHEMIST include Employee_ID (identifier), ame, and Phone_o. Attributes of PROJECT include Project_ID (identifier) and Start_Date. Attributes of EQUIPMET include Serial_o and Cost. The organization wishes to record Assign_Date, that is, the date when a given equipment item was assigned to a particular chemist working on a specified project. A chemist must be assigned to at least one project and one equipment item. A given equipment item need not be assigned, and a given project need not be assigned either a chemist or an equipment item. 3/4/2007 Sanjay Goel, School of Business, University at Albany 63
64 E-R Diagrams Chemists ProjectId EmployeeID StartDate EndDate Project/Chemist id name Address Phone Chemist M M Works on Project id ame StartDate Assigned to Equipment Serialo Cost 3/4/2007 Sanjay Goel, School of Business, University at Albany 64
65 E-R Diagrams Video Rental Store You were hired by Blockywood Video to design a database for their video rental system. Luckily, you have had some experience renting videos (every Saturday night!) and you know that the video store needs to be able to information about customers, movies, and distributors. A movie title (e.g. Lord Voldemort of the Rings) has an ID number generated by the store. In addition, there is a title, release date, rating (G, PG-3, etc.), and price category (a newly released movie tends to be more expensive). Other movie related information saved is the director, producer, principal actor, and principal actress. Jane Doe is a customer and to rent movies, she is the owner of a Blockywood Video card which is scanned every time she makes a purchase. To obtain a card the owner needs to be above 8 (checked during application). The account associated with the card has a specific ID number (generated by the store), as well as the owner name (Jane Doe), her address, phone number, credit card information (optional), and amount credited/debited to the account. Additionally, she has both her husband (John Doe) and her son Jimmy Doe listed as other authorized users on the account and a rating for Jimmy of PG-3, which means that the video rental store is not allowed to let him have access to a higher rating video. Her husband also owns a Blockywood Video card in which Jane and Jimmy are listed as authorized users. Distributors have organizational names, an address, representative, and phone number. Videos are purchased from distributors on a specific date for a specific price. There can be multiple videos with the same movie title. Videos are also given a unique id number. The video rental system allows for a video rental history, which maintains the video rented, rental date, card that it was rented with, return date, and amount paid. This information helps the recommendation of new videos and to maintain accounts. The video rental system should also be able to specify the maximum number of videos a customer can rent and the amount of time a movie can be late until the account is frozen. 3/4/2007 Sanjay Goel, School of Business, University at Albany 65
66 Price Date E-R Diagrams Credit/Debit Amount AccountId MovieId Video Rental Store CreditCardumber MaxMoviesAllowed Rental PrimaryMemberId AccountId FreezeLimit Account M Admitted By M VideoId Video Type Is of a Get Membership MemberId AccountId MovieId Director Title PriceCategory PrincipalActor Member Producer PrincipalActress name MemberId ReleaseDate Rating rating Assumptions:. Multiple distributors can sell same movie 2. Each member can be many accounts and the same account can have many members 3. Video rental store does not track the origin of a specific video from the distributor 4. Media type was added as additional attribute to the video (VHS or DVD) MovieId Type umber Price Invoice name Movie M Sold By Distributor MovieId phone Repame 3/4/2007 Sanjay Goel, School of Business, University at Albany 66 Address
67 E-R Diagrams Real Estate Firm Prepare an E-R diagram for a real estate firm that lists property for sale. Please indicate primary key and foreign keys as well as relationships. The following describes this organization: The firm has a number of sales offices in several states. Attributes of sales office include Office_umber (identifier) and Location. Each sales office is assigned one or more employees. Attributes of employee include Employee_ID (identifier) and Employee_ame. An employee must be assigned to only one sales office. For each sales office, there is always one employee assigned to manage that office. An employee may manage only the sales office to which he or she is assigned. The firm lists property for sale. Attributes of property include Property_ID (identifier) and Location. Each unit of property must be listed with one (and only one) of the sales offices. A sales office may have any number of properties listed, or may have no properties listed. Each unit of property has one or more owners. Attributes of owners are Owner_ID (identifier) and Owner_ame. An owner may own one or more units of property. An attribute of the relationship between property and owner is Percent_Owned. ote: Components of Location include Address, City, State, and Zip_Code & Components of the name include f_name and l_name 3/4/2007 Sanjay Goel, School of Business, University at Albany 67
68 E-R Diagrams Real Estate Firm Office_umber Zip_Code Address City State Employee_Id Assigned To 8 SalesOffice Lists Property_ID Employee_Lname 8 Employee 8 Property Office_umber 8 ManagerID Manages City Address Employee_Fname 8 State Office_umber Employee_Id Owner_Id Zip_Code Owner_Lname Owner 8 8 Owns Property_ID Percent_Owned Owner_Id Owner_Fname 3/4/2007 Sanjay Goel, School of Business, University at Albany 68
69 E-R Diagrams Concerts After completing a course in database management, you have been asked to develop an E-R diagram for a symphony orchestra. The symphony orchestra has the following characteristics A concert season schedules one or more concerts. A particular concert is scheduled for only one concert season. A concert includes the performance of one or more compositions. A composition may be performed at one or more concerts, or may not be performed. For each concert there is one conductor. A conductor may conduct any number of concerts, or may not conduct any concerts. Each composition may require one or more soloists, or may not require a soloist. A soloist may perform one or more compositions at a given concert, or may not perform any composition. The symphony orchestra wishes to record the date when a soloist last performed a given composition. Some other attributes of interest are the names and contact information of the soloist, composer and the location of the concert. The following entities are evident from the above discussion, i.e. ConcertSeason, Concert, Composition, Conductor, Soloist. Based on the above observations define what the appropriate relationships and attributes in the schema and construct an E-R diagram. 3/4/2007 Sanjay Goel, School of Business, University at Albany 69
70 E-R Diagrams Concerts ConcertSeason Schedules location time date time duration season concert/composition soloist/composition Concert Includes Composition Played By Soloist SoloId phone ComId lname Conducts Conductor lname fname fname phone SoloId 3/4/2007 Sanjay Goel, School of Business, University at Albany 70
71 E-R Diagrams Quick Oil Design the database and show an E-R Diagram for the case below. For many-to-many entities, show the additional tables that you would create. Quick Oil Company is in the business of changing engine oil for its customers. In addition to changing oil, the company also performs other services such as changing wipers, light bulbs etc. There are several technicians assigned to a car as it comes in for an oil change. They maintain the name, address, social security number, phone, and address of the customer. In addition, the services that the customers purchase at different times are tracked. For each service, they store the name of the service, the cost of the service, description of the service, and number of hours of labor for the service. They maintain employee information including name, phone, social security number, address, date-of-birth, date-of-hire, and their hourly salary in the database. They also sell parts and the name, manufacturer, cost, weight and number of items of each part is stored. A list of parts is maintained in the database and customers that bought each part are tracked. 3/4/2007 Sanjay Goel, School of Business, University at Albany 7
72 E-R Diagrams Quick Oil Count name Manufacturer Cost Parts M Weight Partame Date EmployeeSS Buys Part/Customers SS labor name CustomerSS name Description Service M Work Customer Cost street city SS state ame Employee zip name phone SS phone street city state DateOfBirth zip DateOfHire Salary 3/4/2007 Sanjay Goel, School of Business, University at Albany 72
73 E-R Diagrams Student Interviews The School of Business would like to help its MBA students with placement in various companies and firms. To facilitate this, they need to design a database with the primary purpose of scheduling interviews and facilitating searches by students and companies that are looking for candidates. The database should have information about students, job openings, companies, interviewers, interviews, and conference rooms for interviews. Students have a lot of information that needs to be processed. This includes a first name, last name, student id number, social security number, concentration, and expected graduation date. Companies post job openings that students can apply for. The job posting date is recorded as well as the deadline of the posting. Also included is the title of the position, base salary, minimum requirements, and description. Students apply for open positions in companies and the date and time of each application is recorded. Students should also be able to see the status of their application (whether there will be a follow-up interview and whether they were turned down for the position). Interviews can be facilitated by the University or because of job openings and need to have a date, time, and conference room location. Multiple students can be interviewed at the same time and multiple interviewers can participate in a student interview. Companies send employees who interview students. An employee has an employee id, room #, telephone #, fax #, and position title. The company keeps track of which employees interviewed which students as well as the result of the interview (if it resulted in a job offer and/or hiring). A company has an identifier, name, main contact #, and main fax number. A company from the Business School reserves conference rooms and the company needs to specify the resources needed (e.g. computer, projector, etc.). There are multiple conference rooms and multiple instances of the same resource (e.g. there may be three projectors). The School should be able to track which company hired which students as well as how many students came from which concentration. In addition, such statistics as the average salary for the jobs per year should be available. Students should also be able to track their job offers. 3/4/2007 Sanjay Goel, School of Business, University at Albany 73
74 E-R Diagrams Student Interviews Capacity Conference Room CR_Location Street Interviewer_Id Held In CR_Id State Interviewer_Lname Interviewer_Fname Interviewer_Id Interview_Id Posting_Id Interview_Date Zip_Code Interviewer 8 8 Assigned To Interview Interview_Id CR_Id City 8 Interview_Time State Address Works For Interviewer_Id Company_Id Conducted For Student_Id Interview_Duration std_lname std_fname Zip_Code City Address 8 Company ame Posts Job_Description Job_Posting Salary_Range Student Posting_ID Posting_Title Street Student_Id State 3/4/2007 Sanjay Goel, School of Business, University at AlbanyApply_Date 74 Company_Id Phone 8 Posting_Date 8 Posting_Time 8 Posts For Posting_Id 8 std_id Apply_Time 8 City Street Zip_Code Phone Major
75 E-R Diagrams Handy Man With a busy work life, home owners have difficulty in finding help for chores around the house and garden. Different jobs require different skills, such as, carpentry, plumbing, electrical wiring, etc. Several people have these skills and spare time to work on projects but are unable to find places for part time employment. This business entails connecting people who have jobs with workers willing to work on those jobs in their spare time. The workers should be able to list their contact information and skills. The employers should be able to list the jobs and the skills required for each job. The business model of the company is to get an enrollment fee for joining the network for both the home owners and the workers. Please design a database and create an E-R Diagram for the database 3/4/2007 Sanjay Goel, School of Business, University at Albany 75
76 E-R Diagrams Handy Man Job/Skill Skill Worker/Skill WorkerID fname workerid Grade lname memberid Job semester Accepts Worker street city zip memberid firstname lastname Homephone Provides Home Owner Gets JobID Acceptance WorkerID Salary Takes phone gender workphone 3/4/2007 Sanjay Goel, School of Business, University at Albany 76
77 E-R Diagrams Course Offerings There are several courses on the books at a university which are offered from time to time. Students enroll for these courses. We assume there are no pre-requisites for the courses. Please create an E-R Diagram for the database. Assume reasonable attributes for the different entities and also write any assumptions that you make. 3/4/2007 Sanjay Goel, School of Business, University at Albany 77
78 E-R Diagrams Course Offerings semester Section CourseId Grade StudentId semester Enrollment CourseID studentid section firstname lastname DateOfBirth Student M Take Offering semester year time Results in daysofweek room Course CourseID CreditHours description 3/4/2007 Sanjay Goel, School of Business, University at Albany 78
79 E-R Diagrams Conference Center Bookings Instructions: Draw an entity relationship diagram for the case, stating any assumptions you deem necessary. Case: A conference centre takes bookings from clients who wish to hold courses or conferences at the centre. When clients make bookings they specify how many people are included in the booking, and of these, how many will be resident during the booking, and how many will require catered or non-catered accommodation at the centre. The centre contains a number of facilities which may be required by clients making bookings as follows: A. There are 400 bedrooms for clients who will be resident during the Course or conference. B. A maximum of 250 catered people can be handled at any one time. C. Six main lecture theatres providing seating for 200 people. D. Twenty seminar rooms each able to accommodate 25 people. E. Video conference facilities. The video conference facilities consist of four separate video conference networks. Each video conference network has a large screen based in one of the main lecture theatres, along with 3 satellite screens each of which is based in one of the seminar rooms. 3/4/2007 Sanjay Goel, School of Business, University at Albany 79
80 E-R Diagrams Conference Center Bookings The London and Ireland Shipping Company PLC (LISC) was founded in 852 and owns a fleet of cargo ships. The company had historically run passenger liners, but recent policy decisions involved the sale of all passengercarrying vessels. The company currently has 4 vessels, including one oil tanker and one tugboat operating out of Liverpool. Most of the vessels are registered in Liberia for tax reasons. Each ship has one or more holds divided into spaces. The holds are defined by steel bulkheads and the spaces are defined by shelf racks or other physical dividers. Sister ships, built by the same shipbuilders and to the same designs have similar names, such as Pride of Ireland, Queen of Ireland, Song of Ireland and Warrior of Ireland. Sister ships also have identical cargo storage facilities. LISC issues contracts to agents for one or more manifests (lists of cargo items to be shipped). LISC's charges for cargo carried are based on the number of spaces the cargo requires for storage. The types of cargo typically carried by LISC include grain, coal and ores (carried only in ships equipped with bulk cargo holds). They also transport sacked grain, heavy cases, containers (which may be carried on deck), pallets and so on. Cargo items may take up less than one space in a hold, or one or more spaces, depending on the size of the item. A space may therefore contain several small cargo items. The ships owned by LISC are kept as busy and as full as possible, in order to maximise the profits that each vessel makes and minimise running & operating costs. LISC's ships ply most of the seas of the world, but tend to operate mainly in the Mediterranean, the orth and Mid Atlantic and the Indian Ocean. Different ships require different crew complements. LISC intends to create a computer based information system that will be able to perform the following tasks: Record the voyages of each ship with the start and end ports. Record the cargo held by a ship on each voyage Keep records of their employees and the ships they are assigned to Producing invoices for agents and customers Keep a record of customers' payments on invoices Analyse the efficiency of use of cargo space and of percentage wasted cargo space for ships voyages 3/4/2007 Sanjay Goel, School of Business, University at Albany 80
81 Databases Translating ERD to Database Each entity becomes a new table Each attribute becomes a column of the table Relationships One to many relationship: Add the key from the many side of the relationship to the one side of the relationship e.g. add the publisher id to the book entity The pubid is called a foreign key because this is a key to a foreign entity One to one relationship: Add the primary key of one entity to the other entity Many to many relationship: We can not add the foreign key of each to the other considering these as two one to many relationships. This leads to duplicated rows. To implement a many-to-many relationship add an artificial entity to break the many-to-many relationship into two one-to-many relationships. 3/4/2007 Sanjay Goel, School of Business, University at Albany 8
82 Databases Integrity Referential Integrity: Each value of foreign key must have a matching value in the referenced key. Otherwise we will have a dangling reference e.g. If there was no publisher matching PubID then we have a problem. Violations can occur in two ways We add a new entry in the books table with no corresponding publisher in the publisher table We delete an entry in the referenced table without deleting the corresponding entry in the referencing table Two ways to ensure Integrity Cascading updates: If a referenced key is changed then all matching entries in the foreign key are automatically updated Cascading deletions: If a value of the referenced table is deleted by deleting a row then all rows in the referencing table that refer to the deleted key value will also be deleted. 3/4/2007 Sanjay Goel, School of Business, University at Albany 82
83 Databases Summary Modeling Databases Abstract representation of the database (i.e., Entities, Attributes & Relationships) Super Keys, Keys and Primary Keys E-R diagrams (Semantic etwork) 3/4/2007 Sanjay Goel, School of Business, University at Albany 83
Designing Databases. Introduction
Designing Databases C Introduction Businesses rely on databases for accurate, up-to-date information. Without access to mission critical data, most businesses are unable to perform their normal daily functions,
Foundations of Information Management
Foundations of Information Management - WS 2012/13 - Juniorprofessor Alexander Markowetz Bonn Aachen International Center for Information Technology (B-IT) Data & Databases Data: Simple information Database:
www.dotnetsparkles.wordpress.com
Database Design Considerations Designing a database requires an understanding of both the business functions you want to model and the database concepts and features used to represent those business functions.
Relational Database Basics Review
Relational Database Basics Review IT 4153 Advanced Database J.G. Zheng Spring 2012 Overview Database approach Database system Relational model Database development 2 File Processing Approaches Based on
COMP 378 Database Systems Notes for Chapter 7 of Database System Concepts Database Design and the Entity-Relationship Model
COMP 378 Database Systems Notes for Chapter 7 of Database System Concepts Database Design and the Entity-Relationship Model The entity-relationship (E-R) model is a a data model in which information stored
Lesson 8: Introduction to Databases E-R Data Modeling
Lesson 8: Introduction to Databases E-R Data Modeling Contents Introduction to Databases Abstraction, Schemas, and Views Data Models Database Management System (DBMS) Components Entity Relationship Data
Entity-Relationship Model
UNIT -2 Entity-Relationship Model Introduction to ER Model ER model is represents real world situations using concepts, which are commonly used by people. It allows defining a representation of the real
An Example: Video Rental System
An Example: Video Rental System Video Rental Database Customers Rentals Videos E-R Analysis ERD Example CUSTOMER PRODUCER E-R Analysis Attributes Attribute - property or characteristic of an entity type
The Entity-Relationship Model
The Entity-Relationship Model 221 After completing this chapter, you should be able to explain the three phases of database design, Why are multiple phases useful? evaluate the significance of the Entity-Relationship
Bridge from Entity Relationship modeling to creating SQL databases, tables, & relations
1 Topics for this week: 1. Good Design 2. Functional Dependencies 3. Normalization Readings for this week: 1. E&N, Ch. 10.1-10.6; 12.2 2. Quickstart, Ch. 3 3. Complete the tutorial at http://sqlcourse2.com/
Data Modeling: Part 1. Entity Relationship (ER) Model
Data Modeling: Part 1 Entity Relationship (ER) Model MBA 8473 1 Cognitive Objectives (Module 2) 32. Explain the three-step process of data-driven information system (IS) development 33. Examine the purpose
2. Conceptual Modeling using the Entity-Relationship Model
ECS-165A WQ 11 15 Contents 2. Conceptual Modeling using the Entity-Relationship Model Basic concepts: entities and entity types, attributes and keys, relationships and relationship types Entity-Relationship
Conceptual Design: Entity Relationship Models. Objectives. Overview
Conceptual Design: Entity Relationship Models Craig Van Slyke, University of Central Florida [email protected] John Day, Ohio University Objectives Define terms related to entity relationship modeling,
Lecture 6. SQL, Logical DB Design
Lecture 6 SQL, Logical DB Design Relational Query Languages A major strength of the relational model: supports simple, powerful querying of data. Queries can be written intuitively, and the DBMS is responsible
Exercise 1: Relational Model
Exercise 1: Relational Model 1. Consider the relational database of next relational schema with 3 relations. What are the best possible primary keys in each relation? employ(person_name, street, city)
Foundations of Information Management
Foundations of Information Management - WS 2009/10 Juniorprofessor Alexander Markowetz Bonn Aachen International Center for Information Technology (B-IT) Alexander Markowetz Born 1976 in Brussels, Belgium
Database Design. Marta Jakubowska-Sobczak IT/ADC based on slides prepared by Paula Figueiredo, IT/DB
Marta Jakubowska-Sobczak IT/ADC based on slides prepared by Paula Figueiredo, IT/DB Outline Database concepts Conceptual Design Logical Design Communicating with the RDBMS 2 Some concepts Database: an
Data Modelling And Normalisation
Access made easy. Data Modelling And Normalisation 02 www.accessallinone.com This guide was prepared for AccessAllInOne.com by: Robert Austin This is one of a series of guides pertaining to the use of
ComponentNo. C_Description UnitOfMeasure. C_Quantity
MIS 322: ERD Exercises Student Name: 1. Assume that at Pine Valley Furniture each product (described by Product No., Description, and Cost) is comprised of at least three components (described by Component
Data Analysis 1. SET08104 Database Systems. Copyright @ Napier University
Data Analysis 1 SET08104 Database Systems Copyright @ Napier University Entity Relationship Modelling Overview Database Analysis Life Cycle Components of an Entity Relationship Diagram What is a relationship?
EXTENDED LEARNING MODULE A
EXTENDED LEARNING MODULE A DESIGNING DATABASES AND ENTITY- RELATIONSHIP DIAGRAMMING Student Learning Outcomes 1. Identify how databases and spreadsheets are both similar and different. 2. List and describe
Database Management Systems
Database Management Systems Database Design (1) 1 Topics Information Systems Life Cycle Data Base Design Logical Design Physical Design Entity Relationship (ER) Model Entity Relationship Attributes Cardinality
The Relational Model. Ramakrishnan&Gehrke, Chapter 3 CS4320 1
The Relational Model Ramakrishnan&Gehrke, Chapter 3 CS4320 1 Why Study the Relational Model? Most widely used model. Vendors: IBM, Informix, Microsoft, Oracle, Sybase, etc. Legacy systems in older models
Unit 2.1. Data Analysis 1 - V2.0 1. Data Analysis 1. Dr Gordon Russell, Copyright @ Napier University
Data Analysis 1 Unit 2.1 Data Analysis 1 - V2.0 1 Entity Relationship Modelling Overview Database Analysis Life Cycle Components of an Entity Relationship Diagram What is a relationship? Entities, attributes,
DATABASE INTRODUCTION
Introduction The history of database system research is one of exceptional productivity and startling economic impact. We have learnt that from the days of file-based systems there are better ways to handle
Chapter 2: Entity-Relationship Model. Entity Sets. " Example: specific person, company, event, plant
Chapter 2: Entity-Relationship Model! Entity Sets! Relationship Sets! Design Issues! Mapping Constraints! Keys! E-R Diagram! Extended E-R Features! Design of an E-R Database Schema! Reduction of an E-R
Database Management. Technology Briefing. Modern organizations are said to be drowning in data but starving for information p.
Technology Briefing Database Management Modern organizations are said to be drowning in data but starving for information p. 509 TB3-1 Learning Objectives TB3-2 Learning Objectives TB3-3 Database Management
Database Design Process
Database Design Process Entity-Relationship Model From Chapter 5, Kroenke book Requirements analysis Conceptual design data model Logical design Schema refinement: Normalization Physical tuning Problem:
ISM 318: Database Systems. Objectives. Database. Dr. Hamid R. Nemati
ISM 318: Database Systems Dr. Hamid R. Nemati Department of Information Systems Operations Management Bryan School of Business Economics Objectives Underst the basics of data databases Underst characteristics
Database Design. Adrienne Watt. Port Moody
Database Design Database Design Adrienne Watt Port Moody Except for third party materials and otherwise stated, content on this site is made available under a Creative Commons Attribution 2.5 Canada License.
Tutorial on Relational Database Design
Tutorial on Relational Database Design Introduction Relational database was proposed by Edgar Codd (of IBM Research) around 1969. It has since become the dominant database model for commercial applications
Introduction to Computing. Lectured by: Dr. Pham Tran Vu [email protected]
Introduction to Computing Lectured by: Dr. Pham Tran Vu [email protected] Databases The Hierarchy of Data Keys and Attributes The Traditional Approach To Data Management Database A collection of
CHAPTER 6 DATABASE MANAGEMENT SYSTEMS. Learning Objectives
CHAPTER 6 DATABASE MANAGEMENT SYSTEMS Management Information Systems, 10 th edition, By Raymond McLeod, Jr. and George P. Schell 2007, Prentice Hall, Inc. 1 Learning Objectives Understand the hierarchy
Outline. Data Modeling. Conceptual Design. ER Model Basics: Entities. ER Model Basics: Relationships. Ternary Relationships. Yanlei Diao UMass Amherst
Outline Data Modeling Yanlei Diao UMass Amherst v Conceptual Design: ER Model v Relational Model v Logical Design: from ER to Relational Slides Courtesy of R. Ramakrishnan and J. Gehrke 1 2 Conceptual
A brief overview of developing a conceptual data model as the first step in creating a relational database.
Data Modeling Windows Enterprise Support Database Services provides the following documentation about relational database design, the relational database model, and relational database software. Introduction
Introduction to normalization. Introduction to normalization
Introduction to normalization Lecture 4 Instructor Anna Sidorova Agenda Presentation Review of relational models, in class exersise Introduction to normalization In-class exercises Discussion of HW2 1
æ A collection of interrelated and persistent data èusually referred to as the database èdbèè.
CMPT-354-Han-95.3 Lecture Notes September 10, 1995 Chapter 1 Introduction 1.0 Database Management Systems 1. A database management system èdbmsè, or simply a database system èdbsè, consists of æ A collection
Consider the possible problems with storing the following data in a spreadsheet:
Microsoft Access 2010 Part 1: Introduction to Database Design What is a database? Identifying entities and attributes Understanding relationships and keys Developing tables and other objects Planning a
Overview. Physical Database Design. Modern Database Management McFadden/Hoffer Chapter 7. Database Management Systems Ramakrishnan Chapter 16
HNC Computing - s HNC Computing - s Physical Overview Process What techniques are available for physical design? Physical Explain one physical design technique. Modern Management McFadden/Hoffer Chapter
Databases Model the Real World. The Entity- Relationship Model. Conceptual Design. Steps in Database Design. ER Model Basics. ER Model Basics (Contd.
The Entity- Relationship Model R &G - Chapter 2 A relationship, I think, is like a shark, you know? It has to constantly move forward or it dies. And I think what we got on our hands is a dead shark. Woody
14 Databases. Source: Foundations of Computer Science Cengage Learning. Objectives After studying this chapter, the student should be able to:
14 Databases 14.1 Source: Foundations of Computer Science Cengage Learning Objectives After studying this chapter, the student should be able to: Define a database and a database management system (DBMS)
CIS 631 Database Management Systems Sample Final Exam
CIS 631 Database Management Systems Sample Final Exam 1. (25 points) Match the items from the left column with those in the right and place the letters in the empty slots. k 1. Single-level index files
Database Design Process
Entity-Relationship Model Chapter 3, Part 1 Database Design Process Requirements analysis Conceptual design data model Logical design Schema refinement: Normalization Physical tuning 1 Problem: University
Once the schema has been designed, it can be implemented in the RDBMS.
2. Creating a database Designing the database schema... 1 Representing Classes, Attributes and Objects... 2 Data types... 5 Additional constraints... 6 Choosing the right fields... 7 Implementing a table
Conceptual Design Using the Entity-Relationship (ER) Model
Conceptual Design Using the Entity-Relationship (ER) Model Module 5, Lectures 1 and 2 Database Management Systems, R. Ramakrishnan 1 Overview of Database Design Conceptual design: (ER Model is used at
not necessarily strictly sequential feedback loops exist, i.e. may need to revisit earlier stages during a later stage
Database Design Process there are six stages in the design of a database: 1. requirement analysis 2. conceptual database design 3. choice of the DBMS 4. data model mapping 5. physical design 6. implementation
Chapter 2: Entity-Relationship Model. E-R R Diagrams
Chapter 2: Entity-Relationship Model What s the use of the E-R model? Entity Sets Relationship Sets Design Issues Mapping Constraints Keys E-R Diagram Extended E-R Features Design of an E-R Database Schema
The Relational Model. Why Study the Relational Model? Relational Database: Definitions
The Relational Model Database Management Systems, R. Ramakrishnan and J. Gehrke 1 Why Study the Relational Model? Most widely used model. Vendors: IBM, Microsoft, Oracle, Sybase, etc. Legacy systems in
Steven Roman Publisher: O Reilly Third Edition January 2002 ISBN: 0-596-00273-4, 448 pages
Access Database Design & Programming, 3rd Edition Steven Roman Publisher: O Reilly Third Edition January 2002 ISBN: 0-596-00273-4, 448 pages When using GUI-based software, we often focus so much on the
Entity/Relationship Modelling. Database Systems Lecture 4 Natasha Alechina
Entity/Relationship Modelling Database Systems Lecture 4 Natasha Alechina In This Lecture Entity/Relationship models Entities and Attributes Relationships Attributes E/R Diagrams For more information Connolly
Database Design Basics
Database Design Basics Table of Contents SOME DATABASE TERMS TO KNOW... 1 WHAT IS GOOD DATABASE DESIGN?... 2 THE DESIGN PROCESS... 2 DETERMINING THE PURPOSE OF YOUR DATABASE... 3 FINDING AND ORGANIZING
Access Database Design
Technical Support Services Office of Information Technology, West Virginia University OIT Help Desk (304) 293-4444 http://oit.wvu.edu/training/classmat/db/ Last revised: June 26, 2008 Copyright 2008 West
Modern Systems Analysis and Design
Modern Systems Analysis and Design Prof. David Gadish Structuring System Data Requirements Learning Objectives Concisely define each of the following key data modeling terms: entity type, attribute, multivalued
TIM 50 - Business Information Systems
TIM 50 - Business Information Systems Lecture 15 UC Santa Cruz March 1, 2015 The Database Approach to Data Management Database: Collection of related files containing records on people, places, or things.
The Relational Model. Why Study the Relational Model? Relational Database: Definitions. Chapter 3
The Relational Model Chapter 3 Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Why Study the Relational Model? Most widely used model. Vendors: IBM, Informix, Microsoft, Oracle, Sybase,
1. INTRODUCTION TO RDBMS
Oracle For Beginners Page: 1 1. INTRODUCTION TO RDBMS What is DBMS? Data Models Relational database management system (RDBMS) Relational Algebra Structured query language (SQL) What Is DBMS? Data is one
Data Modelling and E-R Diagrams
Data Modelling and E-R Diagrams So far we have considered some of the basic ideas behind relational theory, and we will continue with this in subsequent sections. In this section we look at the processes
Welcome to the Data Analytics Toolkit PowerPoint presentation on EHR architecture and meaningful use.
Welcome to the Data Analytics Toolkit PowerPoint presentation on EHR architecture and meaningful use. When data is collected and entered into the electronic health record, the data is ultimately stored
DATABASE MANAGEMENT SYSTEM
REVIEW ARTICLE DATABASE MANAGEMENT SYSTEM Sweta Singh Assistant Professor, Faculty of Management Studies, BHU, Varanasi, India E-mail: [email protected] ABSTRACT Today, more than at any previous
Foundations of Business Intelligence: Databases and Information Management
Chapter 5 Foundations of Business Intelligence: Databases and Information Management 5.1 Copyright 2011 Pearson Education, Inc. Student Learning Objectives How does a relational database organize data,
Data Modeling Basics
Information Technology Standard Commonwealth of Pennsylvania Governor's Office of Administration/Office for Information Technology STD Number: STD-INF003B STD Title: Data Modeling Basics Issued by: Deputy
Database Design Overview. Conceptual Design ER Model. Entities and Entity Sets. Entity Set Representation. Keys
Database Design Overview Conceptual Design. The Entity-Relationship (ER) Model CS430/630 Lecture 12 Conceptual design The Entity-Relationship (ER) Model, UML High-level, close to human thinking Semantic
1 Class Diagrams and Entity Relationship Diagrams (ERD)
1 Class Diagrams and Entity Relationship Diagrams (ERD) Class diagrams and ERDs both model the structure of a system. Class diagrams represent the dynamic aspects of a system: both the structural and behavioural
AS LEVEL Computer Application Databases
AS LEVEL Computer Application Databases YLLSS In the syllabus, we have Applications of databases in society Students should be aware of the uses and applications of databases in everyday life (e.g. the
Databases for beginners. 02-DBBA Marek Kręglewski
Databases for beginners 02-DBBA Marek Kręglewski 1 About the course Steven Roman, Access Database Design & Programming (3rd Edition), O Reilly 2002 Curtis D. Frye, Microsoft Office Access 2007 Plain &
IV. The (Extended) Entity-Relationship Model
IV. The (Extended) Entity-Relationship Model The Extended Entity-Relationship (EER) Model Entities, Relationships and Attributes Cardinalities, Identifiers and Generalization Documentation of EER Diagrams
Relational Database Concepts
Relational Database Concepts IBM Information Management Cloud Computing Center of Competence IBM Canada Labs 1 2011 IBM Corporation Agenda Overview Information and Data Models The relational model Entity-Relationship
Concepts of Database Management Seventh Edition. Chapter 6 Database Design 2: Design Method
Concepts of Database Management Seventh Edition Chapter 6 Database Design 2: Design Method Objectives Discuss the general process and goals of database design Define user views and explain their function
Physical Design. Meeting the needs of the users is the gold standard against which we measure our success in creating a database.
Physical Design Physical Database Design (Defined): Process of producing a description of the implementation of the database on secondary storage; it describes the base relations, file organizations, and
Designing a Database Schema
Week 10: Database Design Database Design From an ER Schema to a Relational One Restructuring an ER schema Performance Analysis Analysis of Redundancies, Removing Generalizations Translation into a Relational
Simple Invoicing Desktop Database with MS Access 2013. c 2015 by David W. Gerbing School of Business Administration Portland State University
Simple Invoicing Desktop Database with MS Access 2013 c 2015 by David W. Gerbing School of Business Administration Portland State University July 2, 2015 CONTENTS 1 Contents 1 Create a New Database 1 2
Access Tutorial 2 Building a Database and Defining Table Relationships
Access Tutorial 2 Building a Database and Defining Table Relationships Microsoft Office 2013 Objectives Session 2.1 Learn the guidelines for designing databases and setting field properties Create a table
Ken Goldberg Database Lab Notes. There are three types of relationships: One-to-One (1:1) One-to-Many (1:N) Many-to-Many (M:N).
Lab 3 Relationships in ER Diagram and Relationships in MS Access MS Access Lab 3 Summary Introduction to Relationships Why Define Relationships? Relationships in ER Diagram vs. Relationships in MS Access
Introduction to Databases
Introduction to Databases IT University of Copenhagen January 7, 2005 This exam consists of 6 problems with a total of 16 questions. The weight of each problem is stated. You have 4 hours to answer all
5.5 Copyright 2011 Pearson Education, Inc. publishing as Prentice Hall. Figure 5-2
Class Announcements TIM 50 - Business Information Systems Lecture 15 Database Assignment 2 posted Due Tuesday 5/26 UC Santa Cruz May 19, 2015 Database: Collection of related files containing records on
Unit 5.1 The Database Concept
Unit 5.1 The Database Concept Candidates should be able to: What is a Database? A database is a persistent, organised store of related data. Persistent Data and structures are maintained when data handling
The Relational Model. Why Study the Relational Model?
The Relational Model Chapter 3 Instructor: Vladimir Zadorozhny [email protected] Information Science Program School of Information Sciences, University of Pittsburgh 1 Why Study the Relational Model?
Creating and Using Databases with Microsoft Access
CHAPTER A Creating and Using Databases with Microsoft Access In this chapter, you will Use Access to explore a simple database Design and create a new database Create and use forms Create and use queries
Chapter 2: Entity-Relationship Model
Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping Constraints Keys E R Diagram Extended E-R Features Design of an E-R Database Schema Reduction of an E-R Schema to
VBA and Databases (see Chapter 14 )
VBA and Databases (see Chapter 14 ) Kipp Martin February 29, 2012 Lecture Files Files for this module: retailersql.m retailer.accdb Outline 3 Motivation Modern Database Systems SQL Bringing Data Into MATLAB/Excel
We know how to query a database using SQL. A set of tables and their schemas are given Data are properly loaded
E-R Diagram Database Development We know how to query a database using SQL A set of tables and their schemas are given Data are properly loaded But, how can we develop appropriate tables and their schema
Lecture Notes INFORMATION RESOURCES
Vilnius Gediminas Technical University Jelena Mamčenko Lecture Notes on INFORMATION RESOURCES Part I Introduction to Dta Modeling and MSAccess Code FMITB02004 Course title Information Resourses Course
SQL Server Table Design - Best Practices
CwJ Consulting Ltd SQL Server Table Design - Best Practices Author: Andy Hogg Date: 20 th February 2015 Version: 1.11 SQL Server Table Design Best Practices 1 Contents 1. Introduction... 3 What is a table?...
EECS 647: Introduction to Database Systems
EECS 647: Introduction to Database Systems Instructor: Luke Huan Spring 2013 Administrative Take home background survey is due this coming Friday The grader of this course is Ms. Xiaoli Li and her email
Requirement Analysis & Conceptual Database Design. Problem analysis Entity Relationship notation Integrity constraints Generalization
Requirement Analysis & Conceptual Database Design Problem analysis Entity Relationship notation Integrity constraints Generalization Introduction: Lifecycle Requirement analysis -> Text Conceptual Design
7. Databases and Database Management Systems
7. Databases and Database Management Systems 7.1 What is a File? A file is a collection of data or information that has a name, called the Filename. There are many different types of files: Data files
There are five fields or columns, with names and types as shown above.
3 THE RELATIONAL MODEL Exercise 3.1 Define the following terms: relation schema, relational database schema, domain, attribute, attribute domain, relation instance, relation cardinality, andrelation degree.
Databases and BigData
Eduardo Cunha de Almeida [email protected] Outline of the course Introduction Database Systems (E. Almeida) Distributed Hash Tables and P2P (C. Cassagnes) NewSQL (D. Kim and J. Meira) NoSQL (D. Kim)
Introduction. Chapter 1. Introducing the Database. Data vs. Information
Chapter 1 Objectives: to learn The difference between data and information What a database is, the various types of databases, and why they are valuable assets for decision making The importance of database
- Suresh Khanal. http://mcqsets.com. http://www.psexam.com Microsoft Excel Short Questions and Answers 1
- Suresh Khanal http://mcqsets.com http://www.psexam.com Microsoft Excel Short Questions and Answers 1 Microsoft Access Short Questions and Answers with Illustrations Part I Suresh Khanal Kalanki, Kathmandu
Data Modeling. Database Systems: The Complete Book Ch. 4.1-4.5, 7.1-7.4
Data Modeling Database Systems: The Complete Book Ch. 4.1-4.5, 7.1-7.4 Data Modeling Schema: The structure of the data Structured Data: Relational, XML-DTD, etc Unstructured Data: CSV, JSON But where does
Topic: Relationships in ER Diagram and Relationships in MS Access
MS Access Lab 3 Topic: Relationships in ER Diagram and Relationships in MS Access Summary Introduction to Relationships Why Define Relationships? Relationships in ER Diagram vs. Relationships in MS Access
Doing database design with MySQL
Doing database design with MySQL Jerzy Letkowski Western New England University ABSTRACT Most of the database textbooks, targeting database design and implementation for information systems curricula support
Excel 2003, MS Access 2003, FileMaker Pro 8. Which One Should I Use?
Excel, MS Access, Pro 8 Which One Should I Use? This document is intended to show a comparison of Excel, Access, and along with general guidelines to help you decide when to use one versus the other. Excel
XV. The Entity-Relationship Model
XV. The Entity-Relationship Model The Entity-Relationship Model Entities, Relationships and Attributes Cardinalities, Identifiers and Generalization Documentation of E-R Diagrams and Business Rules The
Hotel Management System
A Seminar report On Hotel Management System Submitted in partial fulfillment of the requirement for the award of degree Of MBA SUBMITTED TO: SUBMITTED BY: Preface I have made this report file on the topic
Foundations of Business Intelligence: Databases and Information Management
Foundations of Business Intelligence: Databases and Information Management Problem: HP s numerous systems unable to deliver the information needed for a complete picture of business operations, lack of
Data Modeling with Entity-Relationship Diagrams
Riccardi04 6/28/02 0:20 P Page 6 CHAPTER4 Data odeling with Entity-Relationship Diagrams In this chapter, you will learn: What entity-relationship data modeling is How to read and draw entity-relationship
