problems: lack of data integration, lack of program-data independence Definitions External schema - different user views or subschemas which describe portions of the database of interest o Views - information of interest to a particular user group (e.g. a view of the myUH db shows class name, dates, teacher and rm #) Internal schema - describes the physical structure of the stored data (technology dependent) Data independence - means the view and the physical data are not dependent o Physical data indep - e.g. the DBA can move info to different tables without the user ever noticing a difference o Logical data indep - e.g. one user view doesnt affect another user view DBMS - database mgmt system, software that facilitates the manipulation of a database Database system - self-describing collection of interrelated data; includes data and metadata Distributed database (DDB) - multiple logically interrelated databases that may be geographically dispersed Distributed database mgmt system (DDBMS) - used to manage DDBs (user is not aware of data's geo location) Data warehouse - repository for data so it can be used by decision makers Data definition language (DDL) - Used for creating db structures like tables and views; typically SQL Data control languages (DCL) - handle administrative tasks like backups and security, typically SQL Data manipulation languages (DML) - facilitate modification of actual data; typically SQL Data dictionary - stores information about data (metadata) such as relationships, authorizations and usage Data repository - metadata about data models and application program interfaces Data model - used to represent real world phenomena, the blueprint for db design Universe of interest - myUH has info about students, classes, teachers, financial aid, etc. 'Types of insects' is probably outside myUH's universe of interest Requirements specification - interview users and review business documents to understand rules and objectives Business rules - organized set of restrictions describing the organization's activities Semantic modeling - the first step in db design, rules set forth by the business Conceptual modeling - the second step in db design, refers only to data specs, not business processes Data types - numeric, alphabetic, alphanumeric Derived attribute - e.g. instead of storing birthday, it is calculated by subtracting DOB from today's date Integrity constraints - rules that govern the behavior of data at all times in a db o Domain constraint - ensures the value is valid, e.g. 'StudentID' can only store numbers, not letters o Uniqueness/key constraint - requires instances of an entity to be unique when compared to other instances Key attribute - one or more attributes that make an instance unique
NOTE: These diagrams do not have primary key underlined because its too difficult to do in DiaPortable Presentation Layer ER Diagram
Fine Granular ERD 1. Follow all the steps in the previous diagram. e.g. (min:max), deletion constraints, etc. 2. Add domain constraints. e.g. [X,9] for 9 alphanumeric characters 3. Separate M:N relationships using a weak entity in the middle. 4. Break multi-valued attributes into weak entities.
Above is a Coarse Granular ERD. Below is what results after you convert it to a Fine Granular ERD
1. List all entities inside a square, use a noun 2. Write the relationship between the entities, use a verb
b) Write a 1, n, or m to indicate the maximum (cardinality) 3. List all attributes for each entity, underline the unique attribute(s), use a double circle for multi-valued attributes, use an open circle for optional attributes. Use a dotted underline for the partial key in a weak attribute 4. Write any remaining Semantic Integrity Constrains which are the remaining biz rules that cant be described by a simple Presentation Layer ERD Coarse Granular ERD 1. Follow all the steps from the previous diagram but make the modifications listed in the next step 2. Convert your lines and circles from steps 2a and 2b to (min:max) notation. Circles become 0 in front of the colon. Vertical lines become 1 in front of the colon. 3. Add deletion constraints.