Geography/Location dimension table for datawarehousing - gis

Is there a place I can view or download the geography dimension for data warehousing purposes? if not how do I go about creating one?
Thank you

purchased data from - http://www.zipcodedownload.com/

Related

How to Build an ODS layer?

sorry for my noob question
I'm working on a project where I have to take data from an excel source and build a small DW from it. so I was thinking of these steps
Source > staging> OLETP > ODS > DW
in the requirements, I have to create an ODS layer so I'm not sure whats my process will be and what exactly needs to be inside the ODS, can you please let me know what steps should I take?
Thanks
As mater of fact ODS Operational Data Store(source) is a database that you need to create every relation or check constraint or any checks in DB for your business to check all data that you want use in data warehouse in this layer you must design database like Normal DB but not normalize and you can get any redundancy that you want.pay attention this design is not base on fact or dimension and it just wants to cleans data for data warehouse

How to make mysql insert data automatically

recently I've been introduced into the database world so I am initiating with MySQL, but the problem comes when I am requested to create a database for an art event where adults and children have different entrance costs but like I'm not working with other applications, I have to do everything with SQL instructions so as this language has not -if- instructions I would like you to guide me how to do to assign automatically the cost of an entrance when I register an adult or a child inside a column called "entrance cost"
I have thinking to create an entity called "rate" where I place the maximum age with lower cost (for children) and otherwise assign the cost for adults, but I don't know how to make to compare this data when I register an entrance and assign the cost to the user variable "entrance"
I'm really confused with this exercise so I hope you can get it and help me with that.
Thanks in advance.
I think you need to create one master table to configure rates. and eventually, when you add user entrance data, you can map this with rates from master table.
Let's say we have RateMaster Table(RateId, MinAge, MaxAge, Rate).
You add multiple rate records here with MinAge, MaxAge.
UserEntrance Data will have age mentioned for user and you can refer their rates from RateMaster table.
Let me know if this helped.
In a nutshell, you need to work with another language. You can't do a dinamic application using only SQL.
I'd recommend you to use Spring Boot (http://spring.io/projects/spring-boot) with Java or Kotlin. It's a very straightforward framework that will help you a lot, even if you're a starter.

Table Relationship Issues

I need some assistance linking 2 tables.
I have a products table and an additives table. Some products have 1-3 different additives in them.
I have them linked by their codes but they aren't showing as linked like my other tables. Is it because I have several different Additive Codes under 1 product?
Can someone point me in the right direction here! :D
It may help, as well as make your app more flexible, to have a intermediate table which has only the Product Code of the parent item and a field for the Additive Code. Then you link your tblProducts to the Product Code in this intermediate table, and you link the Additive Codes in the intermediate table to the tblAdditives.Product Code field. This should provide the links you are seeking, as well as allowing an unlimited Additives.
You have two options here. Table designing is a very critical stage so please carefully use the best approach as per your requirement.
Use an associative table as suggested by #Dale, this would be the best approach.
You can create a multivalued field which will allow storing more than one Additive codes in the same field. In case your additive code list is limited then you can go in this way and the advantage you have is easily displaying all values in reports.
Guide to multivalued fields

Any Java API or free MySQL Database for City-from-country mapping with ISO codes?

This is my requirement:
I need to populate all countries of the world in a dropdown (combobox).
There would be another dropdown just below that shall be populated with values of cities of the selected country.
All the countries and cities shall have their respective ISO codes when shown in the dropdowns.
I am looking for either a free available database in mysql (I have not been able to find one; all are either paid or inconsistent)- or - preferably a Java API which can return me countries and cities so that I do not have to store the entire database at my end.
Technologies used: MySQL, JSF.
Any help shall be highly appreciated. Thank you.
Maybe http://opengeocode.org/download.php will help, see e.g. the "Cities of the World". It's a CSV you could import into MySQL. You can see the data structure by clicking on the "Metadata" button. Good luck!

Designing tables from mySQL database

I need help on designing my database.
What would be the most efficient way to make my database?
I have 18 categories on my list, each one of those categories has 4 items to choose from and from each of those items there's 3 sizes each.
I tried making it from a single table but it looks unorganized, any ideas how? thanks.
First jot out the relation between these 3 entities.
I presume that you have Categories(1): Items(M) relation and Items(1):Sizes(M) as per your description.
So, the best way to design is to make three tables each of Categories,Items and Sizes and associate each one of them in 1:M i.e Categories<->Items (1:M) and Items<->Size (1:M)
This would make your database normalized without redundancy of data.
Thanks.
You are describing a basic star schema with snowflakes .. That's the real name , your main table will have N dimensions each dimension will have his separate table.
Your facts will be counter for the objects at the main table for example.
http://infogoal.com/datawarehousing/images/orders_star_schema_01.png