element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Connected Cloud Challenge
  • Challenges & Projects
  • Design Challenges
  • Connected Cloud Challenge
  • More
  • Cancel
Connected Cloud Challenge
Blog Connected Cloud Challenge - IoT based Advertisement BillBoards/Hordings - #BlogPost-2
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: sami9974
  • Date Created: 27 Apr 2020 6:16 PM Date Created
  • Views 500 views
  • Likes 2 likes
  • Comments 0 comments
  • connectedcloud
  • connected cloud
  • postgresql
  • django
  • psoc 6
  • aws_iot
  • cypress
Related
Recommended

Connected Cloud Challenge - IoT based Advertisement BillBoards/Hordings - #BlogPost-2

sami9974
sami9974
27 Apr 2020

Here I have created the DataBase part of the Project which is responsible to store Customer data as well as the website content.

 

To getting started with DataBase design I want to introduce the "PostgreSQL: the most advanced Open source Relational Database". which I have used as a DataBase for this Project. If you are new to this DataBase System you can refer to this link of the there official website (https://www.postgresql.org/about/). To start with the database system you need to download some important software PostgreSQL(https://www.postgresql.org/download/) itself and the pgAdmin which is the administration and development platform for PostgreSQL (https://www.pgadmin.org/download/).

 

- How to create a DataBase schema?

for this, we need to create a model for a specific table in Python language. After creating that model we need to migrate that model into the DataBase. I am showing the example of my project Table:  You need to create models.py

 

 

 

class Site(models.Model):

    NAME = models.CharField(max_length=100)

    IMG = models.ImageField(upload_to= 'pics')

    UPDATED_DATE = models.DateField()

    START_DATE = models.DateField()

    END_DATE = models.DateField()

    AREA_CODE = models.IntegerField()

    DESC = models.TextField()

    PRICE = models.IntegerField()

    STATUS = models.BooleanField(default=False)

    AGR_AUTO_UPDATE = models.BooleanField(default=False)

 

then you can migrate this model into DB using this command :

 

python manage.py make migrations

 

 

before that you need to create the migration file :

create migration
python manage.py sqlmigrate advertisement "migration file_name"

 

python manage.py migrate

 

 

Demo: For my project website I have created the several schemas which are responsible for the particular section of the website. They are divided into  groups

1)

advertisement_agreement_details

advertisement_customer_details

advertisement_site

advertisement_site_details

advertisement_user_authentication

 

2)

auth_group

auth_group_permissions

auth_permission

auth_user

auth_user_groups

auth_user_user_permissions

 

3)

django_admin_log

django_content_type

django_migrations

django_session

 

Here I have attached the picture and video of created DataBase Tables and Schemas:

image

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube