Db Relation Schema

In: Computers and Technology

Submitted By questaans
Words 305
Pages 2
To define referential integrity more formally, first we define the concept of a foreign key. The conditions for a foreign key, given below, specify a referential integrity constraint between the two relation schemas R1 and R2. A set of attributes FK in relation schema R1 is a foreign key of R1 that references relation R2 if it satisfies the following rules:
1. The attributes in FK have the same domain(s) as the primary key attributes
PK of R2; the attributes FK are said to reference or refer to the relation R2.
2. A value of FK in a tuple t1 of the current state r1(R1) either occurs as a value of PK for some tuple t2 in the current state r2(R2) or is NULL. In the former case, we have t1[FK] = t2[PK], and we say that the tuple t1 references or refers to the tuple t2.
In this definition, R1 is called the referencing relation and R2 is the referenced relation.
If these two conditions hold, a referential integrity constraint from R1 to R2 is said to hold. In a database of many relations, there are usually many referential integrity constraints.
To specify these constraints, first we must have a clear understanding of the meaning or role that each attribute or set of attributes plays in the various relation schemas of the database. Referential integrity constraints typically arise from the relationships among the entities represented by the relation schemas. For example, consider the database shown in Figure 3.6. In the EMPLOYEE relation, the attribute
Dno refers to the department for which an employee works; hence, we designate Dno to be a foreign key of EMPLOYEE referencing the DEPARTMENT relation. This means that a value of Dno in any tuple t1 of the EMPLOYEE relation must match a value…...

Similar Documents

Db Testing

...the bug, is architecture a problem? What component is responsible, who can fix the problem? Data Is app server running properly, is Sys Admin hardware at fault? Copyright Sammamish Software Services 2003. All rights reserved. DBA QA 6 Copyright Sammamish Software Services 2003. All rights Reserved 6 8/26/2004 Complexity of database interaction Web Service Data Store Data Store Web Client Internet Web Server Intranet Client Computer Multiple Data Stores: Oracle, SQL Server, DB2, etc. 7 Copyright Sammamish Software Services 2003. All rights reserved. Copyright Sammamish Software Services 2003. All rights Reserved 7 8/26/2004 Why test database objects? ! ! ! If you don’t test DB objects, stored procedures and views, you’re missing critical application functionality Increasingly stored procedures and views are used on the database backend in modern applications Application functionality is moved to the database, Why? ! ! ! Performance optimization by the DBMS Security: access can be limited Robustness against hacks Copyright Sammamish Software Services 2003. All rights reserved. 8 Since you’re a tester, you always ask “why”? Why am I here? What’s the point? With the increasing use of data on the internet and in every application, the need for skilled testers in databases is growing quickly. Stored procedures are increasingly used by experienced database developers to ease the complexity of calls to......

Words: 5030 - Pages: 21

Db Oracle

...DB (duomenų bazė) apibrėžimas ir pavyzdžiai Galimi veiksmai su DB Duomenų bazių valdymo sistemos (DBVS) DBVS funkcijos 1. DBVS turi minimalizuoti duomenų perteklių (dubliavimą), t.y. reikia projektuoti sistemą taip, kad skirtingos tos pačios organizacijos tarnybos nenaudotų “savų” duomenų ar “savų” failų kopijų 2. DB turi būti suprojektuota taip, kad tuo pat metu keli vartotojai galėtų naudotis ta pačia DB. Tai pasiekiama taikant duomenų blokavimą, t.y. kai vienas vartotojas keičia DB įrašą, kiti vartotojai tuo pat metu gali peržvelgti ar net keisti kitus įrašus. 3. DB turi būti vientisa, t.y. jei ji atitinka tam tikras duomenų saugojimo sąlygas, ji turi išlaikyti tas sąlygas ir atliekant įvairius keitimus DB. Pvz. Studento_bakaluro kurso numeris negali būti didesnis už 4, o magistranto daugiau nei 2. Atliekant pakeitimus reikia tikrinti šių sąlygų užtikrinimą, 4. DB duomenys neturi prieštarauti . Tam pačiam objektui bazėje negali būti kelių įrašų, tai ir neleis jo aprašyti skirtingai. 5. DB saugumas. Turi būti numatyti veiksmai, kurie apsaugo duomenis bazėje nuo tyčinio ar netyčinio sunaikinimo, pakeitimo ar nesankcionuoto duomenų peržiūrėjimo. Tam administratorius naudoja priemones , kurios leidžia suteikti tam tikras teises į duomenų vartojimą. DBVS pagal tas suteiktas vartotojams teises prižiūrivisus vartotojo veiksmus. 6. Neplanuotų užklausų organizavimas DB tipai, jų projektavimas ir keliami reikalavimai Viena iš DB tipų yra Reliacinė duomenų bazė......

