Data Warehouse schema : Star or Snowflake (case included) - sql

I need a hand with a specific case for creating Data Warehouse schema for University.
I've tried to create a
[schema] http://i.imgur.com/EJPaVgq.jpg but it looks like im going in wrong direction
Case:
University currently has 5 courses – Foundation, Business Computing,
Business, Economics, and Law. It provides education on 5 levels. Each
academic year consist of 2 semesters. We have a number of modules that
belong to courses and some of them are core modules and some are
optional. Some modules are semester long and some are a year-long.
Each module has assessment components that have weights contributed to
the overall mark on the module. Assessments are of different types
like in-class test, coursework, final exam, etc. Students register on
courses starting from Foundation. Students might change the course
over time (e.g. transfer from Business to Business Computing).
University would like to know about: • students registration on
courses and modules and tracking changes to them over time.
• academic progress and performance of students and faculty in
different courses and modules including assessment components
(coursework, in-class test, final exam, etc.).
If possible, please attach schema as a screenshot or whatever. Im newbie to Data Warehouse stuff, so i dont know much about it and have no expirience in creating them.
I will be very grateful for any help that will somehow closer to solving the problem.
Sorry for my english.
Thank you, and have a nice day.

I am sure it would be hybrid snowflake as you have two fact tables here and will have other several dimension tables connected around

Some quick ref on the advantages of both types of schemas.
http://www.diffen.com/difference/Snowflake_Schema_vs_Star_Schema

Related

Company hierarchy class diagram

I want to create an UML class diagram of a company hierarchy and I want to especially to mention that every employee has a superior in the hierarchy (for exemple every department in a company has chief and a chief is a superior of other employees in the departement ).
I build this diagram but I feel that there is some thing wrong
I would omit every generalization, it leads to hell (imagine simple situation - you have a hospital with doctors and patients. How many instances of one person will you have, if a doctor brakes his ankle and becomes a patient? And now you decide to have a library. A doctor can borrow a book as well as a patient.). Anyway, I would depict your domain as is at the diagram below (with example).
As for you requirement: I want especially to mention that every employee has a superior in the hierarchy. It is not feasible in a real world. So I use 0..1 multiplicity.
According to your description I'd come up with this:
A Department is composed of Employees. A Chief is an Employee and there's exactly one Chief per Department.
There are definitely other ways to model this. Especially the generalization might be done in different ways. This depends on lots of domain details which can't be discussed here. But basically you could start with this approach.

Library Database MS Access

I am currently designing a database for a library a project for my database class. Below is the ER diagram so you can see the basic formatting of the database:
I have completed all of the requirements of the assignment, so please don't think that I am asking for someone to do my homework. What I am asking for assistance with is an idea. We can add extra features into this here such as a report generator, entry form, etc. I have added in a report generator to show the most active member/most popular book and an entry form. But I cannot think of anything else I can add into here to increase the usefulness, any suggestion would be appreciated.
There are a lot of possibilities:
Popularity can be split by gender, which could be interesting.
You could also work on popularity by address to make a geographical analysis, but if this is a local library you probably won't get much out of that.
Another stat that could be worthwile is the average length of borrow.
But the more interesting reports could be those that combine popularity, popularity by gender, average length of borrow with the catalog attributes... so you could have a view by author, by publisher or by publication year.
That is with the current structure. If you were to add genre or media type (book, magazine, CD, DVD) attributes, you would open up a whole lot of new dimensions.

Draw EER Model to create Store Database system

I asked the following question on a database site:
I am trying to build an EER Model for a Autostore that has 5 locations
and offers a range of auto products. They offer car repairs and
roadworthy tests as a service also. I need to be able to make
fortnightly reports on unfinished service jobs, and fortnightly
reports on the sales. They have a wide customer database filled with
full addresses. There is a constant inflow of new stock items and
restocking of old ones. There should also be a way to know the cost of
each item in stock and where its being held.
I swear I've researched it enough to be able to understand it by now
but Im really struggling to map this out as I'm constantly running
into a wall when dealing with the products that are being restocked,
sold and stocked by particular stores in different locations.
-I'm a total rookie with this kind of thing but if anyone can help me it would be amazing.
but I am struggling to find an answer and was thinking that maybe if I asked someone here to build an SQL setup it would lead me in the direction of being able to make the model or if there was a way of building the relational model then it would be a simple step from there, unless someone has the original answer - or all of them haha, hope you can help!
Thanks,
Jacob
If you are struggling with creating an EER diagram, my guess is that you may not have captured detailed enough requirements for the application. A clear understanding of the functionality the application should provide should lay the groundwork for what you need to model in the database.
Ask yourself these questions.
Have I created user profiles for each type of user the application will be used by?
Have I outlined every action these users will be performing on the application and the details of the actions?
These are just two of many questions that you have hopefully fully addressed. If you have addressed these topics and everything else fully, perhaps you just need a different approach in organizing your requirements.
Break it up into segments of data. For example, you'll need to create a system of tables that manages inventory. Which will need to then be linked up to a system of tables that manages sales and service records. Which will need to be linked to a system of tables that manages customers data. The sales/service and inventory control will need to be linked up to a system of tables that governs employees and their roles and ability to do things (security, privileges, etc). I can go on and on speaking theoretically about this, but this should hopefully be enough to get you started.
Good luck.