Words: 6730 - Pages: 27

A Model Theory for Generic Schema Management Models

...INTERNATIONAL UNIVERSITY A Model Theory for Generic Schema Management Models Kinan M Al Haffar UM4699SIT10550D 07/08/2007 Abstract The core of a model theory for generic schema management is developed. This theory has two distinctive features: it applies to a variety of categories of schemas, and it applies to transformations of both the schema structure and its integrity constraints. A subtle problem of schema integration is considered in its general form, not bound to any particular category of schemas. The proposed solution, as well as the overall theory, is based entirely on schema morphisms that carry both structural and semantic properties. Duality results that apply to the two levels (i.e., the schema and the data levels) are established. These results lead to the main contribution of this paper: a formal schema and data management framework for generic schema management. Implications of this theory are established that apply to integrity problems in schema integration. The theory is illustrated by a particular category of schemas with object-oriented features along with typical database integrity constraints. 1 Introduction This paper presents the core results of a model theory for generic schema management, by which we mean schema and database transformation capabilities that are independent of a particular data model. Such transformations require major database programming tasks, such as integrating source schemas when building a data warehouse......

Words: 5618 - Pages: 23

Schema Design

...OpenTravel™ Alliance XML Schema Design Best Practices Version 3.04 June 2006 © 2005 OpenTravel™ Alliance www.opentravel.org/ OpenTravel™ Alliance Best Practices Specification Page 2 1 2 3 OTA XML Schema Design Best Practices............................................................................. 4 XML Standard Specifications................................................................................................. 5 Best Practices.......................................................................................................................... 6 3.1 Scope.............................................................................................................................. 6 3.2 Schema Design Component Parts and Roles ................................................................. 6 4 OTA XML Schema Design Guidelines .................................................................................. 7 4.1 Tag Naming Conventions .............................................................................................. 7 4.1.1 Mixed Case ................................................................................................................ 7 4.1.2 Underscore................................................................................................................. 7 4.1.3 Acronyms................................................................................................................... 7 4.1.4 Word......

Words: 6100 - Pages: 25

Star Schem & Snowflake Schema

...we will go through different Schema that can be used during Dimensional Modelling to create a Data Warehouse. Before we start with today's topic , For my viewers those who are new to this field i would like to revisit some of the key points of my previous blogs: 1) Business Intelligence is mainly divided into three parts as per my understanding a) Data Warehouse design and Implementation (ETL process) b) Data Analysis (Using OLAP cubes) c) Reporting and Dashboard Creation For further details revisit my First blog 2) Important Components involved in Dimensional Modelling or Data Warehouse Designing a) Fact Tables (Additive Facts, Semi-Additive Facts, Non- Additive Facts) b) Dimension Table c) Grain For further details revisit my Second blog After a thorough revision of previous concepts lets start our today's discussion about different Schema involved in Dimensional Modelling or Data Warehouse Designing. First of all i would like to explain the meaning of the topic i.e Snow Covered Wagon Hitched to a Star = SnowFlake Schema and Star Schema are two types of Schema that are used while designing a Data Warehouse, Hence they can be explained as follows: Star Schema: A Star Schema is one of the simplest and easiest schema to understand. A schema which consists of Dimension tables only attached to Fact tables. A Star Schema get its name from its......

Words: 557 - Pages: 3

Geography Db

...DB 1: Geography posted by Stacy Harris Thu Dec 9 23:48:28 2010 According to yourdictionary.com, Geography is defined as the study of the earth and all of its features. This also includes the human race and the effect that humans play on the earth. NationalGeographic.com states that there are five themes in Geography. These themes are location, place, human/environment interactions, movement, and regions. If I would have not read this article, I would think that location, place, and region are just about the same. But as I read the article, I found this was not the case. Location refers to the latitude and longitude of an exact spot on a map or globe. Places are defined by the characteristics that distinguish them from other places. For instances, the animal population of certain place makes it unique, as well as other features like mountains and even human architecture. Region refers to an area on earth that is unified by a specific attribute. These attributes can be either human or physical and can include things like climate,religious, political, cultural, and many others. Movement is used to study the way people and products move from one place to another through interactions and travel. It is also used to study resources and where they are located around the earth and how these resources are dispersed throughout the world. Human interaction/environment is used to describe the way that people interact with the world around them. This interaction can be both positive and......

Words: 322 - Pages: 2

Db Hw1

...primarily exists for use like accessed to the database for querying, updating, and generating reports. DBA: people who administer the database, DBMS and related software. End user: people whose job requires access to the database for querying, updating, and generating reports. Canned transaction: using standard types of queries and updates. Deductive database system: database system which provides capabilities for defining deduction rules for inferencing new information from the stored database facts. Persistent object: stored in the database and persist after program termination. Transaction-processing application: application that the information processing that is divided into individual. 1.3 Main characteristics: Self-contained nature of a db system. Insulation between programs and data. Data abstraction. Support of multiple views of the data. Sharing of data and multiuser transaction processing. For traditional file systems, it cannot allow users to concurrent access to the data. 1.5 Casual end users: occasionally access the database, but they may need different information each time. Naive or parametric end users: Their main job function revolves around constantly querying and updating the database, using standard types of queries and updates. Sophisticated end users: who thoroughly familiarize themselves with the facilities of the DBMS in order to implement their own applications to meet their complex requirements. Standalone users: maintain personal databases by using......

Words: 3269 - Pages: 14

Dbs Research

...Regional Morning Pack DBS Group Research . Equity 01 October 2009 Spotlight On (SP) Hiap Seng: Undervalued oil and gas play (Initiate Coverage) BUY; S$0.69; HSE SP; Price Target: 12-Month S$0.90 • • • • Huge 40-60% discount to peers is unwarranted. Expect high dividends of 4.0-4.5 Scents per share. Margins improvement to support earnings growth. Initiate coverage with a BUY rating. 30% upside to our target price of S$0.90. Ideas & Updates REGIONAL US Fed: Two collision courses SINGAPORE Banking: Positive uptick in loans Hiap Seng (Initiate Coverage) – See Spotlight MALAYSIA Tanjong PLC: Attractive yield play BUY; RM15.00; TJN MK; Price Target: 12-month RM19.25 HONG KONG PUBLIC HOLIDAY THAILAND Charoen Pokphand Foods – See Spotlight (TB) Charoen Pokphand Foods: Earnings surge, costs remain low BUY; Bt7.95; CPF TB; Price Target: 12-Month Bt9.60 (Prev Bt7.50) • • • 3Q09F will beat record high 2Q09 earnings Promising outlook with firm product prices, low raw material costs, and improving margins Raised earnings, and TP to Bt9.60. Undemanding valuation, 21% upside, maintain BUY. Singapore Research Team – 6533 9688 research@dbsvickers.com www.dbsvickers.com “In Singapore, this research report or research analyses may only be distributed to Institutional Investors, Expert Investors or Accredited Investors as defined in the Securities and Futures Act, Chapter 289 of Singapore.” “Recipients of this report, received from DBS Vickers Research (Singapore) Pte Ltd......

Words: 21991 - Pages: 88

Database Star Schema