Data tables exercise [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 10 years ago.
Hi everyone I was working through a databases exercise and came across the following exercise where I have to create a set of data tables from a given case scenario. But I'm having difficulty working out the attributes in bold:
A database is to be designed for a university to monitor students’ progress
throughout their course of study. The students are studying for a degree (such as
BSc, MSc, etc.) within the framework of a modular system. The university provides
a number of modules, each being characterised by its code, title, credit value,
module leader, academic staff and the department they come from. A module is coordinated by a module leader who shares teaching duties with one or more
lecturers. A lecturer may teach (and be a module leader for) more than one module.
Students are free to choose any module they wish but the following rules must be
observed: some modules require pre-requisite modules and some degree
programmes have compulsory modules. The database is also to contain some
information about students including their student numbers, names, addresses,
degrees they study for, and their past performance (i.e., modules taken and
examination results).
So far the tables I have are:
University
ModuleCode, ModuleTitle, CreditValue, Department
Module
ModuleCode, ModuleTitle, LecturerID
Lecturer
LecturerID, ModuleCode, ModuleTitle
Student
StudentID, Name, Address, DegreeCode
Degree
DegreeCode, DegreeType, DegreeTitle
Performance
ModuleCode, ModuleTitle, StudentID, Result
Is there anything that I'm missing out on or can improve?
A few thoughts (in no particular order):
I would have assumed there is a one-to-one relationship between ModuleId and ModuleTitle. That is, that a ModuleId uniquely identifies a ModuleTitle. In that case, you shouldn't be be using both ModuleId and ModuleTitle everywhere you're identifying a module, but use only the uniquely identifying value. (Except in the table where the relationship between ModuleId and ModuleTitle is defined.)
Lecturers can teach multiple modules. Yet, you've include the ModuleId as part of the Lecturers table. See the problem here?
Is the LecturerId in the module table intended to be the moduleLeader? If so, say that. A foreign key doesn't always have to be the same name as the primary -- in general it's a good idea, but you want to clarify that this is a special lecturer. Or perhaps, you want to add a table that specifically identifies which lecturers are module leaders.
I don't see anything here that implements the 'some modules require pre-requisite modules and some degree programmes have compulsory modules' requirements.
In would interpret 'the department they come from' as referring to the academic staff, not to the module itself. It's not clear that a module could only be taught by people from one academic department.
In the real world addresses are much more complicated then just saying address as a field.
The last point is somewhat nit-picky, but the rest should be addressed. I think you've still got some significant work to iron out these issues.
In general, I think you're going to need to break this out into more tables, to represent each of the individual entities (modules, lecturers, departments, and then build tables to define the relationships between them.
On the first pass, I'd read the description like this. (Possible tables in bold, some bolded more than once.)
A database is to be designed for a university to monitor students’
progress throughout their course of study. The students are studying
for a degree (such as BSc, MSc, etc.) within the framework of a
modular system. The university provides a number of modules, each
being characterised by its code, title, credit value, module leader,
academic staff and the department they come from. A module is
coordinated by a module leader who shares teaching duties with one or
more lecturers. A lecturer may teach (and be a module leader for) more
than one module. Students are free to choose any module they wish but
the following rules must be observed: some modules require
pre-requisite modules and some degree programmes have compulsory
modules. The database is also to contain some information about
students including their student numbers, names, addresses, degrees
they study for, and their past performance (i.e., modules taken and
examination results).
Since this is for one university, I probably wouldn't create a table of universities, although I could make a good case either way.

SQL Database ER Diagram

So for my software engineering course, as a part of the larger project, we need to implement a database using HSQLDB. Unfortunately, I haven't taken database design yet, and 3 out of 5 people in our group have dropped the course, leaving this part for me to do.
As of now, I've come up with this ER Diagram for our project:
What we have is a list of courses, and each course contains many modules. Every account can be registered in any course, giving them access to each module of the course, which is graded, and than the mark is stored on their account.
I think the diagram I've come up with represents this fairly well; however, I just started learning about this today, so I'm still a bit shaky, so to say.
Is there anything that jumps out as wrong about this, or parts that could be improved?
P.s - I just noticed in the module table, it contains grade, which should actually be in module_grade.
Course_grade table is absolutley useless in your model. You should store the grade information inside course_grade and module_grade instead of the module directly. Think of module as master data (so something you want to use for all students) which means that you should not store student specific information inside it.
I would also add timestamps to your model at least inside the tables that have the grade information so that you can at least check when the student got the information. If you also have the information available who gave the grade you should probably store that as well.
If you are using SQL to access your model think about changing the foreign key columns in course_grade and module_grade to something that is unique. This makes queries much more readable imo. Maybe for course grade renaming course_id to cg_course_id.