...Information Systems 3 (database 3) Star Schema Due 19/06/2014 You must create a Star Schema University Attendance database for the following situation: The database must record attendance of students in classes, the time of the lecture, the lecturer who taught the class, the room that was used and the subject for that lecture. For each subject you must record the total number of classes timetabled for the semester – this will be used to calculate Student attendance percentage and Lecturer attendance percentage. An attendance fact must always contain a valid lecturer-id; we assume if one lecturer is absent then another will take his/her place. You may assume maximum room usage is 11 X 5 = 55 periods a week. You can work out the primary key of the fact table from the above specification. The following criteria must be met: 1) This is an individual assignment. 2) You must write SQL statements to enter the data; Try not to repeatedly enter the same thing for one class. 3) You will need reports to provide: a) % usage of rooms b) % attendance of students c) % attendance of lecturers d) At least 2 other reports of interest 4) You must enter at least 30 fact records (this is a factless fact table); in all 10 students, 5 different lecturers, 3 different rooms, 2 subjects and 10 date/time slots as your initial prototype system. 5) (Optional). You must load your fact table from an operational database in batch mode – e.g. a file with values St No Lect –Id Room Subj Date......

Words: 401 - Pages: 2

Star Schema

...Information Systems 3 You must create a Star Schema University Attendance database for the following situation: The database must record attendance of students in classes, the time of the lecture, the lecturer who taught the class, the room that was used and the subject for that lecture. For each subject you must record the total number of classes timetabled for the semester – this will be used to calculate Student attendance percentage and Lecturer attendance percentage. An attendance fact must always contain a valid lecturer-id; we assume if one lecturer is absent then another will take his/her place. You may assume maximum room usage is 11 X 5 = 55 periods a week. You can work out the primary key of the fact table from the above specification. The following criteria must be met: 1) This is an individual assignment. 2) You must write SQL statements to enter the data; Try not to repeatedly enter the same thing for one class. 3) You will need reports to provide: a) % usage of rooms b) % attendance of students c) % attendance of lecturers d) At least 2 other reports of interest 4) You must enter at least 30 fact records (this is a factless fact table); in all 10 students, 5 different lecturers, 3 different rooms, 2 subjects and 10 date/time slots as your initial prototype system. 5) (Optional). You must load your fact table from an operational database in batch mode – e.g. a file with values St No Lect –Id Room Subj Date Time 1 1 1 2 20110718 1130 2 1 1 2 20110718 1130 6 1...

Words: 292 - Pages: 2

Self-Schema

...Self-Schema: A self-schema is a belief or idea about oneself that leads to a bias that is self-perpetuating. It could consist of a particular role in society or a generalization based on social sterotypes. If a mother tells her daughter she looks like a tom boy, her daughter may react by choosing activities that she imagines a tom boy would do. Conversely, if the mother tells her she looks like a princess, her daughter might choose activities thought to be more feminine. The self-schema becomes self-perpetuating when the individual chooses activities based on expectations instead of desires. ------------------------------------------------------------------------------------------ The term schematic describes having a particular schema for a particular dimension. For instance, a person in a rock band at night would have a "rocker" schema. However, during the day, if he works as a salesperson, he would have a "salesperson" schema during that period of time. Schemas vary according to cultural background and other environmental factors. Once people have developed a schema about themselves, there is a strong tendency for that schema to be maintained by a bias in what they attend to, in what they remember, and in what they are prepared to accept as true about themselves. In other words, the self-schema becomes self-perpetuating. The self-schema is then stored in long-term memory, and both facilitates and biases the processing of personally relevant information. The......

Words: 3127 - Pages: 13

Star Schema

...Information Systems 3 (database 3) Star Schema Draft 1 You must create a Star Schema University Attendance database for the following situation: The database must record attendance of students in classes, the time of the lecture, the lecturer who taught the class, the room that was used and the subject for that lecture. For each subject you must record the total number of classes timetabled for the semester – this will be used to calculate Student attendance percentage and Lecturer attendance percentage. An attendance fact must always contain a valid lecturer-id; we assume if one lecturer is absent then another will take his/her place. You may assume maximum room usage is 11 X 5 = 55 periods a week. You can work out the primary key of the fact table from the above specification. The following criteria must be met: 1) This is an individual assignment. 2) You must write SQL statements to enter the data; Try not to repeatedly enter the same thing for one class. 3) You will need reports to provide: a) % usage of rooms b) % attendance of students c) % attendance of lecturers d) At least 2 other reports of interest 4) You must enter at least 30 fact records (this is a factless fact table); in all 10 students, 5 different lecturers, 3 different rooms, 2 subjects and 10 date/time slots as your initial prototype system. 5) (Optional). You must load your fact table from an operational database in batch mode – e.g. a file with values St No Lect –Id Room Subj......

Words: 377 - Pages: 2

Star Schema

...Name (May Change) Assessment Type Research Essay Test 2 (theory and online test) ASS 2/Project 1 Star Schema - - 10% No Test scope material T1 Student can choose their topic but need to get approved by the Lecturer DUE 11th MARCH 2016 30% Yes T2 (term2) Advanced ER diagrams, Transaction Management, DDBMS and Data warehouse. All topics discussed from Feb till June. 5% No T3 Due on the 19th May 2016. Marks will be available at ____________________________________________________________________________  2015 Cape Peninsula University of Technology, Informatics & Design Page 6 of 18 Information Systems 3b (ISY300B, ISY313B) the End of the year with the final marks. BLACK BOARD quiz (time to recover on previous material and test) Assignment 4 Integrated Project Test 4 (theory test) 10% No T4 (term 3) On Distributed. Database , Data Warehouse, Transaction Processing and Advanced ERD 10% Yes T5 (term 4) Due on 21st of Oct 2016. T6 (term 4) On Advanced Data Warehouse, GIS data structures, XML, DTD, XSD, XSLT and XPATH. 35% Yes 5.3 Assessment details Refer to Appendix named Information Systems 3 Assessments 2016 6. Additional information 6.1 6.2 6.3 Academic dishonesty. Unless specified, all work should be the student’s own work. Students are required to familiarize themselves with CPUT’s policy on plagiarism. Project Work. Projects 1 star schema is an individual project, to be demonstrated in a labor otherwise stated by your Lecturer.......

Words: 3807 - Pages: 16

Cognitive Schema

...Cognitive schemas, abstract and organized packages of information, are the cognitive version of identities. Self-schemas include organized knowledge about one's self, the cognitive response to the questions of identity. These include the characteristics, preferences, goals, and behavior patterns we associate with ourselves. Group schemas (analogous to stereotypes) include organized information about social positions and stratification statuses, such as gender, race, age, or class. Because the social positions we occupy have immediate consequences for our sense of self, group schemas play a major part in processes of identification. Self and group schemas illustrate both advantages and disadvantages of categorisation systems. They allow us to summarize and reduce information to key elements; thus, they also entail losing potentially valuable information. And, categorisations are almost always accompanied by systems of evaluation of some categories as better or worse. Schemas are not just perceptual phenomena; they can serve as explanatory devices and justifications of social relationships (Tajfel 1981). Thus, social identities are embedded in sociopolitical contexts. Social identity theory focuses on the extent to which individuals identify themselves in terms of group memberships (Tajfel & Turner, 1986). The central tenet of social identity theory is that individuals define their identities along two dimensions: social, defined by membership in various...

Words: 855 - Pages: 4

Developing Schemas

...When hearing the word schema people would not be able to explain what it means, and not realize that they use it in their everyday life. However it’s simple, schema is a concept that helps organize and interpret information. Schemas can be useful, because they allow us to take shortcuts in understanding a large amount of information. However, the concept can also cause us to reject relevant information in favor of information that confirms our pre-existing beliefs and ideas. Schemas can contribute to stereotypes and make it difficult to recall new information. So in order to understand schemas and the effects it has on a person’s life I formed a small case study. To start with, when starting the project, I first asked 10 participants who are in my family as well as my friends to help me in a project for psychology. Secondly I told the participants “I’m going to recite 12 words to you and show you those words at the same time.” The words were: Rest, Tired, Awake, Dream, Snore, Bed, Eat, Slumber, Sound, Comfort, Wake, and Night. After reciting the words I asked each participants what their name, age, and occupation was and when I went back to the list of words it seemed as all the words I recited to them didn’t matter, since they were more focused on the series of questions I asked 30 seconds after reciting the words. Next, I had asked the participants to write all the words they could remember within two minutes, but almost all ten participants had given up within a minute,......

Words: 889 - Pages: 4